diff options
Diffstat (limited to 'doc/SystemTap_Beginners_Guide/en-US/Array-Operations.xml')
-rw-r--r-- | doc/SystemTap_Beginners_Guide/en-US/Array-Operations.xml | 50 |
1 files changed, 25 insertions, 25 deletions
diff --git a/doc/SystemTap_Beginners_Guide/en-US/Array-Operations.xml b/doc/SystemTap_Beginners_Guide/en-US/Array-Operations.xml index 789bf607..00a8673c 100644 --- a/doc/SystemTap_Beginners_Guide/en-US/Array-Operations.xml +++ b/doc/SystemTap_Beginners_Guide/en-US/Array-Operations.xml @@ -505,7 +505,7 @@ probe timer.s(3) } </screen> -<para>This <command>foreach</command> statement instructs the script to process the elements in the array <command>reads</command> in descending order (of associated value). The <command>limit 10</command> option instructs the script to only process the first ten elements in the array (i.e. the first 10, starting with the highest value).</para> +<para>This <command>foreach</command> statement instructs the script to process the elements in the array <command>reads</command> in descending order (of associated value). The <command>limit 10</command> option instructs the <command>foreach</command> to only process the first ten iterations (i.e. print the first 10, starting with the highest value).</para> </section> <section id="arrayops-deleting"> @@ -665,7 +665,7 @@ probe vfs.read probe timer.s(3) { printf("=======\n") - foreach (count in reads+) + foreach (count in reads-) printf("%s : %d \n", count, reads[count]) delete reads } @@ -673,7 +673,7 @@ probe timer.s(3) probe end { printf("TOTALS\n") - foreach (total in totalreads+) + foreach (total in totalreads-) printf("%s : %d \n", total, totalreads[total]) } </screen> @@ -788,7 +788,7 @@ probe timer.s(3) </formalpara> <screen> -if([<replaceable>index_expression</replaceable>] in <replaceable>array_name</replaceable>) +if([<replaceable>index_expression</replaceable>] in <replaceable>array_name</replaceable>) <replaceable>statement</replaceable> </screen> <para>To illustrate this, consider the following example:</para> @@ -962,23 +962,23 @@ probe vfs.read <indexterm> <primary>array operations</primary> <secondary>computing for statistical aggregates</secondary> -<tertiary>count (integer extractor)</tertiary> +<tertiary>@count (integer extractor)</tertiary> </indexterm> <indexterm> <primary>operations</primary> <secondary>computing for statistical aggregates</secondary> -<tertiary>count (integer extractor)</tertiary> +<tertiary>@count (integer extractor)</tertiary> </indexterm> <indexterm> <primary>computing for statistical aggregates</primary> <secondary>array operations</secondary> -<tertiary>count (integer extractor)</tertiary> +<tertiary>@count (integer extractor)</tertiary> </indexterm> <indexterm> -<primary>count (integer extractor)</primary> + <primary>@count (integer extractor)</primary> <secondary>computing for statistical aggregates</secondary> <tertiary>array operations</tertiary> </indexterm> @@ -997,23 +997,23 @@ probe vfs.read <indexterm> <primary>array operations</primary> <secondary>computing for statistical aggregates</secondary> -<tertiary>sum (integer extractor)</tertiary> +<tertiary>@sum (integer extractor)</tertiary> </indexterm> <indexterm> <primary>operations</primary> <secondary>computing for statistical aggregates</secondary> -<tertiary>sum (integer extractor)</tertiary> +<tertiary>@sum (integer extractor)</tertiary> </indexterm> <indexterm> <primary>computing for statistical aggregates</primary> <secondary>array operations</secondary> -<tertiary>sum (integer extractor)</tertiary> +<tertiary>@sum (integer extractor)</tertiary> </indexterm> <indexterm> -<primary>sum (integer extractor)</primary> + <primary>@sum (integer extractor)</primary> <secondary>computing for statistical aggregates</secondary> <tertiary>array operations</tertiary> </indexterm> @@ -1033,23 +1033,23 @@ probe vfs.read <indexterm> <primary>array operations</primary> <secondary>computing for statistical aggregates</secondary> -<tertiary>min (integer extractor)</tertiary> +<tertiary>@min (integer extractor)</tertiary> </indexterm> <indexterm> <primary>operations</primary> <secondary>computing for statistical aggregates</secondary> -<tertiary>min (integer extractor)</tertiary> +<tertiary>@min (integer extractor)</tertiary> </indexterm> <indexterm> <primary>computing for statistical aggregates</primary> <secondary>array operations</secondary> -<tertiary>min (integer extractor)</tertiary> +<tertiary>@min (integer extractor)</tertiary> </indexterm> <indexterm> -<primary>min (integer extractor)</primary> + <primary>@min (integer extractor)</primary> <secondary>computing for statistical aggregates</secondary> <tertiary>array operations</tertiary> </indexterm> @@ -1069,23 +1069,23 @@ probe vfs.read <indexterm> <primary>array operations</primary> <secondary>computing for statistical aggregates</secondary> -<tertiary>max (integer extractor)</tertiary> +<tertiary>@max (integer extractor)</tertiary> </indexterm> <indexterm> <primary>operations</primary> <secondary>computing for statistical aggregates</secondary> -<tertiary>max (integer extractor)</tertiary> +<tertiary>@max (integer extractor)</tertiary> </indexterm> <indexterm> <primary>computing for statistical aggregates</primary> <secondary>array operations</secondary> -<tertiary>max (integer extractor)</tertiary> +<tertiary>@max (integer extractor)</tertiary> </indexterm> <indexterm> -<primary>max (integer extractor)</primary> + <primary>@max (integer extractor)</primary> <secondary>computing for statistical aggregates</secondary> <tertiary>array operations</tertiary> </indexterm> @@ -1105,23 +1105,23 @@ probe vfs.read <indexterm> <primary>array operations</primary> <secondary>computing for statistical aggregates</secondary> -<tertiary>avg (integer extractor)</tertiary> +<tertiary>@avg (integer extractor)</tertiary> </indexterm> <indexterm> <primary>operations</primary> <secondary>computing for statistical aggregates</secondary> -<tertiary>avg (integer extractor)</tertiary> +<tertiary>@avg (integer extractor)</tertiary> </indexterm> <indexterm> <primary>computing for statistical aggregates</primary> <secondary>array operations</secondary> -<tertiary>avg (integer extractor)</tertiary> +<tertiary>@avg (integer extractor)</tertiary> </indexterm> <indexterm> -<primary>avg (integer extractor)</primary> + <primary>@avg (integer extractor)</primary> <secondary>computing for statistical aggregates</secondary> <tertiary>array operations</tertiary> </indexterm> @@ -1163,7 +1163,7 @@ probe vfs.read } probe timer.s(3) { - foreach([var1,var2] in reads)
+ foreach([var1,var2] in reads) printf("%s (%d) : %d \n", var1, var2, @count(reads[var1,var2])) } </programlisting> |