Ignore:
Timestamp:
Jun 3, 2015, 1:04:00 PM (10 years ago)
Author:
[email protected]
Message:

GetById and PutById profiling should be more precise about it takes slow path
https://bugs.webkit.org/show_bug.cgi?id=145590

Reviewed by Geoffrey Garen.

Source/JavaScriptCore:

If a ById access ever takes slow path, we want the DFG and FTL to know this. Previously we
were relying on slow path counts, which conflate slow paths taken due to a megamorphic
access and slow paths taken due to IC building.

  • bytecode/GetByIdStatus.cpp:

(JSC::GetByIdStatus::computeFor):
(JSC::GetByIdStatus::computeForStubInfo):

  • bytecode/PutByIdStatus.cpp:

(JSC::PutByIdStatus::computeFor):
(JSC::PutByIdStatus::computeForStubInfo):

  • bytecode/StructureStubInfo.h:

(JSC::StructureStubInfo::StructureStubInfo):

  • ftl/FTLIntrinsicRepository.h:
  • ftl/FTLLowerDFGToLLVM.cpp:

(JSC::FTL::LowerDFGToLLVM::compileGetById):

  • jit/JITOperations.cpp:
  • jit/JITOperations.h:

LayoutTests:

Added just two more tests for getters and setters. I needed more microbenchmarks to track
down a regression in an earlier version of this patch.

  • js/regress/getter-prototype-expected.txt: Added.
  • js/regress/getter-prototype.html: Added.
  • js/regress/script-tests/getter-prototype.js: Added.
  • js/regress/script-tests/setter-prototype.js: Added.
  • js/regress/setter-prototype-expected.txt: Added.
  • js/regress/setter-prototype.html: Added.
File:
1 edited

Legend:

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

    r185103 r185160  
    104104   
    105105    if (!result.takesSlowPath()
    106         && (hasExitSite(locker, profiledBlock, bytecodeIndex)
    107             || profiledBlock->likelyToTakeSlowCase(bytecodeIndex)))
     106        && hasExitSite(locker, profiledBlock, bytecodeIndex))
    108107        return GetByIdStatus(result.makesCalls() ? MakesCalls : TakesSlowPath, true);
    109108#else
     
    122121    CallLinkStatus::ExitSiteData callExitSiteData)
    123122{
    124     if (!stubInfo || !stubInfo->seen)
     123    if (!stubInfo)
     124        return GetByIdStatus(NoInformation);
     125   
     126    if (!stubInfo->seen)
    125127        return GetByIdStatus(NoInformation);
    126128   
     
    135137        }
    136138    }
     139   
     140    if (stubInfo->tookSlowPath)
     141        return GetByIdStatus(slowPathState);
    137142   
    138143    // Finally figure out if we can derive an access strategy.
Note: See TracChangeset for help on using the changeset viewer.