Commit c121fa51 authored by Kevin Modzelewski's avatar Kevin Modzelewski

Have the tester print out failed stats

I think the issue though was that I had tried to optimize the
heuristic for "can this be a patchpoint" to be too aggressive and
we were getting false negatives on the release build (but not the
debug build).
parent 7529462c
...@@ -1673,7 +1673,7 @@ Rewriter* Rewriter::createRewriter(void* rtn_addr, int num_args, const char* deb ...@@ -1673,7 +1673,7 @@ Rewriter* Rewriter::createRewriter(void* rtn_addr, int num_args, const char* deb
// Horrible non-robust optimization: addresses below this address are probably in the binary (ex the interpreter), // Horrible non-robust optimization: addresses below this address are probably in the binary (ex the interpreter),
// so don't do the more-expensive hash table lookup to find it. // so don't do the more-expensive hash table lookup to find it.
if (rtn_addr > (void*)0x1800000) { if (rtn_addr > (void*)0x1000000) {
ic = getICInfo(rtn_addr); ic = getICInfo(rtn_addr);
} else { } else {
ASSERT(!getICInfo(rtn_addr), "%p", rtn_addr); ASSERT(!getICInfo(rtn_addr), "%p", rtn_addr);
......
...@@ -365,21 +365,29 @@ def determine_test_result(fn, opts, code, out, stderr, elapsed): ...@@ -365,21 +365,29 @@ def determine_test_result(fn, opts, code, out, stderr, elapsed):
if opts.expected == "statfail": if opts.expected == "statfail":
r += ("(expected statfailure)",) r += ("(expected statfailure)",)
break break
elif KEEP_GOING:
failed.append(fn)
return r + ("\033[31mFailed statcheck\033[0m",)
else: else:
msg = ()
m = re.match("""stats\[['"]([\w_]+)['"]]""", l) m = re.match("""stats\[['"]([\w_]+)['"]]""", l)
if m: if m:
statname = m.group(1) statname = m.group(1)
raise Exception((l, statname, stats[statname])) msg = (l, statname, stats[statname])
m = re.search("""noninit_count\(['"]([\w_]+)['"]\)""", l) m = re.search("""noninit_count\(['"]([\w_]+)['"]\)""", l)
if m: if m and not msg:
statname = m.group(1) statname = m.group(1)
raise Exception((l, statname, noninit_count(statname))) msg = (l, statname, noninit_count(statname))
raise Exception((l, stats)) if not msg:
msg = (l, stats)
elif KEEP_GOING:
failed.append(fn)
if VERBOSE:
return r + ("\033[31mFailed statcheck\033[0m\n%s" % (msg,),)
else:
return r + ("\033[31mFailed statcheck\033[0m",)
else:
raise Exception(msg)
else: else:
# only can get here if all statchecks passed # only can get here if all statchecks passed
if opts.expected == "statfail": if opts.expected == "statfail":
...@@ -387,7 +395,7 @@ def determine_test_result(fn, opts, code, out, stderr, elapsed): ...@@ -387,7 +395,7 @@ def determine_test_result(fn, opts, code, out, stderr, elapsed):
failed.append(fn) failed.append(fn)
return r + ("\033[31mUnexpected statcheck success\033[0m",) return r + ("\033[31mUnexpected statcheck success\033[0m",)
else: else:
raise Exception(("Unexpected statcheck success!", statchecks, stats)) raise Exception(("Unexpected statcheck success!", opts.statchecks, stats))
else: else:
r += ("(ignoring stats)",) r += ("(ignoring stats)",)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment