Closed
Bug 1190446
Opened 9 years ago
Closed 9 years ago
Add Code Coverage support to Baseline.
Categories
(Core :: JavaScript Engine: JIT, defect)
Core
JavaScript Engine: JIT
Tracking
()
RESOLVED
FIXED
mozilla43
People
(Reporter: nbp, Assigned: nbp)
References
(Blocks 1 open bug)
Details
Attachments
(1 file, 1 obsolete file)
(deleted),
patch
|
jandem
:
review+
|
Details | Diff | Splinter Review |
Currently PCCounts is only in the Interpreter, we should also update the counters in Baseline too, such that we can avoid slowing down the execution by staying in the Interpreter.
Assignee | ||
Comment 1•9 years ago
|
||
This patch updates the numExec counters of the PCCounts, while running in
Baseline. With the current scheme of updating the numExec counter for each
bytecode, this puts the overhead to 11% of the non-instrumented execution
(on the jsreftest execution).
Attachment #8642470 -
Flags: review?(jdemooij)
Comment 2•9 years ago
|
||
Comment on attachment 8642470 [details] [diff] [review]
Update Coverage information in Baseline.
Review of attachment 8642470 [details] [diff] [review]:
-----------------------------------------------------------------
::: js/src/jit/BaselineCompiler.cpp
@@ +808,5 @@
> +BaselineCompiler::emitCoverage(jsbytecode* pc)
> +{
> + double* counterAddr = &script->getPCCounts(pc).numExec();
> + AllocatableRegisterSet regs(RegisterSet::Volatile());
> + Register counterAddrReg = regs.takeAnyGeneral();
We can keep stack values in R0/R1 between ops, I think using counterAddrReg without saving it could clobber those. Fortunately you can use R2.scratchReg(), it should be available.
@@ +972,5 @@
> // Emit traps for breakpoints and step mode.
> if (compileDebugInstrumentation_ && !emitDebugTrap())
> return Method_Error;
>
> + // Emit code coverage code, to fill the same data as the interepreter.
interpreter
@@ +974,5 @@
> return Method_Error;
>
> + // Emit code coverage code, to fill the same data as the interepreter.
> + if (compileCoverage && !emitCoverage(pc))
> + return Method_Error;
emitCoverage always returns true so we can just change this to:
if (...)
emitCoverage();
Attachment #8642470 -
Flags: review?(jdemooij)
Assignee | ||
Comment 3•9 years ago
|
||
Side note, the code of emitCovergae is later replaced by an int64 increment, in Bug 1190454.
Attachment #8642470 -
Attachment is obsolete: true
Attachment #8646463 -
Flags: review?(jdemooij)
Updated•9 years ago
|
Attachment #8646463 -
Flags: review?(jdemooij) → review+
Assignee | ||
Comment 4•9 years ago
|
||
Comment 6•9 years ago
|
||
Status: NEW → RESOLVED
Closed: 9 years ago
status-firefox43:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla43
You need to log in
before you can comment on or make changes to this bug.
Description
•