diff options
author | William Cohen <wcohen@redhat.com> | 2008-12-15 14:52:52 -0500 |
---|---|---|
committer | William Cohen <wcohen@redhat.com> | 2008-12-15 14:52:52 -0500 |
commit | 16da491f985baaa0bfbdc9cd0098d508534bf75b (patch) | |
tree | e35576e76a65c7dd9594ae1ca0b5d98aa247a316 /doc/SystemTap_Beginners_Guide | |
parent | 1179271f9a422edf543178d2d02d2bf38334e697 (diff) | |
download | systemtap-steved-16da491f985baaa0bfbdc9cd0098d508534bf75b.tar.gz systemtap-steved-16da491f985baaa0bfbdc9cd0098d508534bf75b.tar.xz systemtap-steved-16da491f985baaa0bfbdc9cd0098d508534bf75b.zip |
Minor edits in associative array sections.
Diffstat (limited to 'doc/SystemTap_Beginners_Guide')
-rw-r--r-- | doc/SystemTap_Beginners_Guide/en-US/Array-Operations.xml | 8 | ||||
-rw-r--r-- | doc/SystemTap_Beginners_Guide/en-US/Arrays.xml | 2 |
2 files changed, 5 insertions, 5 deletions
diff --git a/doc/SystemTap_Beginners_Guide/en-US/Array-Operations.xml b/doc/SystemTap_Beginners_Guide/en-US/Array-Operations.xml index bf496321..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> diff --git a/doc/SystemTap_Beginners_Guide/en-US/Arrays.xml b/doc/SystemTap_Beginners_Guide/en-US/Arrays.xml index ac320fcd..3d3dec01 100644 --- a/doc/SystemTap_Beginners_Guide/en-US/Arrays.xml +++ b/doc/SystemTap_Beginners_Guide/en-US/Arrays.xml @@ -161,7 +161,7 @@ foo["harry"] = 25 </screen> </example> -<para>You can specify up to 5 index expressons in an array statement, each one delimited by a comma (<command>,</command>). This is useful if you wish to have a key that contains multiple pieces of information. The following line from <xref linkend="scriptdisktop"/> uses 5 elements for the key: process ID, executable name, user ID, parent ID, and string "W". It associates the value of <command>devname</command> with that key.</para> +<para>You can specify up to 5 index expressons in an array statement, each one delimited by a comma (<command>,</command>). This is useful if you wish to have a key that contains multiple pieces of information. The following line from <xref linkend="scriptdisktop"/> uses 5 elements for the key: process ID, executable name, user ID, parent process ID, and string "W". It associates the value of <command>devname</command> with that key.</para> <screen> device[pid(),execname(),uid(),ppid(),"W"] = devname |