Rationalize closure call heuristics and profiling
https://bugs.webkit.org/show_bug.cgi?id=106270
Source/JavaScriptCore:
Reviewed by Oliver Hunt.
Did a number of things:
- CallLinkInfo now remembers if it was ever a closure call, and CallLinkStatus uses
this. Reduces the likelihood that we will inline a closure call as if it was a
normal call.
- Made InlineCallFrame print inferred function names, and refactored
CodeBlock::inferredName() to better use FunctionExecutable's API.
- Made bytecode dumping print frequent exit sites that led to recompilation.
- Made bytecode dumping for op_call and op_construct print what the CallLinkStatus
saw.
(JSC::CallLinkInfo::CallLinkInfo):
(CallLinkInfo):
- bytecode/CallLinkStatus.cpp:
(JSC::CallLinkStatus::computeFor):
(JSC::CodeBlock::inferredName):
(JSC::CodeBlock::dumpBytecodeCommentAndNewLine):
(JSC::CodeBlock::printCallOp):
(JSC::CodeOrigin::dump):
(JSC::InlineCallFrame::inferredName):
(JSC):
(JSC::InlineCallFrame::dumpBriefFunctionInformation):
(JSC::InlineCallFrame::dump):
(InlineCallFrame):
- bytecode/DFGExitProfile.cpp:
(JSC::DFG::ExitProfile::exitSitesFor):
(DFG):
- bytecode/DFGExitProfile.h:
(ExitProfile):
(JSC::DEFINE_STUB_FUNCTION):
Source/WTF:
Reviewed by Oliver Hunt.
Add a macro to add a method to a class that returns a dumper. Allows you to have
secondary dump() methods for dumping either more or less information.
(WTF):
Tools:
Reviewed by Oliver Hunt.
Add ability to use display-profiler-output via a pipe, and add the ability to dump
all generated code ('display *' or 'd *').
- Scripts/display-profiler-output: