Changeset 244811 in webkit


Ignore:
Timestamp:
Apr 30, 2019, 4:37:27 PM (6 years ago)
Author:
[email protected]
Message:

CodeBlock::m_instructionCount is wrong
https://bugs.webkit.org/show_bug.cgi?id=197304

Reviewed by Yusuke Suzuki.

What we were calling instructionCount() was wrong, as evidenced by
us using it incorrectly both in the sampling profiler and when we
dumped bytecode for a given CodeBlock. Prior to the bytecode rewrite,
instructionCount() was probably valid to do bounds checks against.
However, this is no longer the case. This patch renames what we called
instructionCount() to bytecodeCost(). It is now only used to make decisions
about inlining and tier up heuristics. I've also named options related to
this appropriately.

This patch also introduces instructionsSize(). The result of this method
is valid to do bounds checks against.

  • bytecode/CodeBlock.cpp:

(JSC::CodeBlock::dumpAssumingJITType const):
(JSC::CodeBlock::CodeBlock):
(JSC::CodeBlock::finishCreation):
(JSC::CodeBlock::optimizationThresholdScalingFactor):
(JSC::CodeBlock::predictedMachineCodeSize):

  • bytecode/CodeBlock.h:

(JSC::CodeBlock::instructionsSize const):
(JSC::CodeBlock::bytecodeCost const):
(JSC::CodeBlock::instructionCount const): Deleted.

  • dfg/DFGByteCodeParser.cpp:

(JSC::DFG::ByteCodeParser::inliningCost):
(JSC::DFG::ByteCodeParser::getInliningBalance):

  • dfg/DFGCapabilities.cpp:

(JSC::DFG::mightCompileEval):
(JSC::DFG::mightCompileProgram):
(JSC::DFG::mightCompileFunctionForCall):
(JSC::DFG::mightCompileFunctionForConstruct):
(JSC::DFG::mightInlineFunctionForCall):
(JSC::DFG::mightInlineFunctionForClosureCall):
(JSC::DFG::mightInlineFunctionForConstruct):

  • dfg/DFGCapabilities.h:

(JSC::DFG::isSmallEnoughToInlineCodeInto):

  • dfg/DFGDisassembler.cpp:

(JSC::DFG::Disassembler::dumpHeader):

  • dfg/DFGDriver.cpp:

(JSC::DFG::compileImpl):

  • dfg/DFGPlan.cpp:

(JSC::DFG::Plan::compileInThread):

  • dfg/DFGTierUpCheckInjectionPhase.cpp:

(JSC::DFG::TierUpCheckInjectionPhase::run):

  • ftl/FTLCapabilities.cpp:

(JSC::FTL::canCompile):

  • ftl/FTLCompile.cpp:

(JSC::FTL::compile):

  • ftl/FTLLink.cpp:

(JSC::FTL::link):

  • jit/JIT.cpp:

(JSC::JIT::link):

  • jit/JITDisassembler.cpp:

(JSC::JITDisassembler::dumpHeader):

  • llint/LLIntSlowPaths.cpp:

(JSC::LLInt::shouldJIT):

  • profiler/ProfilerBytecodes.cpp:

(JSC::Profiler::Bytecodes::Bytecodes):

  • runtime/Options.h:
  • runtime/SamplingProfiler.cpp:

(JSC::tryGetBytecodeIndex):
(JSC::SamplingProfiler::processUnverifiedStackTraces):

