From dbb686641c390c199e53ab94c1b365df1a62e2b9 Mon Sep 17 00:00:00 2001 From: fche Date: Sat, 30 Dec 2006 03:54:51 +0000 Subject: 2006-12-29 Frank Ch. Eigler PR 3523. * tapsets.cxx (common_probe_entryfn_prologue,epilogue): Restore support for -t (benchmarking) mode. * translate.cxx (emit_common_header,emit_module_init):Ditto. (emit_module_exit,emit_probe): Ditto, with most meat here. 2006-12-29 Frank Ch. Eigler PR 3523. * buildok/fourteen.stp, fourteen-plus.stp: Tweak & add a test. * systemtap.base/bench.stp: Work around randomized-ordered probes. * systemtap.base/bench.exp: Tighten output requirements. --- testsuite/ChangeLog | 7 +++++++ testsuite/buildok/fourteen-plus.stp | 27 +++++++++++++++++++++++++++ testsuite/buildok/fourteen.stp | 3 +++ testsuite/systemtap.base/bench.exp | 2 +- testsuite/systemtap.base/bench.stp | 2 +- 5 files changed, 39 insertions(+), 2 deletions(-) create mode 100755 testsuite/buildok/fourteen-plus.stp (limited to 'testsuite') diff --git a/testsuite/ChangeLog b/testsuite/ChangeLog index 6a64e636..f0f0f0c4 100644 --- a/testsuite/ChangeLog +++ b/testsuite/ChangeLog @@ -1,3 +1,10 @@ +2006-12-29 Frank Ch. Eigler + + PR 3523. + * buildok/fourteen.stp, fourteen-plus.stp: Tweak & add a test. + * systemtap.base/bench.stp: Work around randomized-ordered probes. + * systemtap.base/bench.exp: Tighten output requirements. + 2006-12-22 Josh Stone * buildok/array_size.stp, parseko/array01.stp, parseko/array02.stp, diff --git a/testsuite/buildok/fourteen-plus.stp b/testsuite/buildok/fourteen-plus.stp new file mode 100755 index 00000000..781cc41d --- /dev/null +++ b/testsuite/buildok/fourteen-plus.stp @@ -0,0 +1,27 @@ +#! stap -tp4 + +# NB: beyond just checking for timer compilability, this test also plays +# with duplicate probe elimination logic. See also fourteen+.stp + +global i, j +probe timer.jiffies(100) { i++ } +probe timer.jiffies(100).randomize(100) { j++ } +probe timer.s(100) { i++ } +probe timer.s(100).randomize(100) { j++ } +probe timer.sec(100) { i++ } +probe timer.sec(100).randomize(100) { j++ } +probe timer.ms(100) { i++ } +probe timer.ms(100).randomize(100) { j++ } +probe timer.msec(100) { i++ } +probe timer.msec(100).randomize(100) { j++ } +probe timer.us(100) { i++ } +probe timer.us(100).randomize(100) { j++ } +probe timer.usec(100) { i++ } +probe timer.usec(100).randomize(100) { j++ } +probe timer.ns(100000) { i++ } +probe timer.ns(100000).randomize(100) { j++ } +probe timer.nsec(100000) { i++ } +probe timer.nsec(100000).randomize(100) { j++ } +probe timer.hz(100) { i++ } +probe timer.profile { i++ } +probe end { printf("i=%d j=%d\n", i, j) } diff --git a/testsuite/buildok/fourteen.stp b/testsuite/buildok/fourteen.stp index 86b3dad2..2a7b6001 100755 --- a/testsuite/buildok/fourteen.stp +++ b/testsuite/buildok/fourteen.stp @@ -1,5 +1,8 @@ #! stap -p4 +# NB: beyond just checking for timer compilability, this test also plays +# with duplicate probe elimination logic. See also fourteen+.stp + global i, j probe timer.jiffies(100) { i++ } probe timer.jiffies(100).randomize(100) { j++ } diff --git a/testsuite/systemtap.base/bench.exp b/testsuite/systemtap.base/bench.exp index bc3b28bb..4863a00c 100644 --- a/testsuite/systemtap.base/bench.exp +++ b/testsuite/systemtap.base/bench.exp @@ -11,4 +11,4 @@ expect { eof { } } wait -if {$ok > 10} { pass "$test ($ok)" } { fail "$test ($ok)" } +if {$ok == 15} { pass "$test ($ok)" } { fail "$test ($ok)" } diff --git a/testsuite/systemtap.base/bench.stp b/testsuite/systemtap.base/bench.stp index 0568bc97..915b8a5e 100644 --- a/testsuite/systemtap.base/bench.stp +++ b/testsuite/systemtap.base/bench.stp @@ -28,4 +28,4 @@ probe test.statcount = repeat {@count(gS)} probe test.statcount {} probe test.nnarrassmt = repeat {gnn[1] = 1} probe test.nnarrassmt {} global gnn probe test.ssarrassmt = repeat {gss["foo"] = "bar"} probe test.ssarrassmt {} global gss -probe begin { exit () } +probe begin(9999 /* ... after all the others! */) { exit () } -- cgit