diff options
author | graydon <graydon> | 2005-11-29 01:06:47 +0000 |
---|---|---|
committer | graydon <graydon> | 2005-11-29 01:06:47 +0000 |
commit | a46369128cb3df3d729a0f6f8f300d99f4c3cff6 (patch) | |
tree | 460b8e6b28d101eb1c5fd27c7e577193b2c13122 /testsuite/buildok/print_histograms.stp | |
parent | a432e18a24569804c82f14b36ae7d8dfcc245da7 (diff) | |
download | systemtap-steved-a46369128cb3df3d729a0f6f8f300d99f4c3cff6.tar.gz systemtap-steved-a46369128cb3df3d729a0f6f8f300d99f4c3cff6.tar.xz systemtap-steved-a46369128cb3df3d729a0f6f8f300d99f4c3cff6.zip |
[ChangeLog]
2005-11-28 Graydon Hoare <graydon@redhat.com>
* translate.cxx (var::assert_hist_compatible): New method.
(var::hist): New method.
(c_unparser::load_aggregate): New method.
(hist_op_downcaster): Remove, it was a mistake.
(expression_is_hist_op): Likewise.
(c_tmpcounter::visit_print_format): Implement print(@hist(...)).
(c_unparser::visit_print_format): Likewise.
* staptree.h (struct print_format): Add optional hist_op* member.
* staptree.cxx (traversing_visitor::visit_functioncall): Visit
hist_op if present in print_format.
(deep_copy_visitor::visit_print_format): Likewise.
* parse.cxx (parse_symbol): Special case to consume print(@hist(...)).
* elaborate.cxx (typeresolution_info::visit_arrayindex): Fix type inference bug.
(typeresolution_info::visit_foreach_loop): Likewise.
* testsuite/buildok/print_histograms.stp: New test.
[runtime/ChangeLog]
2005-11-28 Graydon Hoare <graydon@redhat.com>
* stat-common.c (_stp_stat_print_histogram): Various formatting
corrections and aesthetic tweaks.
(__stp_stat_add): Correction to linear bucket underflow cases.
Diffstat (limited to 'testsuite/buildok/print_histograms.stp')
-rwxr-xr-x | testsuite/buildok/print_histograms.stp | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/testsuite/buildok/print_histograms.stp b/testsuite/buildok/print_histograms.stp new file mode 100755 index 00000000..70c6e68d --- /dev/null +++ b/testsuite/buildok/print_histograms.stp @@ -0,0 +1,28 @@ +#! stap -p4 + +global foo, bar +global i + +probe begin +{ + print("starting up\n") + i = 0 +} + +probe timer.jiffies(100) +{ + printf("ping %d\n", i) + foo <<< ((100 * i) + 50) + bar <<< (50 * i * i) + if (i++ > 15) + exit() +} + +probe end +{ + print("shutting down\n") + printf("count %d, avg %d\n", @count(foo), @avg(foo)) + print(@hist_log(foo)) + print(@hist_linear(bar, 1000, 10000, 1000)) +} + |