Location:
trunk/Source/JavaScriptCore
Files:
19 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ChangeLog

    r244806 r244811  
     12019-04-30  Saam barati  <[email protected]>
     2
     3        CodeBlock::m_instructionCount is wrong
     4        https://bugs.webkit.org/show_bug.cgi?id=197304
     5
     6        Reviewed by Yusuke Suzuki.
     7
     8        What we were calling instructionCount() was wrong, as evidenced by
     9        us using it incorrectly both in the sampling profiler and when we
     10        dumped bytecode for a given CodeBlock. Prior to the bytecode rewrite,
     11        instructionCount() was probably valid to do bounds checks against.
     12        However, this is no longer the case. This patch renames what we called
     13        instructionCount() to bytecodeCost(). It is now only used to make decisions
     14        about inlining and tier up heuristics. I've also named options related to
     15        this appropriately.
     16       
     17        This patch also introduces instructionsSize(). The result of this method
     18        is valid to do bounds checks against.
     19
     20        * bytecode/CodeBlock.cpp:
     21        (JSC::CodeBlock::dumpAssumingJITType const):
     22        (JSC::CodeBlock::CodeBlock):
     23        (JSC::CodeBlock::finishCreation):
     24        (JSC::CodeBlock::optimizationThresholdScalingFactor):
     25        (JSC::CodeBlock::predictedMachineCodeSize):
     26        * bytecode/CodeBlock.h:
     27        (JSC::CodeBlock::instructionsSize const):
     28        (JSC::CodeBlock::bytecodeCost const):
     29        (JSC::CodeBlock::instructionCount const): Deleted.
     30        * dfg/DFGByteCodeParser.cpp:
     31        (JSC::DFG::ByteCodeParser::inliningCost):
     32        (JSC::DFG::ByteCodeParser::getInliningBalance):
     33        * dfg/DFGCapabilities.cpp:
     34        (JSC::DFG::mightCompileEval):
     35        (JSC::DFG::mightCompileProgram):
     36        (JSC::DFG::mightCompileFunctionForCall):
     37        (JSC::DFG::mightCompileFunctionForConstruct):
     38        (JSC::DFG::mightInlineFunctionForCall):
     39        (JSC::DFG::mightInlineFunctionForClosureCall):
     40        (JSC::DFG::mightInlineFunctionForConstruct):
     41        * dfg/DFGCapabilities.h:
     42        (JSC::DFG::isSmallEnoughToInlineCodeInto):
     43        * dfg/DFGDisassembler.cpp:
     44        (JSC::DFG::Disassembler::dumpHeader):
     45        * dfg/DFGDriver.cpp:
     46        (JSC::DFG::compileImpl):
     47        * dfg/DFGPlan.cpp:
     48        (JSC::DFG::Plan::compileInThread):
     49        * dfg/DFGTierUpCheckInjectionPhase.cpp:
     50        (JSC::DFG::TierUpCheckInjectionPhase::run):
     51        * ftl/FTLCapabilities.cpp:
     52        (JSC::FTL::canCompile):
     53        * ftl/FTLCompile.cpp:
     54        (JSC::FTL::compile):
     55        * ftl/FTLLink.cpp:
     56        (JSC::FTL::link):
     57        * jit/JIT.cpp:
     58        (JSC::JIT::link):
     59        * jit/JITDisassembler.cpp:
     60        (JSC::JITDisassembler::dumpHeader):
     61        * llint/LLIntSlowPaths.cpp:
     62        (JSC::LLInt::shouldJIT):
     63        * profiler/ProfilerBytecodes.cpp:
     64        (JSC::Profiler::Bytecodes::Bytecodes):
     65        * runtime/Options.h:
     66        * runtime/SamplingProfiler.cpp:
     67        (JSC::tryGetBytecodeIndex):
     68        (JSC::SamplingProfiler::processUnverifiedStackTraces):
     69
    1702019-04-30  Tadeu Zagallo  <[email protected]>
    271
  • trunk/Source/JavaScriptCore/bytecode/CodeBlock.cpp

    r244764 r244811  
    191191    if (codeType() == FunctionCode)
    192192        out.print(specializationKind());
    193     out.print(", ", instructionCount());
     193    out.print(", ", instructionsSize());
    194194    if (this->jitType() == JITType::BaselineJIT && m_shouldAlwaysBeInlined)
    195195        out.print(" (ShouldAlwaysBeInlined)");
     
    299299    , m_steppingMode(SteppingModeDisabled)
    300300    , m_numBreakpoints(0)
    301     , m_instructionCount(other.m_instructionCount)
     301    , m_bytecodeCost(other.m_bytecodeCost)
    302302    , m_scopeRegister(other.m_scopeRegister)
    303303    , m_hash(other.m_hash)
     
    525525    for (const auto& instruction : instructionStream) {
    526526        OpcodeID opcodeID = instruction->opcodeID();
    527         m_instructionCount += opcodeLengths[opcodeID];
     527        m_bytecodeCost += opcodeLengths[opcodeID];
    528528        switch (opcodeID) {
    529529        LINK(OpHasIndexedProperty, arrayProfile)
     
    23362336    const double d = 0.825914;
    23372337   
    2338     double instructionCount = this->instructionCount();
    2339    
    2340     ASSERT(instructionCount); // Make sure this is called only after we have an instruction stream; otherwise it'll just return the value of d, which makes no sense.
    2341    
    2342     double result = d + a * sqrt(instructionCount + b) + c * instructionCount;
     2338    double bytecodeCost = this->bytecodeCost();
     2339   
     2340    ASSERT(bytecodeCost); // Make sure this is called only after we have an instruction stream; otherwise it'll just return the value of d, which makes no sense.
     2341   
     2342    double result = d + a * sqrt(bytecodeCost + b) + c * bytecodeCost;
    23432343   
    23442344    result *= codeTypeThresholdMultiplier();
     
    23462346    if (Options::verboseOSR()) {
    23472347        dataLog(
    2348             *this, ": instruction count is ", instructionCount,
     2348            *this, ": bytecode cost is ", bytecodeCost,
    23492349            ", scaling execution counter by ", result, " * ", codeTypeThresholdMultiplier(),
    23502350            "\n");
     
    28712871        return 0;
    28722872   
    2873     double doubleResult = multiplier * instructionCount();
     2873    double doubleResult = multiplier * bytecodeCost();
    28742874   
    28752875    // Be even more paranoid: silently reject values that won't fit into a size_t. If
  • trunk/Source/JavaScriptCore/bytecode/CodeBlock.h

    r244764 r244811  
    385385    size_t predictedMachineCodeSize();
    386386
    387     unsigned instructionCount() const { return m_instructionCount; }
     387    unsigned instructionsSize() const { return instructions().size(); }
     388    unsigned bytecodeCost() const { return m_bytecodeCost; }
    388389
    389390    // Exactly equivalent to codeBlock->ownerExecutable()->newReplacementCodeBlockFor(codeBlock->specializationKind())
     
    964965        };
    965966    };
    966     unsigned m_instructionCount { 0 };
     967    unsigned m_bytecodeCost { 0 };
    967968    VirtualRegister m_scopeRegister;
    968969    mutable CodeBlockHash m_hash;
  • trunk/Source/JavaScriptCore/dfg/DFGByteCodeParser.cpp

    r244764 r244811  
    15601560   
    15611561    // It might be possible to inline.
    1562     return codeBlock->instructionCount();
     1562    return codeBlock->bytecodeCost();
    15631563}
    15641564
     
    19051905unsigned ByteCodeParser::getInliningBalance(const CallLinkStatus& callLinkStatus, CodeSpecializationKind specializationKind)
    19061906{
    1907     unsigned inliningBalance = Options::maximumFunctionForCallInlineCandidateInstructionCount();
     1907    unsigned inliningBalance = Options::maximumFunctionForCallInlineCandidateBytecodeCost();
    19081908    if (specializationKind == CodeForConstruct)
    1909         inliningBalance = std::min(inliningBalance, Options::maximumFunctionForConstructInlineCandidateInstructionCount());
     1909        inliningBalance = std::min(inliningBalance, Options::maximumFunctionForConstructInlineCandidateBytecoodeCost());
    19101910    if (callLinkStatus.isClosureCall())
    1911         inliningBalance = std::min(inliningBalance, Options::maximumFunctionForClosureCallInlineCandidateInstructionCount());
     1911        inliningBalance = std::min(inliningBalance, Options::maximumFunctionForClosureCallInlineCandidateBytecodeCost());
    19121912    return inliningBalance;
    19131913}
  • trunk/Source/JavaScriptCore/dfg/DFGCapabilities.cpp

    r244505 r244811  
    5050{
    5151    return isSupported()
    52         && codeBlock->instructionCount() <= Options::maximumOptimizationCandidateInstructionCount()
     52        && codeBlock->bytecodeCost() <= Options::maximumOptimizationCandidateBytecodeCost()
    5353        && codeBlock->ownerExecutable()->isOkToOptimize();
    5454}
     
    5656{
    5757    return isSupported()
    58         && codeBlock->instructionCount() <= Options::maximumOptimizationCandidateInstructionCount()
     58        && codeBlock->bytecodeCost() <= Options::maximumOptimizationCandidateBytecodeCost()
    5959        && codeBlock->ownerExecutable()->isOkToOptimize();
    6060}
     
    6262{
    6363    return isSupported()
    64         && codeBlock->instructionCount() <= Options::maximumOptimizationCandidateInstructionCount()
     64        && codeBlock->bytecodeCost() <= Options::maximumOptimizationCandidateBytecodeCost()
    6565        && codeBlock->ownerExecutable()->isOkToOptimize();
    6666}
     
    6868{
    6969    return isSupported()
    70         && codeBlock->instructionCount() <= Options::maximumOptimizationCandidateInstructionCount()
     70        && codeBlock->bytecodeCost() <= Options::maximumOptimizationCandidateBytecodeCost()
    7171        && codeBlock->ownerExecutable()->isOkToOptimize();
    7272}
     
    7474bool mightInlineFunctionForCall(CodeBlock* codeBlock)
    7575{
    76     return codeBlock->instructionCount() <= Options::maximumFunctionForCallInlineCandidateInstructionCount()
     76    return codeBlock->bytecodeCost() <= Options::maximumFunctionForCallInlineCandidateBytecodeCost()
    7777        && isSupportedForInlining(codeBlock);
    7878}
    7979bool mightInlineFunctionForClosureCall(CodeBlock* codeBlock)
    8080{
    81     return codeBlock->instructionCount() <= Options::maximumFunctionForClosureCallInlineCandidateInstructionCount()
     81    return codeBlock->bytecodeCost() <= Options::maximumFunctionForClosureCallInlineCandidateBytecodeCost()
    8282        && isSupportedForInlining(codeBlock);
    8383}
    8484bool mightInlineFunctionForConstruct(CodeBlock* codeBlock)
    8585{
    86     return codeBlock->instructionCount() <= Options::maximumFunctionForConstructInlineCandidateInstructionCount()
     86    return codeBlock->bytecodeCost() <= Options::maximumFunctionForConstructInlineCandidateBytecoodeCost()
    8787        && isSupportedForInlining(codeBlock);
    8888}
  • trunk/Source/JavaScriptCore/dfg/DFGCapabilities.h

    r237547 r244811  
    167167inline bool isSmallEnoughToInlineCodeInto(CodeBlock* codeBlock)
    168168{
    169     return codeBlock->instructionCount() <= Options::maximumInliningCallerSize();
     169    return codeBlock->bytecodeCost() <= Options::maximumInliningCallerBytecodeCost();
    170170}
    171171
  • trunk/Source/JavaScriptCore/dfg/DFGDisassembler.cpp

    r244764 r244811  
    7575void Disassembler::dumpHeader(PrintStream& out, LinkBuffer& linkBuffer)
    7676{
    77     out.print("Generated DFG JIT code for ", CodeBlockWithJITType(m_graph.m_codeBlock, JITType::DFGJIT), ", instruction count = ", m_graph.m_codeBlock->instructionCount(), ":\n");
     77    out.print("Generated DFG JIT code for ", CodeBlockWithJITType(m_graph.m_codeBlock, JITType::DFGJIT), ", instructions size = ", m_graph.m_codeBlock->instructionsSize(), ":\n");
    7878    out.print("    Optimized with execution counter = ", m_graph.m_profiledBlock->jitExecuteCounter(), "\n");
    7979    out.print("    Code at [", RawPointer(linkBuffer.debugAddress()), ", ", RawPointer(static_cast<char*>(linkBuffer.debugAddress()) + linkBuffer.size()), "):\n");
  • trunk/Source/JavaScriptCore/dfg/DFGDriver.cpp

    r244764 r244811  
    7474    Ref<DeferredCompilationCallback>&& callback)
    7575{
    76     if (!Options::bytecodeRangeToDFGCompile().isInRange(codeBlock->instructionCount())
     76    if (!Options::bytecodeRangeToDFGCompile().isInRange(codeBlock->instructionsSize())
    7777        || !ensureGlobalDFGWhitelist().contains(codeBlock))
    7878        return CompilationFailed;
     
    8686   
    8787    if (logCompilationChanges(mode))
    88         dataLog("DFG(Driver) compiling ", *codeBlock, " with ", mode, ", number of instructions = ", codeBlock->instructionCount(), "\n");
     88        dataLog("DFG(Driver) compiling ", *codeBlock, " with ", mode, ", instructions size = ", codeBlock->instructionsSize(), "\n");
    8989   
    9090    // Make sure that any stubs that the DFG is going to use are initialized. We want to
  • trunk/Source/JavaScriptCore/dfg/DFGPlan.cpp

    r243744 r244811  
    185185
    186186    if (logCompilationChanges(m_mode) || Options::logPhaseTimes())
    187         dataLog("DFG(Plan) compiling ", *m_codeBlock, " with ", m_mode, ", number of instructions = ", m_codeBlock->instructionCount(), "\n");
     187        dataLog("DFG(Plan) compiling ", *m_codeBlock, " with ", m_mode, ", instructions size = ", m_codeBlock->instructionsSize(), "\n");
    188188
    189189    CompilationPath path = compileInThreadImpl();
  • trunk/Source/JavaScriptCore/dfg/DFGTierUpCheckInjectionPhase.cpp

    r243232 r244811  
    7070            return false;
    7171
    72         if (!Options::bytecodeRangeToFTLCompile().isInRange(m_graph.m_profiledBlock->instructionCount()))
     72        if (!Options::bytecodeRangeToFTLCompile().isInRange(m_graph.m_profiledBlock->instructionsSize()))
    7373            return false;
    7474
  • trunk/Source/JavaScriptCore/ftl/FTLCapabilities.cpp

    r244324 r244811  
    402402CapabilityLevel canCompile(Graph& graph)
    403403{
    404     if (graph.m_codeBlock->instructionCount() > Options::maximumFTLCandidateInstructionCount()) {
     404    if (graph.m_codeBlock->bytecodeCost() > Options::maximumFTLCandidateBytecodeCost()) {
    405405        if (verboseCapabilities())
    406406            dataLog("FTL rejecting ", *graph.m_codeBlock, " because it's too big.\n");
  • trunk/Source/JavaScriptCore/ftl/FTLCompile.cpp

    r244764 r244811  
    169169        PrintStream& out = WTF::dataFile();
    170170
    171         out.print("Generated ", state.graph.m_plan.mode(), " code for ", CodeBlockWithJITType(state.graph.m_codeBlock, JITType::FTLJIT), ", instruction count = ", state.graph.m_codeBlock->instructionCount(), ":\n");
     171        out.print("Generated ", state.graph.m_plan.mode(), " code for ", CodeBlockWithJITType(state.graph.m_codeBlock, JITType::FTLJIT), ", instructions size = ", state.graph.m_codeBlock->instructionsSize(), ":\n");
    172172
    173173        LinkBuffer& linkBuffer = *state.finalizer->b3CodeLinkBuffer;
  • trunk/Source/JavaScriptCore/ftl/FTLLink.cpp

    r244764 r244811  
    7272        compilation->addDescription(
    7373            Profiler::OriginStack(),
    74             toCString("Generated FTL JIT code for ", CodeBlockWithJITType(codeBlock, JITType::FTLJIT), ", instruction count = ", graph.m_codeBlock->instructionCount(), ":\n"));
     74            toCString("Generated FTL JIT code for ", CodeBlockWithJITType(codeBlock, JITType::FTLJIT), ", instructions size = ", graph.m_codeBlock->instructionsSize(), ":\n"));
    7575       
    7676        graph.ensureSSADominators();
  • trunk/Source/JavaScriptCore/jit/JIT.cpp

    r244764 r244811  
    908908    m_vm->machineCodeBytesPerBytecodeWordForBaselineJIT->add(
    909909        static_cast<double>(result.size()) /
    910         static_cast<double>(m_codeBlock->instructionCount()));
     910        static_cast<double>(m_codeBlock->instructionsSize()));
    911911
    912912    m_codeBlock->shrinkToFit(CodeBlock::LateShrink);
  • trunk/Source/JavaScriptCore/jit/JITDisassembler.cpp

    r244764 r244811  
    9090void JITDisassembler::dumpHeader(PrintStream& out, LinkBuffer& linkBuffer)
    9191{
    92     out.print("Generated Baseline JIT code for ", CodeBlockWithJITType(m_codeBlock, JITType::BaselineJIT), ", instruction count = ", m_codeBlock->instructionCount(), "\n");
     92    out.print("Generated Baseline JIT code for ", CodeBlockWithJITType(m_codeBlock, JITType::BaselineJIT), ", instructions size = ", m_codeBlock->instructionsSize(), "\n");
    9393    out.print("   Source: ", m_codeBlock->sourceCodeOnOneLine(), "\n");
    9494    out.print("   Code at [", RawPointer(linkBuffer.debugAddress()), ", ", RawPointer(static_cast<char*>(linkBuffer.debugAddress()) + linkBuffer.size()), "):\n");
  • trunk/Source/JavaScriptCore/llint/LLIntSlowPaths.cpp

    r244764 r244811  
    358358inline bool shouldJIT(CodeBlock* codeBlock)
    359359{
    360     if (!Options::bytecodeRangeToJITCompile().isInRange(codeBlock->instructionCount())
     360    if (!Options::bytecodeRangeToJITCompile().isInRange(codeBlock->instructionsSize())
    361361        || !ensureGlobalJITWhitelist().contains(codeBlock))
    362362        return false;
  • trunk/Source/JavaScriptCore/profiler/ProfilerBytecodes.cpp

    r221822 r244811  
    4141    , m_sourceCode(codeBlock->sourceCodeForTools())
    4242    , m_hash(codeBlock->hash())
    43     , m_instructionCount(codeBlock->instructionCount())
     43    , m_instructionCount(codeBlock->instructionsSize())
    4444{
    4545}
  • trunk/Source/JavaScriptCore/runtime/Options.h

    r244470 r244811  
    301301    v(bool, breakOnThrow, false, Normal, nullptr) \
    302302    \
    303     v(unsigned, maximumOptimizationCandidateInstructionCount, 100000, Normal, nullptr) \
    304     \
    305     v(unsigned, maximumFunctionForCallInlineCandidateInstructionCount, 120, Normal, nullptr) \
    306     v(unsigned, maximumFunctionForClosureCallInlineCandidateInstructionCount, 100, Normal, nullptr) \
    307     v(unsigned, maximumFunctionForConstructInlineCandidateInstructionCount, 100, Normal, nullptr) \
    308     \
    309     v(unsigned, maximumFTLCandidateInstructionCount, 20000, Normal, nullptr) \
     303    v(unsigned, maximumOptimizationCandidateBytecodeCost, 100000, Normal, nullptr) \
     304    \
     305    v(unsigned, maximumFunctionForCallInlineCandidateBytecodeCost, 120, Normal, nullptr) \
     306    v(unsigned, maximumFunctionForClosureCallInlineCandidateBytecodeCost, 100, Normal, nullptr) \
     307    v(unsigned, maximumFunctionForConstructInlineCandidateBytecoodeCost, 100, Normal, nullptr) \
     308    \
     309    v(unsigned, maximumFTLCandidateBytecodeCost, 20000, Normal, nullptr) \
    310310    \
    311311    /* Depth of inline stack, so 1 = no inlining, 2 = one level, etc. */ \
     
    315315    /* Maximum size of a caller for enabling inlining. This is purely to protect us */\
    316316    /* from super long compiles that take a lot of memory. */\
    317     v(unsigned, maximumInliningCallerSize, 10000, Normal, nullptr) \
     317    v(unsigned, maximumInliningCallerBytecodeCost, 10000, Normal, nullptr) \
    318318    \
    319319    v(unsigned, maximumVarargsForInlining, 100, Normal, nullptr) \
     
    559559    v(enableWebAssembly, useWebAssembly, SameOption) \
    560560    v(verboseDFGByteCodeParsing, verboseDFGBytecodeParsing, SameOption) \
     561    v(maximumOptimizationCandidateInstructionCount, maximumOptimizationCandidateBytecodeCost, SameOption) \
     562    v(maximumFunctionForCallInlineCandidateInstructionCount, maximumFunctionForCallInlineCandidateBytecodeCost, SameOption) \
     563    v(maximumFunctionForClosureCallInlineCandidateInstructionCount, maximumFunctionForClosureCallInlineCandidateBytecodeCost, SameOption) \
     564    v(maximumFunctionForConstructInlineCandidateInstructionCount, maximumFunctionForConstructInlineCandidateBytecoodeCost, SameOption) \
     565    v(maximumFTLCandidateInstructionCount, maximumFTLCandidateBytecodeCost, SameOption) \
     566    v(maximumInliningCallerSize, maximumInliningCallerBytecodeCost, SameOption) \
    561567
    562568
  • trunk/Source/JavaScriptCore/runtime/SamplingProfiler.cpp

    r244764 r244811  
    435435#if USE(JSVALUE64)
    436436    unsigned bytecodeIndex = llintPC;
    437     if (bytecodeIndex < codeBlock->instructionCount()) {
     437    if (bytecodeIndex < codeBlock->instructionsSize()) {
    438438        isValid = true;
    439439        return bytecodeIndex;
     
    466466
    467467        auto populateCodeLocation = [] (CodeBlock* codeBlock, unsigned bytecodeIndex, StackFrame::CodeLocation& location) {
    468             if (bytecodeIndex < codeBlock->instructionCount()) {
     468            if (bytecodeIndex < codeBlock->instructionsSize()) {
    469469                int divot;
    470470                int startOffset;
Note: See TracChangeset for help on using the changeset viewer.