Title: [239188] trunk/Source/_javascript_Core
- Revision
- 239188
- Author
- [email protected]
- Date
- 2018-12-13 16:53:11 -0800 (Thu, 13 Dec 2018)
Log Message
Add the JSC_traceBaselineJITExecution option for tracing baseline JIT execution.
https://bugs.webkit.org/show_bug.cgi?id=192684
Reviewed by Saam Barati.
This dataLogs the bytecode execution order of baseline JIT code when the
JSC_traceBaselineJITExecution option is true.
* jit/JIT.cpp:
(JSC::JIT::privateCompileMainPass):
(JSC::JIT::privateCompileSlowCases):
* runtime/Options.h:
Modified Paths
Diff
Modified: trunk/Source/_javascript_Core/ChangeLog (239187 => 239188)
--- trunk/Source/_javascript_Core/ChangeLog 2018-12-14 00:19:23 UTC (rev 239187)
+++ trunk/Source/_javascript_Core/ChangeLog 2018-12-14 00:53:11 UTC (rev 239188)
@@ -1,3 +1,18 @@
+2018-12-13 Mark Lam <[email protected]>
+
+ Add the JSC_traceBaselineJITExecution option for tracing baseline JIT execution.
+ https://bugs.webkit.org/show_bug.cgi?id=192684
+
+ Reviewed by Saam Barati.
+
+ This dataLogs the bytecode execution order of baseline JIT code when the
+ JSC_traceBaselineJITExecution option is true.
+
+ * jit/JIT.cpp:
+ (JSC::JIT::privateCompileMainPass):
+ (JSC::JIT::privateCompileSlowCases):
+ * runtime/Options.h:
+
2018-12-13 David Kilzer <[email protected]>
clang-tidy: Fix unnecessary object copies in _javascript_Core
Modified: trunk/Source/_javascript_Core/jit/JIT.cpp (239187 => 239188)
--- trunk/Source/_javascript_Core/jit/JIT.cpp 2018-12-14 00:19:23 UTC (rev 239187)
+++ trunk/Source/_javascript_Core/jit/JIT.cpp 2018-12-14 00:53:11 UTC (rev 239188)
@@ -44,6 +44,7 @@
#include "MaxFrameExtentForSlowPathCall.h"
#include "ModuleProgramCodeBlock.h"
#include "PCToCodeOriginMap.h"
+#include "ProbeContext.h"
#include "ProfilerDatabase.h"
#include "ProgramCodeBlock.h"
#include "ResultType.h"
@@ -269,6 +270,14 @@
updateTopCallFrame();
unsigned bytecodeOffset = m_bytecodeOffset;
+#if ENABLE(MASM_PROBE)
+ if (UNLIKELY(Options::traceBaselineJITExecution())) {
+ CodeBlock* codeBlock = m_codeBlock;
+ probe([=] (Probe::Context& ctx) {
+ dataLogLn("JIT [", bytecodeOffset, "] ", opcodeNames[opcodeID], " cfr ", RawPointer(ctx.fp()), " @ ", codeBlock);
+ });
+ }
+#endif
switch (opcodeID) {
DEFINE_SLOW_OP(in_by_val)
@@ -493,6 +502,17 @@
if (m_disassembler)
m_disassembler->setForBytecodeSlowPath(m_bytecodeOffset, label());
+#if ENABLE(MASM_PROBE)
+ if (UNLIKELY(Options::traceBaselineJITExecution())) {
+ OpcodeID opcodeID = currentInstruction->opcodeID();
+ unsigned bytecodeOffset = m_bytecodeOffset;
+ CodeBlock* codeBlock = m_codeBlock;
+ probe([=] (Probe::Context& ctx) {
+ dataLogLn("JIT [", bytecodeOffset, "] SLOW ", opcodeNames[opcodeID], " cfr ", RawPointer(ctx.fp()), " @ ", codeBlock);
+ });
+ }
+#endif
+
switch (currentInstruction->opcodeID()) {
DEFINE_SLOWCASE_OP(op_add)
DEFINE_SLOWCASE_OP(op_call)
Modified: trunk/Source/_javascript_Core/runtime/Options.h (239187 => 239188)
--- trunk/Source/_javascript_Core/runtime/Options.h 2018-12-14 00:19:23 UTC (rev 239187)
+++ trunk/Source/_javascript_Core/runtime/Options.h 2018-12-14 00:53:11 UTC (rev 239188)
@@ -507,6 +507,7 @@
v(bool, useTracePoints, false, Normal, nullptr) \
v(bool, traceLLIntExecution, false, Configurable, nullptr) \
v(bool, traceLLIntSlowPath, false, Configurable, nullptr) \
+ v(bool, traceBaselineJITExecution, false, Normal, nullptr) \
enum OptionEquivalence {
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes