Ignore:
Timestamp:
Jun 1, 2015, 10:39:11 PM (10 years ago)
Author:
[email protected]
Message:

Any exit from any JIT due to profiling for an inline cache should force all future compilations to be wary
https://bugs.webkit.org/show_bug.cgi?id=145496

Reviewed by Geoffrey Garen.

This pessimizes compilation a bit, but it reduces the likelihood of exiting from FTL. I
couldn't find any convincing reason not to do this, and we know from Speedometer that this
change is necessary for weirder code.

  • bytecode/CallLinkStatus.cpp:

(JSC::CallLinkStatus::computeFor):
(JSC::CallLinkStatus::computeExitSiteData):
(JSC::CallLinkStatus::computeDFGStatuses):

  • bytecode/CallLinkStatus.h:
  • bytecode/GetByIdStatus.cpp:

(JSC::GetByIdStatus::appendVariant):
(JSC::GetByIdStatus::hasExitSite):
(JSC::GetByIdStatus::computeFor):

  • bytecode/GetByIdStatus.h:
  • bytecode/PutByIdStatus.cpp:

(JSC::PutByIdStatus::appendVariant):
(JSC::PutByIdStatus::hasExitSite):
(JSC::PutByIdStatus::computeFor):

  • bytecode/PutByIdStatus.h:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/bytecode/GetByIdStatus.cpp

    r184828 r185103  
    6060
    6161#if ENABLE(DFG_JIT)
    62 bool GetByIdStatus::hasExitSite(const ConcurrentJITLocker& locker, CodeBlock* profiledBlock, unsigned bytecodeIndex, ExitingJITType jitType)
    63 {
    64     return profiledBlock->hasExitSite(locker, DFG::FrequentExitSite(bytecodeIndex, BadCache, jitType))
    65         || profiledBlock->hasExitSite(locker, DFG::FrequentExitSite(bytecodeIndex, BadConstantCache, jitType));
     62bool GetByIdStatus::hasExitSite(const ConcurrentJITLocker& locker, CodeBlock* profiledBlock, unsigned bytecodeIndex)
     63{
     64    return profiledBlock->hasExitSite(locker, DFG::FrequentExitSite(bytecodeIndex, BadCache))
     65        || profiledBlock->hasExitSite(locker, DFG::FrequentExitSite(bytecodeIndex, BadConstantCache));
    6666}
    6767#endif
     
    233233            ConcurrentJITLocker locker(profiledBlock->m_lock);
    234234            exitSiteData = CallLinkStatus::computeExitSiteData(
    235                 locker, profiledBlock, codeOrigin.bytecodeIndex, ExitFromFTL);
     235                locker, profiledBlock, codeOrigin.bytecodeIndex);
    236236        }
    237237       
     
    248248        {
    249249            ConcurrentJITLocker locker(profiledBlock->m_lock);
    250             if (hasExitSite(locker, profiledBlock, codeOrigin.bytecodeIndex, ExitFromFTL))
     250            if (hasExitSite(locker, profiledBlock, codeOrigin.bytecodeIndex))
    251251                return GetByIdStatus(TakesSlowPath, true);
    252252        }
Note: See TracChangeset for help on using the changeset viewer.