Ignore:
Timestamp:
May 2, 2014, 11:52:10 AM (11 years ago)
Author:
[email protected]
Message:

Add a DFG function whitelist
https://bugs.webkit.org/show_bug.cgi?id=132437

Reviewed by Geoffrey Garen.

Often times when debugging, using bytecode ranges isn't enough to narrow down to the
particular DFG block that's causing issues. This patch adds the ability to whitelist
specific functions specified in a file to enable further filtering without having to recompile.

(JSC::DFG::isSupported):
(JSC::DFG::mightInlineFunctionForCall):
(JSC::DFG::mightInlineFunctionForClosureCall):
(JSC::DFG::mightInlineFunctionForConstruct):

  • dfg/DFGFunctionWhitelist.cpp: Added.

(JSC::DFG::FunctionWhitelist::ensureGlobalWhitelist):
(JSC::DFG::FunctionWhitelist::FunctionWhitelist):
(JSC::DFG::FunctionWhitelist::parseFunctionNamesInFile):
(JSC::DFG::FunctionWhitelist::contains):

  • dfg/DFGFunctionWhitelist.h: Added.
  • runtime/Options.cpp:

(JSC::parse):
(JSC::Options::dumpOption):

  • runtime/Options.h:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/bytecode/CodeBlock.h

    r167897 r168178  
    302302
    303303    virtual DFG::CapabilityLevel capabilityLevelInternal() = 0;
    304     DFG::CapabilityLevel capabilityLevel()
    305     {
    306         DFG::CapabilityLevel result = capabilityLevelInternal();
    307         m_capabilityLevelState = result;
    308         return result;
    309     }
     304    DFG::CapabilityLevel capabilityLevel();
    310305    DFG::CapabilityLevel capabilityLevelState() { return m_capabilityLevelState; }
    311306
     
    467462    unsigned numberOfRareCaseProfiles() { return m_rareCaseProfiles.size(); }
    468463    RareCaseProfile* rareCaseProfile(int index) { return &m_rareCaseProfiles[index]; }
    469     RareCaseProfile* rareCaseProfileForBytecodeOffset(int bytecodeOffset)
    470     {
    471         return tryBinarySearch<RareCaseProfile, int>(
    472             m_rareCaseProfiles, m_rareCaseProfiles.size(), bytecodeOffset,
    473             getRareCaseProfileBytecodeOffset);
    474     }
     464    RareCaseProfile* rareCaseProfileForBytecodeOffset(int bytecodeOffset);
    475465
    476466    bool likelyToTakeSlowCase(int bytecodeOffset)
Note: See TracChangeset for help on using the changeset viewer.