Bug 1083694 - TraceLogger: Part 4: Make it possible to log inlined IonMonkey frames, r=bbouvier
☠☠ backed out by b1d19c5ce715 ☠ ☠
authorHannes Verschore <hv1989@gmail.com>
Thu, 20 Nov 2014 17:44:04 +0100
changeset 216678 83acb541d44a672ff6c661617a727f8f13806d05
parent 216677 59f15435d8deb46f043b017c70622c9a81fe88ca
child 216679 aafd058bcab19ced5082a53d1e8462dd745b0339
push id27858
push userkwierso@gmail.com
push dateFri, 21 Nov 2014 01:35:46 +0000
treeherdermozilla-central@6309710dd71d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbbouvier
bugs1083694
milestone36.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 1083694 - TraceLogger: Part 4: Make it possible to log inlined IonMonkey frames, r=bbouvier
js/src/jit/IonBuilder.cpp
js/src/vm/Debugger.cpp
js/src/vm/TraceLogging.cpp
js/src/vm/TraceLoggingTypes.h
--- a/js/src/jit/IonBuilder.cpp
+++ b/js/src/jit/IonBuilder.cpp
@@ -16,16 +16,17 @@
 #include "jit/Ion.h"
 #include "jit/IonOptimizationLevels.h"
 #include "jit/JitSpewer.h"
 #include "jit/Lowering.h"
 #include "jit/MIRGraph.h"
 #include "vm/ArgumentsObject.h"
 #include "vm/Opcodes.h"
 #include "vm/RegExpStatics.h"
+#include "vm/TraceLogging.h"
 
 #include "jsinferinlines.h"
 #include "jsobjinlines.h"
 #include "jsopcodeinlines.h"
 #include "jsscriptinlines.h"
 
 #include "jit/CompileInfo-inl.h"
 #include "jit/ExecutionMode-inl.h"
@@ -337,16 +338,21 @@ IonBuilder::DontInline(JSScript *targetS
 }
 
 IonBuilder::InliningDecision
 IonBuilder::canInlineTarget(JSFunction *target, CallInfo &callInfo)
 {
     if (!optimizationInfo().inlineInterpreted())
         return InliningDecision_DontInline;
 
+    if (TraceLogTextIdEnabled(TraceLogger_InlinedScripts)) {
+        return DontInline(nullptr, "Tracelogging of inlined scripts is enabled"
+                                   "but Tracelogger cannot do that yet.");
+    }
+
     if (!target->isInterpreted())
         return DontInline(nullptr, "Non-interpreted target");
 
     // Allow constructing lazy scripts when performing the definite properties
     // analysis, as baseline has not been used to warm the caller up yet.
     if (target->isInterpreted() && info().executionMode() == DefinitePropertiesAnalysis) {
         RootedScript script(analysisContext, target->getOrCreateScript(analysisContext));
         if (!script)
--- a/js/src/vm/Debugger.cpp
+++ b/js/src/vm/Debugger.cpp
@@ -3907,16 +3907,17 @@ Debugger::drainTraceLogger(JSContext *cx
 bool
 Debugger::setupTraceLoggerScriptCalls(JSContext *cx, unsigned argc, Value *vp)
 {
     THIS_DEBUGGER(cx, argc, vp, "setupTraceLoggerScriptCalls", args, dbg);
     if (!args.requireAtLeast(cx, "Debugger.setupTraceLoggerScriptCalls", 0))
         return false;
 
     TraceLogEnableTextId(cx, TraceLogger_Scripts);
+    TraceLogEnableTextId(cx, TraceLogger_InlinedScripts);
     TraceLogDisableTextId(cx, TraceLogger_AnnotateScripts);
 
     args.rval().setBoolean(true);
 
     return true;
 }
 
 bool
--- a/js/src/vm/TraceLogging.cpp
+++ b/js/src/vm/TraceLogging.cpp
@@ -336,17 +336,18 @@ TraceLoggerThread::createTextId(const ch
 
     return textId;
 }
 
 uint32_t
 TraceLoggerThread::createTextId(TraceLoggerTextId type, const char *filename, size_t lineno,
                                 size_t colno, const void *ptr)
 {
-    MOZ_ASSERT(type == TraceLogger_Scripts || type == TraceLogger_AnnotateScripts);
+    MOZ_ASSERT(type == TraceLogger_Scripts || type == TraceLogger_AnnotateScripts ||
+               type == TraceLogger_InlinedScripts);
 
     if (!filename)
         filename = "<unknown>";
 
     assertNoQuotes(filename);
 
     // Only log scripts when enabled otherwise return the global Scripts textId,
     // which will get filtered out.
--- a/js/src/vm/TraceLoggingTypes.h
+++ b/js/src/vm/TraceLoggingTypes.h
@@ -15,23 +15,24 @@
     _(Baseline)                                       \
     _(BaselineCompilation)                            \
     _(Engine)                                         \
     _(GC)                                             \
     _(GCAllocation)                                   \
     _(GCSweeping)                                     \
     _(Internal)                                       \
     _(Interpreter)                                    \
+    _(InlinedScripts)                                 \
     _(Invalidation)                                   \
-    _(IrregexpCompile)                                \
-    _(IrregexpExecute)                                \
     _(IonCompilation)                                 \
     _(IonCompilationPaused)                           \
     _(IonLinking)                                     \
     _(IonMonkey)                                      \
+    _(IrregexpCompile)                                \
+    _(IrregexpExecute)                                \
     _(MinorGC)                                        \
     _(ParserCompileFunction)                          \
     _(ParserCompileLazy)                              \
     _(ParserCompileScript)                            \
     _(Scripts)                                        \
     _(VM)                                             \
                                                       \
     /* Specific passes during ion compilation */      \