diff options
author | graydon <graydon> | 2005-12-02 23:28:03 +0000 |
---|---|---|
committer | graydon <graydon> | 2005-12-02 23:28:03 +0000 |
commit | 1bbeef03a440e3ac23d6e5148675450597a58e67 (patch) | |
tree | d8266f6207cce8da7bd3b4365cecc4f8f0b7e7ef /testsuite/buildok | |
parent | e94c050c150e7433518958b95c63c554ff377bb4 (diff) | |
download | systemtap-steved-1bbeef03a440e3ac23d6e5148675450597a58e67.tar.gz systemtap-steved-1bbeef03a440e3ac23d6e5148675450597a58e67.tar.xz systemtap-steved-1bbeef03a440e3ac23d6e5148675450597a58e67.zip |
2005-12-02 Graydon Hoare <graydon@redhat.com>
* elaborate.cxx (mutated_var_collector): Forward
traversal portion of calls to base class.
(mutated_var_collector::visit_arrayindex): Resolve
arrayindex-into-histogram expression as pe_long.
(typeresolution_info::visit_print_format): Traverse
into histogram if present.
* parse.cxx (parse_symbol): Handle parse ambiguity surrounding
print(@hist_op(...)[...]).
* staptree.cxx (traversing_visitor::visit_arrayindex): Visit
base member of arrayindex.
* translate.cxx (c_unparser::histogram_index_check): New method.
(var::hist): Fix bug.
(var::buckets): New method.
(stmt_expr::stmt_expr): Print with newline.
(c_unparser::load_map_indices): Handle indexing-histogram case.
(c_tmpcounter::visit_arrayindex): Likewise.
(c_unparser::visit_arrayindex): Likewise.
(c_tmpcounter_assignment::visit_arrayindex): Throw error when
user attempts to write to histogram bucket.
(c_unparser_assignment::visit_arrayindex): Likewise.
* testsuite/buildok/print_histogram_entry.stp: New test.
Diffstat (limited to 'testsuite/buildok')
-rwxr-xr-x | testsuite/buildok/print_histogram_entry.stp | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/testsuite/buildok/print_histogram_entry.stp b/testsuite/buildok/print_histogram_entry.stp new file mode 100755 index 00000000..bf87ecbe --- /dev/null +++ b/testsuite/buildok/print_histogram_entry.stp @@ -0,0 +1,29 @@ +#! stap -p4 + +global foo +global i + +probe begin +{ + print("starting up\n") + i = 0 +} + +probe timer.jiffies(100) +{ + printf("ping %d\n", i) + foo <<< i + if (i++ > 15) + exit() +} + +probe end +{ + print("shutting down\n") + printf("count %d, avg %d\n", @count(foo), @avg(foo)) + for (i = 0; i < 7; ++i) + { + printf("bucket %d: %d\n", i, @hist_log(foo)[i]) + } +} + |