Bug 1550807 - Load the baselinescript into scratch1 before calling emitTraceLoggerResume r=jandem
authorDenis Palmeiro <dpalmeiro@mozilla.com>
Mon, 13 May 2019 16:20:20 +0000
changeset 532510 419436973f91a86cee1fb0523be60f5b131847b4
parent 532509 7db0ea895005973d998409c051d9d7e69c2a896b
child 532511 b1c78bd9fdc280ce52f84e105321a79a89e2177a
push id11268
push usercsabou@mozilla.com
push dateTue, 14 May 2019 15:24:22 +0000
treeherdermozilla-beta@5fb7fcd568d6 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjandem
bugs1550807
milestone68.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1550807 - Load the baselinescript into scratch1 before calling emitTraceLoggerResume r=jandem Tracelogger is no longer functioning properly because of bad script event ids. The baselinescript load into scratch1 was accidentally removed leading garbage script ids to be passed into emitTraceLoggerResume. This fix aims to simply reload the correct value back into scratch1 before calling tracelogger. Differential Revision: https://phabricator.services.mozilla.com/D30680
js/src/jit/BaselineCompiler.cpp
--- a/js/src/jit/BaselineCompiler.cpp
+++ b/js/src/jit/BaselineCompiler.cpp
@@ -5774,28 +5774,31 @@ bool BaselineCodeGen<Handler>::emitGener
 
   // Branch to interpret if the script does not have a TypeScript or
   // BaselineScript (depending on whether the Baseline Interpreter is enabled).
   // Note that we don't relazify generator scripts, so the function is
   // guaranteed to be non-lazy.
   Label interpret;
   Register scratch1 = regs.takeAny();
   masm.loadPtr(Address(callee, JSFunction::offsetOfScript()), scratch1);
+  Address baselineAddr(scratch1, JSScript::offsetOfBaselineScript());
   if (JitOptions.baselineInterpreter) {
     Address typesAddr(scratch1, JSScript::offsetOfTypes());
     masm.branchPtr(Assembler::Equal, typesAddr, ImmPtr(nullptr), &interpret);
   } else {
-    Address baselineAddr(scratch1, JSScript::offsetOfBaselineScript());
     masm.branchPtr(Assembler::BelowOrEqual, baselineAddr,
                    ImmPtr(BASELINE_DISABLED_SCRIPT), &interpret);
   }
 
 #ifdef JS_TRACE_LOGGING
-  if (JS::TraceLoggerSupported() && !emitTraceLoggerResume(scratch1, regs)) {
-    return false;
+  if (JS::TraceLoggerSupported()) {
+    masm.loadPtr(baselineAddr, scratch1);
+    if (!emitTraceLoggerResume(scratch1, regs)) {
+      return false;
+    }
   }
 #endif
 
   // Push |undefined| for all formals.
   Register scratch2 = regs.takeAny();
   Label loop, loopDone;
   masm.load16ZeroExtend(Address(callee, JSFunction::offsetOfNargs()), scratch2);
   masm.bind(&loop);