Closed Bug 636544 Opened 10 years ago Closed 10 years ago
Some js/src/tests that check tracemonkey stats fail with just -j -m
The command line python tests/jstests.py -so --args="-j -m" $OBJDIR/js reports a dozen or so failures on tests that look at tracemonkey stats. Bill says these tests should only run under plain -j or '-j -m -a', not under '-j -m'.
I noticed two things going wrong here. The first is a bug in the way that we computed how many iterations to run in the methodjit before trying the trace hook. Before, we took the tracer/profiler's HOTLOOP value and then subtracted the number of iterations we already spent in the interpreter before switching to the methodjit. However, if HOTLOOP is 1 (as it is when the profiler is off), and if we've already spent 15 iterations in the interpreter, we get a negative number. It's unsigned, so it's actually a really big number. So we basically never run the tracer. I fixed it in this case to go directly to the tracer. The other problem is that there are some jstests that run for a few iterations and then check that we actually traced. I fixed these for the profiler, but I forgot to do it for the adaptive methodjit compilation. So this patch does that, by adding a flag called "adaptive" that you can query. It is true if the profiler is running or if always_methodjit is false.
Attachment #518753 - Flags: review?(dmandelin)
Attachment #518753 - Flags: review?(dmandelin) → review+
(In reply to comment #1) > So we basically never run the tracer. Does this affect Firefox 4? Too late to change it if so, but would be good to know.
(In reply to comment #3) > Does this affect Firefox 4? Too late to change it if so, but would be good to > know. Unfortunately, yes, it affects Firefox 4. It's probably only a big deal if we're trying to track down performance faults. But we usually do that on trunk anyway.
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.