diff options
author | fche <fche> | 2007-09-05 18:09:08 +0000 |
---|---|---|
committer | fche <fche> | 2007-09-05 18:09:08 +0000 |
commit | f97c9399e2b5e59d2d0abec669c48e44380eb52b (patch) | |
tree | 08c924402f90c6a0118acce3b37334c62b08cc61 /examples | |
parent | 86963113d4e3b10cd08389873c0eff62ba79f516 (diff) | |
download | systemtap-steved-f97c9399e2b5e59d2d0abec669c48e44380eb52b.tar.gz systemtap-steved-f97c9399e2b5e59d2d0abec669c48e44380eb52b.tar.xz systemtap-steved-f97c9399e2b5e59d2d0abec669c48e44380eb52b.zip |
2007-09-05 Frank Ch. Eigler <fche@elastic.org>
* pf2.stp: Exploit sortable aggregates.
Diffstat (limited to 'examples')
-rw-r--r-- | examples/ChangeLog | 4 | ||||
-rw-r--r-- | examples/pf2.stp | 12 |
2 files changed, 10 insertions, 6 deletions
diff --git a/examples/ChangeLog b/examples/ChangeLog index 3fe56772..d48b2075 100644 --- a/examples/ChangeLog +++ b/examples/ChangeLog @@ -1,3 +1,7 @@ +2007-09-05 Frank Ch. Eigler <fche@elastic.org> + + * pf2.stp: Exploit sortable aggregates. + 2007-08-09 Frank Ch. Eigler <fche@elastic.org> PR 4718, from Eugeniy Meshcheryakov <eugen@debian.org>: diff --git a/examples/pf2.stp b/examples/pf2.stp index 5773df97..fbac4e50 100644 --- a/examples/pf2.stp +++ b/examples/pf2.stp @@ -2,15 +2,15 @@ global profile, pcount probe timer.profile { - pcount ++ + pcount <<< 1 fn = probefunc () - if (fn != "") profile[fn] ++ # <<< 1 would be better ... + if (fn != "") profile[fn] <<< 1 } probe timer.ms(4000) { - printf ("\n--- %d samples recorded:\n", pcount) - foreach (f in profile- limit 10) { # ... but can only sort scalar arrays (bz #2305) - printf ("%s\t%d\n", f, profile[f]) + printf ("\n--- %d samples recorded:\n", @count(pcount)) + foreach (f in profile- limit 10) { + printf ("%s\t%d\n", f, @count(profile[f])) } delete profile - pcount = 0 + delete pcount } |