From 9012e89f2c17fddccac864f366af495ba7703f9b Mon Sep 17 00:00:00 2001 From: hunt Date: Tue, 15 Jan 2008 19:54:25 +0000 Subject: PR4037 and fixes to better synchronize staprun and stapio. --- runtime/bench2/bench.rb | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) (limited to 'runtime/bench2') diff --git a/runtime/bench2/bench.rb b/runtime/bench2/bench.rb index a671b582..b3e30204 100644 --- a/runtime/bench2/bench.rb +++ b/runtime/bench2/bench.rb @@ -138,9 +138,8 @@ class Bench end def load - args = "-q" - fork do exec "sudo #{@@staprun} #{args} -o #{@outfile} #{@dir}/bench.ko &> #{@dir}/xxx.out" end - sleep 10 + fork do exec "sudo #{@@staprun} -o #{@outfile} #{@dir}/bench.ko &> #{@dir}/xxx.out" end + sleep 5 end def compile @@ -287,10 +286,8 @@ class Stapbench < Bench protected def load - args = "-vv -DSTP_NO_OVERLOAD" - if @trans == BULK then args = "-bvv -DSTP_NO_OVERLOAD" end - fork do exec "stap #{args} -o #{@outfile} bench.stp &> xxx.out" end - sleep 30 + fork do exec "sudo #{@@staprun} bench.ko &> xxx.out" end + sleep 5 end def compile @@ -316,6 +313,14 @@ class Stapbench < Bench else puts "NO CODE!" end + args = "-p4 -vv -DSTP_NO_OVERLOAD" + if @trans == BULK then args = "-p4 -bvv -DSTP_NO_OVERLOAD" end + `stap #{args} -m bench.ko bench.stp &> xxx.out` + if ($? != 0) + puts "compile failed. status=#{$?}" + system("tail xxx.out") + exit + end end - + end -- cgit