Ignore:
Timestamp:
Jun 4, 2012, 5:00:17 PM (13 years ago)
Author:
[email protected]
Message:

Remove enabledProfilerReference
https://bugs.webkit.org/show_bug.cgi?id=88258

Reviewed by Michael Saboff.

Make the enabled profiler a member of JSGlobalData, and switch code that accesses it to do so directly
via the JSGlobalData, rather than holding a Profiler reference to it. Do not pass the Profiler
reference to JIT code. This patch does not change the stack layout on entry into JIT code (passing an
unused void* instead), since this is an intrusive change better handled in a separate patch.

  • interpreter/Interpreter.cpp:

(JSC::Interpreter::throwException):
(JSC::Interpreter::execute):
(JSC::Interpreter::executeCall):
(JSC::Interpreter::executeConstruct):
(JSC::Interpreter::privateExecute):

  • jit/JITCode.h:

(JSC::JITCode::execute):

  • Don't pass Profiler to JIT code.
  • jit/JITOpcodes.cpp:

(JSC::JIT::emit_op_profile_will_call):
(JSC::JIT::emit_op_profile_did_call):

  • jit/JITOpcodes32_64.cpp:

(JSC::JIT::emit_op_profile_will_call):
(JSC::JIT::emit_op_profile_did_call):

  • jit/JITStubs.cpp:

(JSC):
(JSC::ctiTrampoline):
(JSC::ctiVMThrowTrampoline):
(JSC::ctiOpThrowNotCaught):
(JSC::JITThunks::JITThunks):
(JSC::DEFINE_STUB_FUNCTION):

  • For ARM_THUMB2, rename ENABLE_PROFILER_REFERENCE_OFFSET to FIRST_STACK_ARGUMENT (which is how it is being used).
  • For MIPS, remove ENABLE_PROFILER_REFERENCE_OFFSET.
  • jit/JITStubs.h:

(JITStackFrame):
(JSC):

  • Renamed enabledProfilerReference to unusedX.
  • llint/LLIntSlowPaths.cpp:

(JSC::LLInt::LLINT_SLOW_PATH_DECL):

  • llint/LowLevelInterpreter.asm:
  • profiler/Profiler.cpp:

(JSC):
(JSC::Profiler::startProfiling):
(JSC::Profiler::stopProfiling):

  • profiler/Profiler.h:

(Profiler):

  • Removed s_sharedEnabledProfilerReference, enabledProfilerReference().
  • runtime/JSGlobalData.cpp:

(JSC::JSGlobalData::JSGlobalData):

  • runtime/JSGlobalData.h:

(JSC):
(JSC::JSGlobalData::enabledProfiler):
(JSGlobalData):

  • Added m_enabledProfiler, enabledProfiler().
  • runtime/JSGlobalObject.cpp:

(JSC::JSGlobalObject::~JSGlobalObject):

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/jit/JITOpcodes.cpp

    r118555 r119441  
    12911291void JIT::emit_op_profile_will_call(Instruction* currentInstruction)
    12921292{
    1293     peek(regT1, OBJECT_OFFSETOF(JITStackFrame, enabledProfilerReference) / sizeof(void*));
    1294     Jump noProfiler = branchTestPtr(Zero, Address(regT1));
    1295 
    12961293    JITStubCall stubCall(this, cti_op_profile_will_call);
    12971294    stubCall.addArgument(currentInstruction[1].u.operand, regT1);
    12981295    stubCall.call();
    1299     noProfiler.link(this);
    1300 
    13011296}
    13021297
    13031298void JIT::emit_op_profile_did_call(Instruction* currentInstruction)
    13041299{
    1305     peek(regT1, OBJECT_OFFSETOF(JITStackFrame, enabledProfilerReference) / sizeof(void*));
    1306     Jump noProfiler = branchTestPtr(Zero, Address(regT1));
    1307 
    13081300    JITStubCall stubCall(this, cti_op_profile_did_call);
    13091301    stubCall.addArgument(currentInstruction[1].u.operand, regT1);
    13101302    stubCall.call();
    1311     noProfiler.link(this);
    13121303}
    13131304
Note: See TracChangeset for help on using the changeset viewer.