Changeset 239188 in webkit


Ignore:
Timestamp:
Dec 13, 2018 4:53:11 PM (5 years ago)
Author:
mark.lam@apple.com
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:
Location:
trunk/Source/JavaScriptCore
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ChangeLog

    r239187 r239188  
     12018-12-13  Mark Lam  <mark.lam@apple.com>
     2
     3        Add the JSC_traceBaselineJITExecution option for tracing baseline JIT execution.
     4        https://bugs.webkit.org/show_bug.cgi?id=192684
     5
     6        Reviewed by Saam Barati.
     7
     8        This dataLogs the bytecode execution order of baseline JIT code when the
     9        JSC_traceBaselineJITExecution option is true.
     10
     11        * jit/JIT.cpp:
     12        (JSC::JIT::privateCompileMainPass):
     13        (JSC::JIT::privateCompileSlowCases):
     14        * runtime/Options.h:
     15
    1162018-12-13  David Kilzer  <ddkilzer@apple.com>
    217
  • trunk/Source/JavaScriptCore/jit/JIT.cpp

    r238543 r239188  
    4545#include "ModuleProgramCodeBlock.h"
    4646#include "PCToCodeOriginMap.h"
     47#include "ProbeContext.h"
    4748#include "ProfilerDatabase.h"
    4849#include "ProgramCodeBlock.h"
     
    270271
    271272        unsigned bytecodeOffset = m_bytecodeOffset;
     273#if ENABLE(MASM_PROBE)
     274        if (UNLIKELY(Options::traceBaselineJITExecution())) {
     275            CodeBlock* codeBlock = m_codeBlock;
     276            probe([=] (Probe::Context& ctx) {
     277                dataLogLn("JIT [", bytecodeOffset, "] ", opcodeNames[opcodeID], " cfr ", RawPointer(ctx.fp()), " @ ", codeBlock);
     278            });
     279        }
     280#endif
    272281
    273282        switch (opcodeID) {
     
    494503            m_disassembler->setForBytecodeSlowPath(m_bytecodeOffset, label());
    495504
     505#if ENABLE(MASM_PROBE)
     506        if (UNLIKELY(Options::traceBaselineJITExecution())) {
     507            OpcodeID opcodeID = currentInstruction->opcodeID();
     508            unsigned bytecodeOffset = m_bytecodeOffset;
     509            CodeBlock* codeBlock = m_codeBlock;
     510            probe([=] (Probe::Context& ctx) {
     511                dataLogLn("JIT [", bytecodeOffset, "] SLOW ", opcodeNames[opcodeID], " cfr ", RawPointer(ctx.fp()), " @ ", codeBlock);
     512            });
     513        }
     514#endif
     515
    496516        switch (currentInstruction->opcodeID()) {
    497517        DEFINE_SLOWCASE_OP(op_add)
  • trunk/Source/JavaScriptCore/runtime/Options.h

    r238012 r239188  
    508508    v(bool, traceLLIntExecution, false, Configurable, nullptr) \
    509509    v(bool, traceLLIntSlowPath, false, Configurable, nullptr) \
     510    v(bool, traceBaselineJITExecution, false, Normal, nullptr) \
    510511
    511512
Note: See TracChangeset for help on using the changeset viewer.