From: William Cohen Date: Mon, 15 Dec 2008 19:52:52 +0000 (-0500) Subject: Minor edits in associative array sections. X-Git-Tag: release-0.9~157^2~5 X-Git-Url: https://sourceware.org/git/?a=commitdiff_plain;h=16da491f985baaa0bfbdc9cd0098d508534bf75b;p=systemtap.git Minor edits in associative array sections. --- diff --git a/doc/SystemTap_Beginners_Guide/en-US/Array-Operations.xml b/doc/SystemTap_Beginners_Guide/en-US/Array-Operations.xml index bf4963210..00a8673c9 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) } -This foreach statement instructs the script to process the elements in the array reads in descending order (of associated value). The limit 10 option instructs the script to only process the first ten elements in the array (i.e. the first 10, starting with the highest value). +This foreach statement instructs the script to process the elements in the array reads in descending order (of associated value). The limit 10 option instructs the foreach to only process the first ten iterations (i.e. print the first 10, starting with the highest value).
@@ -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]) } @@ -788,7 +788,7 @@ probe timer.s(3) -if([index_expression] in array_name) +if([index_expression] in array_name) statement To illustrate this, consider the following example: diff --git a/doc/SystemTap_Beginners_Guide/en-US/Arrays.xml b/doc/SystemTap_Beginners_Guide/en-US/Arrays.xml index ac320fcdc..3d3dec015 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 -You can specify up to 5 index expressons in an array statement, each one delimited by a comma (,). This is useful if you wish to have a key that contains multiple pieces of information. The following line from uses 5 elements for the key: process ID, executable name, user ID, parent ID, and string "W". It associates the value of devname with that key. +You can specify up to 5 index expressons in an array statement, each one delimited by a comma (,). This is useful if you wish to have a key that contains multiple pieces of information. The following line from uses 5 elements for the key: process ID, executable name, user ID, parent process ID, and string "W". It associates the value of devname with that key. device[pid(),execname(),uid(),ppid(),"W"] = devname