зеркало из https://github.com/mozilla/gecko-dev.git
Bug 841646 - Part 3: Move SPSProfiler::slowAssertionsEnabled checks to JitCompileOptions and remove SPSInstrumentation::slowAssertions. r=jandem
This commit is contained in:
Родитель
97e7d40ed8
Коммит
0d21cdb8d3
|
@ -7754,7 +7754,7 @@ CodeGenerator::visitFunctionBoundary(LFunctionBoundary *lir)
|
|||
// fallthrough
|
||||
|
||||
case MFunctionBoundary::Enter:
|
||||
if (sps_.slowAssertions()) {
|
||||
if (gen->options.spsSlowAssertionsEnabled()) {
|
||||
saveLive(lir);
|
||||
pushArg(ImmGCPtr(lir->script()));
|
||||
if (!callVM(SPSEnterInfo, lir))
|
||||
|
@ -7775,7 +7775,7 @@ CodeGenerator::visitFunctionBoundary(LFunctionBoundary *lir)
|
|||
return true;
|
||||
|
||||
case MFunctionBoundary::Exit:
|
||||
if (sps_.slowAssertions()) {
|
||||
if (gen->options.spsSlowAssertionsEnabled()) {
|
||||
saveLive(lir);
|
||||
pushArg(ImmGCPtr(lir->script()));
|
||||
// Once we've exited, then we shouldn't emit instrumentation for
|
||||
|
|
|
@ -254,7 +254,8 @@ AutoLockForCompilation::AutoLockForCompilation(CompileCompartment *compartment
|
|||
#endif
|
||||
|
||||
JitCompileOptions::JitCompileOptions()
|
||||
: cloneSingletons_(false)
|
||||
: cloneSingletons_(false),
|
||||
spsSlowAssertionsEnabled_(false)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -262,4 +263,6 @@ JitCompileOptions::JitCompileOptions(JSContext *cx)
|
|||
{
|
||||
JS::CompartmentOptions &options = cx->compartment()->options();
|
||||
cloneSingletons_ = options.cloneSingletons(cx);
|
||||
spsSlowAssertionsEnabled_ = cx->runtime()->spsProfiler.enabled() &&
|
||||
cx->runtime()->spsProfiler.slowAssertionsEnabled();
|
||||
}
|
||||
|
|
|
@ -128,8 +128,13 @@ class JitCompileOptions
|
|||
return cloneSingletons_;
|
||||
}
|
||||
|
||||
bool spsSlowAssertionsEnabled() const {
|
||||
return spsSlowAssertionsEnabled_;
|
||||
}
|
||||
|
||||
private:
|
||||
bool cloneSingletons_;
|
||||
bool spsSlowAssertionsEnabled_;
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -3275,8 +3275,7 @@ LIRGenerator::visitFunctionBoundary(MFunctionBoundary *ins)
|
|||
return false;
|
||||
// If slow assertions are enabled, then this node will result in a callVM
|
||||
// out to a C++ function for the assertions, so we will need a safepoint.
|
||||
return !GetIonContext()->runtime->spsProfiler().slowAssertionsEnabled() ||
|
||||
assignSafepoint(lir, ins);
|
||||
return !gen->options.spsSlowAssertionsEnabled() || assignSafepoint(lir, ins);
|
||||
}
|
||||
|
||||
bool
|
||||
|
|
|
@ -292,7 +292,6 @@ class SPSInstrumentation
|
|||
/* Small proxies around SPSProfiler */
|
||||
bool enabled() { return profiler_ && profiler_->enabled(); }
|
||||
SPSProfiler *profiler() { JS_ASSERT(enabled()); return profiler_; }
|
||||
bool slowAssertions() { return enabled() && profiler_->slowAssertionsEnabled(); }
|
||||
|
||||
/* Signals an inline function returned, reverting to the previous state */
|
||||
void leaveInlineFrame() {
|
||||
|
|
Загрузка…
Ссылка в новой задаче