Ignore:
Timestamp:
Apr 5, 2022, 8:41:00 PM (3 years ago)
Author:
[email protected]
Message:

[JSC] Use inlined assertion for CodeBlock type
https://bugs.webkit.org/show_bug.cgi?id=238849

Reviewed by Michael Saboff.

We introduced probeDebug-based CodeBlock assertion, but it is too slow and causing timeout on Debug JSC tests.
Instead, we use inlined assertion which is much faster to prevent these Debug build timeout.

  • assembler/AbortReason.h:
  • dfg/DFGJITCompiler.cpp:

(JSC::DFG::JITCompiler::compileEntry):

  • dfg/DFGSpeculativeJIT.cpp:

(JSC::DFG::SpeculativeJIT::compileCurrentBlock):

  • dfg/DFGThunks.cpp:

(JSC::DFG::osrEntryThunkGenerator):

  • ftl/FTLLowerDFGToB3.cpp:

(JSC::FTL::DFG::LowerDFGToB3::lower):

  • jit/AssemblyHelpers.cpp:

(JSC::AssemblyHelpers::jitAssertCodeBlockOnCallFrameWithType):
(JSC::AssemblyHelpers::jitAssertCodeBlockOnCallFrameIsOptimizingJIT):

  • jit/AssemblyHelpers.h:

(JSC::AssemblyHelpers::jitAssertCodeBlockOnCallFrameWithType):
(JSC::AssemblyHelpers::jitAssertCodeBlockOnCallFrameIsOptimizingJIT):

  • jit/JIT.cpp:

(JSC::JIT::compileAndLinkWithoutFinalizing):

  • jit/JITCode.h:

(JSC::JITCode::offsetOfJITType):

File:
1 edited

Legend:

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

    r292445 r292447  
    742742
    743743    emitFunctionPrologue();
    744 #if ASSERT_ENABLED
    745     probeDebug([=](Probe::Context& ctx) {
    746         CodeBlock* codeBlock = ctx.fp<CallFrame*>()->codeBlock();
    747         if (codeBlock->jitType() != JITType::BaselineJIT) {
    748             dataLogLn("FP ", RawPointer(ctx.fp<CallFrame*>()));
    749             RELEASE_ASSERT_NOT_REACHED();
    750         }
    751     });
    752 #endif
     744    jitAssertCodeBlockOnCallFrameWithType(regT2, JITType::BaselineJIT);
    753745
    754746    Label beginLabel(this);
     
    814806        emitFunctionPrologue();
    815807        RELEASE_ASSERT(m_unlinkedCodeBlock->codeType() == FunctionCode);
    816 #if ASSERT_ENABLED
    817         probeDebug([=](Probe::Context& ctx) {
    818             CodeBlock* codeBlock = ctx.fp<CallFrame*>()->codeBlock();
    819             if (codeBlock->jitType() != JITType::BaselineJIT) {
    820                 dataLogLn("FP ", RawPointer(ctx.fp<CallFrame*>()));
    821                 RELEASE_ASSERT_NOT_REACHED();
    822             }
    823         });
    824 #endif
     808        jitAssertCodeBlockOnCallFrameWithType(regT2, JITType::BaselineJIT);
    825809        emitGetFromCallFrameHeaderPtr(CallFrameSlot::codeBlock, regT0);
    826810        store8(TrustedImm32(0), Address(regT0, CodeBlock::offsetOfShouldAlwaysBeInlined()));
Note: See TracChangeset for help on using the changeset viewer.