From fa60355b7aacd1f4b10f1497792787288c0632ff Mon Sep 17 00:00:00 2001 From: hunt Date: Wed, 13 Jul 2005 06:34:00 +0000 Subject: 2005-07-12 Martin Hunt * bench/run_bench (do_time): Use ttest instead of "time". Fix processor computation. * bench/ttest.c: Like "time.c" except takes an argument to adjust loop size. Also computes system time + user time instead of real time. Added a warmup loop to get consistent results from cpus which adjust speed based on load. * bench/time.c: Replaced by ttest.c --- runtime/probes/bench/bench.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'runtime/probes/bench/bench.c') diff --git a/runtime/probes/bench/bench.c b/runtime/probes/bench/bench.c index adbe01d4..bbdc3170 100644 --- a/runtime/probes/bench/bench.c +++ b/runtime/probes/bench/bench.c @@ -37,11 +37,10 @@ static struct kprobe kp[] = { int probe_start(void) { - int ret; - ret = _stp_register_jprobes (jp, NUM_JPROBES); + int ret = _stp_register_jprobes (jp, NUM_JPROBES); if (ret >= 0) if ((ret = _stp_register_kprobes (kp, NUM_KPROBES)) < 0) - _stp_unregister_jprobes (jp, NUM_JPROBES) ; + _stp_unregister_jprobes (jp, NUM_JPROBES); return ret; } -- cgit