Title: [198975] trunk/Source/_javascript_Core
Revision
198975
Author
[email protected]
Date
2016-04-02 14:14:08 -0700 (Sat, 02 Apr 2016)

Log Message

[JSC] Add an option to avoid disassembling baseline code for the JSC Profiler
https://bugs.webkit.org/show_bug.cgi?id=156127

Patch by Benjamin Poulain <[email protected]> on 2016-04-02
Reviewed by Mark Lam.

The profiler run out of memory on big programs if you dump
the baseline disassembly.

* jit/JIT.cpp:
(JSC::JIT::privateCompile):
* runtime/Options.h:

Modified Paths

Diff

Modified: trunk/Source/_javascript_Core/ChangeLog (198974 => 198975)


--- trunk/Source/_javascript_Core/ChangeLog	2016-04-02 20:01:34 UTC (rev 198974)
+++ trunk/Source/_javascript_Core/ChangeLog	2016-04-02 21:14:08 UTC (rev 198975)
@@ -1,3 +1,17 @@
+2016-04-02  Benjamin Poulain  <[email protected]>
+
+        [JSC] Add an option to avoid disassembling baseline code for the JSC Profiler
+        https://bugs.webkit.org/show_bug.cgi?id=156127
+
+        Reviewed by Mark Lam.
+
+        The profiler run out of memory on big programs if you dump
+        the baseline disassembly.
+
+        * jit/JIT.cpp:
+        (JSC::JIT::privateCompile):
+        * runtime/Options.h:
+
 2016-04-02  Dan Bernstein  <[email protected]>
 
         jsc binary embedded in relocatable _javascript_Core.framework links against system _javascript_Core.framework

Modified: trunk/Source/_javascript_Core/jit/JIT.cpp (198974 => 198975)


--- trunk/Source/_javascript_Core/jit/JIT.cpp	2016-04-02 20:01:34 UTC (rev 198974)
+++ trunk/Source/_javascript_Core/jit/JIT.cpp	2016-04-02 21:14:08 UTC (rev 198975)
@@ -515,7 +515,7 @@
     if (m_vm->typeProfiler())
         m_vm->typeProfilerLog()->processLogEntries(ASCIILiteral("Preparing for JIT compilation."));
     
-    if (Options::dumpDisassembly() || m_vm->m_perBytecodeProfiler)
+    if (Options::dumpDisassembly() || (m_vm->m_perBytecodeProfiler && Options::disassembleBaselineForProfiler()))
         m_disassembler = std::make_unique<JITDisassembler>(m_codeBlock);
     if (m_vm->m_perBytecodeProfiler) {
         m_compilation = adoptRef(
@@ -716,7 +716,8 @@
         patchBuffer.didAlreadyDisassemble();
     }
     if (m_compilation) {
-        m_disassembler->reportToProfiler(m_compilation.get(), patchBuffer);
+        if (Options::disassembleBaselineForProfiler())
+            m_disassembler->reportToProfiler(m_compilation.get(), patchBuffer);
         m_vm->m_perBytecodeProfiler->addCompilation(m_compilation);
     }
 

Modified: trunk/Source/_javascript_Core/runtime/Options.h (198974 => 198975)


--- trunk/Source/_javascript_Core/runtime/Options.h	2016-04-02 20:01:34 UTC (rev 198974)
+++ trunk/Source/_javascript_Core/runtime/Options.h	2016-04-02 21:14:08 UTC (rev 198975)
@@ -208,6 +208,7 @@
     v(int32, priorityDeltaOfFTLCompilerThreads, computePriorityDeltaOfWorkerThreads(-2, 0), nullptr) \
     \
     v(bool, useProfiler, false, nullptr) \
+    v(bool, disassembleBaselineForProfiler, true, nullptr) \
     \
     v(bool, useArchitectureSpecificOptimizations, true, nullptr) \
     \
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to