From: Nicholas Nethercote Date: Thu, 26 Feb 2009 22:26:45 +0000 (+0000) Subject: Merge r9283 (lackey testing fixes) from the DARWIN branch. X-Git-Tag: svn/VALGRIND_3_5_0~912 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=c070233e7761f4d55fe4397f00196c673a5bc6c4;p=thirdparty%2Fvalgrind.git Merge r9283 (lackey testing fixes) from the DARWIN branch. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9284 --- diff --git a/lackey/lk_main.c b/lackey/lk_main.c index dd502c5bd7..81467106ae 100644 --- a/lackey/lk_main.c +++ b/lackey/lk_main.c @@ -886,12 +886,12 @@ static void lk_fini(Int exitcode) VG_(message)(Vg_UserMsg, ""); VG_(message)(Vg_UserMsg, "Ratios:"); tl_assert(n_SBs_entered); // Paranoia time. - VG_(message)(Vg_UserMsg, " guest instrs : SB entered = %3llu : 10", + VG_(message)(Vg_UserMsg, " guest instrs : SB entered = %'llu : 10", 10 * n_guest_instrs / n_SBs_entered); - VG_(message)(Vg_UserMsg, " IRStmts : SB entered = %3llu : 10", + VG_(message)(Vg_UserMsg, " IRStmts : SB entered = %'llu : 10", 10 * n_IRStmts / n_SBs_entered); tl_assert(n_guest_instrs); // Paranoia time. - VG_(message)(Vg_UserMsg, " IRStmts : guest instr = %3llu : 10", + VG_(message)(Vg_UserMsg, " IRStmts : guest instr = %'llu : 10", 10 * n_IRStmts / n_guest_instrs); } diff --git a/lackey/tests/filter_stderr b/lackey/tests/filter_stderr index 94c488100d..b3df7f2af3 100755 --- a/lackey/tests/filter_stderr +++ b/lackey/tests/filter_stderr @@ -7,28 +7,5 @@ $dir/../../tests/filter_stderr_basic | # Remove "Lackey, ..." line and the following copyright line. sed "/^Lackey, an example Valgrind tool./ , /./ d" | -# Output looks like this... -# -# Counted 53 calls to _dl_runtime_resolve() -# -# Executed: -# BBs: 47131 -# x86 instrs: 193330 -# UInstrs: 523996 -# -# Jccs: -# total: 36368 -# % taken: 58% -# -# Ratios: -# x86 instrs : BB = 41 : 10 -# UInstrs : BB = 111 : 10 -# UInstrs : x86_instr = 27 : 10 -# -# Exit code: 0 -# -# ...so chop all lines between first and last (inclusive) -sed "/^Counted [0-9]\+ calls to _dl_runtime_resolve()$/ , \ - /UInstrs : x86_instrs = [0-9]\+ : [0-9]\+/ \ - d" - +# Filter all the numbers. +../../tests/filter_numbers diff --git a/lackey/tests/true.stderr.exp b/lackey/tests/true.stderr.exp index 139597f9cb..9b568f4c55 100644 --- a/lackey/tests/true.stderr.exp +++ b/lackey/tests/true.stderr.exp @@ -1,2 +1,20 @@ +Counted ... calls to _dl_runtime_resolve() + +Jccs: + total: ... + taken: ... ( ...%) + +Executed: + SBs entered: ... + SBs completed: ... + guest instrs: ... + IRStmts: ... + +Ratios: + guest instrs : SB entered = ... : ... + IRStmts : SB entered = ... : ... + IRStmts : guest instr = ... : ... + +Exit code: ... diff --git a/tests/filter_numbers b/tests/filter_numbers index b569353606..f98d8c2fc5 100755 --- a/tests/filter_numbers +++ b/tests/filter_numbers @@ -1,3 +1,3 @@ #!/bin/sh -sed 's/[0-9]*/./' +perl -p -e 's/[0-9,]+/.../g'