summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
Diffstat (limited to 'examples')
-rw-r--r--examples/ChangeLog4
-rw-r--r--examples/pf2.stp12
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
}