Changeset 276686 in webkit


Ignore:
Timestamp:
Apr 27, 2021 6:01:15 PM (3 years ago)
Author:
fpizlo@apple.com
Message:

Get the bytecode profiler working again
https://bugs.webkit.org/show_bug.cgi?id=225129

Reviewed by Saam Barati.

The bytecode profiler was broken because it was trying to look at unset labels. This patch
improves our label discipline a bit so we don't try to look at unset labels.

  • dfg/DFGJITCompiler.cpp:

(JSC::DFG::JITCompiler::linkOSRExits):

  • dfg/DFGSpeculativeJIT.cpp:

(JSC::DFG::SpeculativeJIT::emitInvalidationPoint):

Location:
trunk/Source/JavaScriptCore
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ChangeLog

    r276676 r276686  
     12021-04-27  Filip Pizlo  <fpizlo@apple.com>
     2
     3        Get the bytecode profiler working again
     4        https://bugs.webkit.org/show_bug.cgi?id=225129
     5
     6        Reviewed by Saam Barati.
     7
     8        The bytecode profiler was broken because it was trying to look at unset labels. This patch
     9        improves our label discipline a bit so we don't try to look at unset labels.
     10
     11        * dfg/DFGJITCompiler.cpp:
     12        (JSC::DFG::JITCompiler::linkOSRExits):
     13        * dfg/DFGSpeculativeJIT.cpp:
     14        (JSC::DFG::SpeculativeJIT::emitInvalidationPoint):
     15
    1162021-04-27  Mark Lam  <mark.lam@apple.com>
    217
  • trunk/Source/JavaScriptCore/dfg/DFGJITCompiler.cpp

    r276427 r276686  
    7272            OSRExitCompilationInfo& info = m_exitCompilationInfo[i];
    7373            Vector<Label> labels;
     74
     75            auto appendLabel = [&] (Label label) {
     76                RELEASE_ASSERT(label.isSet());
     77                labels.append(label);
     78            };
     79           
    7480            if (!info.m_failureJumps.empty()) {
    7581                for (unsigned j = 0; j < info.m_failureJumps.jumps().size(); ++j)
    76                     labels.append(info.m_failureJumps.jumps()[j].label());
    77             } else
    78                 labels.append(info.m_replacementSource);
     82                    appendLabel(info.m_failureJumps.jumps()[j].label());
     83            } else if (info.m_replacementSource.isSet())
     84                appendLabel(info.m_replacementSource);
    7985            m_exitSiteLabels.append(labels);
    8086        }
  • trunk/Source/JavaScriptCore/dfg/DFGSpeculativeJIT.cpp

    r276609 r276686  
    335335        this, m_stream->size()));
    336336    info.m_replacementSource = m_jit.watchpointLabel();
    337     ASSERT(info.m_replacementSource.isSet());
     337    RELEASE_ASSERT(info.m_replacementSource.isSet());
    338338    noResult(node);
    339339}
Note: See TracChangeset for help on using the changeset viewer.