Ignore:
Timestamp:
Jan 4, 2013, 5:28:37 PM (13 years ago)
Author:
[email protected]
Message:

Rationalize exit site profiling for calls
https://bugs.webkit.org/show_bug.cgi?id=106150

Reviewed by Sam Weinig.

This adds two new exit kinds for calls: BadFunction and BadExecutable. The latter is not used
yet, but is already integrated with profiling. CheckFunction uses a BadFunction speculation
instead of BadCache, now. This allows CallLinkStatus to turn itself into a closure call status
if we had a BadFunction exit site but the CallLinkInfo told us to use a non-closure call. This
might happen if we had call unlinking that led to information loss along the way.

No performance impact. This is meant as another step towards inlining closure calls.

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

(JSC::CallLinkStatus::setIsProved):
(JSC::CallLinkStatus::setHasBadFunctionExitSite):
(CallLinkStatus):
(JSC::CallLinkStatus::setHasBadCacheExitSite):
(JSC::CallLinkStatus::setHasBadExecutableExitSite):

  • bytecode/ExitKind.cpp:

(JSC::exitKindToString):

  • bytecode/ExitKind.h:
  • dfg/DFGByteCodeParser.cpp:

(JSC::DFG::ByteCodeParser::handleCall):

  • dfg/DFGSpeculativeJIT32_64.cpp:

(JSC::DFG::SpeculativeJIT::compile):

  • dfg/DFGSpeculativeJIT64.cpp:

(JSC::DFG::SpeculativeJIT::compile):

File:
1 edited

Legend:

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

    r137937 r138871  
    3232    ExitKindUnset,
    3333    BadType, // We exited because a type prediction was wrong.
     34    BadFunction, // We exited because we made an incorrect assumption about what function we would see.
     35    BadExecutable, // We exited because we made an incorrect assumption about what executable we would see.
    3436    BadCache, // We exited because an inline cache was wrong.
    3537    BadWeakConstantCache, // We exited because a cache on a weak constant (usually a prototype) was wrong.
Note: See TracChangeset for help on using the changeset viewer.