Title: [153204] trunk/Source/_javascript_Core
- Revision
- 153204
- Author
- [email protected]
- Date
- 2013-07-24 21:01:52 -0700 (Wed, 24 Jul 2013)
Log Message
fourthTier: Fix some minor issues in the DFG's profiling of heap accesses
https://bugs.webkit.org/show_bug.cgi?id=113010
Reviewed by Goeffrey Garen.
Carefully merge r146669 from trunk. This required some fiddling since it
wasn't a clean apply.
Original changelog:
1) If a CodeBlock gets jettisoned by GC, we should count the exit sites.
2) If a CodeBlock clears a structure stub during GC, it should record this, and
the DFG should prefer to not inline that access (i.e. treat it as if it had an
exit site).
3) If a PutById was seen by the baseline JIT, and the JIT attempted to cache it,
but it chose not to, then assume that it will take slow path.
4) If we frequently exited because of a structure check on a weak constant,
don't try to inline that access in the future.
5) Treat all exits that were counted as being frequent.
81% speed-up on Octane/gbemu. Small speed-ups elsewhere, and no regressions.
* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::finalizeUnconditionally):
(JSC):
(JSC::CodeBlock::resetStubDuringGCInternal):
(JSC::CodeBlock::reoptimize):
(JSC::CodeBlock::jettison):
(JSC::ProgramCodeBlock::jettisonImpl):
(JSC::EvalCodeBlock::jettisonImpl):
(JSC::FunctionCodeBlock::jettisonImpl):
(JSC::CodeBlock::tallyFrequentExitSites):
* bytecode/CodeBlock.h:
(CodeBlock):
(JSC::CodeBlock::tallyFrequentExitSites):
(ProgramCodeBlock):
(EvalCodeBlock):
(FunctionCodeBlock):
* bytecode/GetByIdStatus.cpp:
(JSC::GetByIdStatus::computeFor):
* bytecode/PutByIdStatus.cpp:
(JSC::PutByIdStatus::computeFor):
* bytecode/StructureStubInfo.h:
(JSC::StructureStubInfo::StructureStubInfo):
(StructureStubInfo):
* dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::handleGetById):
(JSC::DFG::ByteCodeParser::parseBlock):
* dfg/DFGOSRExitBase.cpp:
(JSC::DFG::OSRExitBase::considerAddingAsFrequentExitSiteSlow):
* dfg/DFGOSRExitBase.h:
(JSC::DFG::OSRExitBase::considerAddingAsFrequentExitSite):
(OSRExitBase):
* jit/JITStubs.cpp:
(JSC::DEFINE_STUB_FUNCTION):
* runtime/Options.h:
(JSC):
Modified Paths
Diff
Modified: trunk/Source/_javascript_Core/ChangeLog (153203 => 153204)
--- trunk/Source/_javascript_Core/ChangeLog 2013-07-25 04:01:50 UTC (rev 153203)
+++ trunk/Source/_javascript_Core/ChangeLog 2013-07-25 04:01:52 UTC (rev 153204)
@@ -1,3 +1,67 @@
+2013-06-01 Filip Pizlo <[email protected]>
+
+ Fix some minor issues in the DFG's profiling of heap accesses
+ https://bugs.webkit.org/show_bug.cgi?id=113010
+
+ Reviewed by Goeffrey Garen.
+
+ Carefully merge r146669 from trunk. This required some fiddling since it
+ wasn't a clean apply.
+
+ Original changelog:
+
+ 1) If a CodeBlock gets jettisoned by GC, we should count the exit sites.
+
+ 2) If a CodeBlock clears a structure stub during GC, it should record this, and
+ the DFG should prefer to not inline that access (i.e. treat it as if it had an
+ exit site).
+
+ 3) If a PutById was seen by the baseline JIT, and the JIT attempted to cache it,
+ but it chose not to, then assume that it will take slow path.
+
+ 4) If we frequently exited because of a structure check on a weak constant,
+ don't try to inline that access in the future.
+
+ 5) Treat all exits that were counted as being frequent.
+
+ 81% speed-up on Octane/gbemu. Small speed-ups elsewhere, and no regressions.
+
+ * bytecode/CodeBlock.cpp:
+ (JSC::CodeBlock::finalizeUnconditionally):
+ (JSC):
+ (JSC::CodeBlock::resetStubDuringGCInternal):
+ (JSC::CodeBlock::reoptimize):
+ (JSC::CodeBlock::jettison):
+ (JSC::ProgramCodeBlock::jettisonImpl):
+ (JSC::EvalCodeBlock::jettisonImpl):
+ (JSC::FunctionCodeBlock::jettisonImpl):
+ (JSC::CodeBlock::tallyFrequentExitSites):
+ * bytecode/CodeBlock.h:
+ (CodeBlock):
+ (JSC::CodeBlock::tallyFrequentExitSites):
+ (ProgramCodeBlock):
+ (EvalCodeBlock):
+ (FunctionCodeBlock):
+ * bytecode/GetByIdStatus.cpp:
+ (JSC::GetByIdStatus::computeFor):
+ * bytecode/PutByIdStatus.cpp:
+ (JSC::PutByIdStatus::computeFor):
+ * bytecode/StructureStubInfo.h:
+ (JSC::StructureStubInfo::StructureStubInfo):
+ (StructureStubInfo):
+ * dfg/DFGByteCodeParser.cpp:
+ (JSC::DFG::ByteCodeParser::handleGetById):
+ (JSC::DFG::ByteCodeParser::parseBlock):
+ * dfg/DFGOSRExitBase.cpp:
+ (JSC::DFG::OSRExitBase::considerAddingAsFrequentExitSiteSlow):
+ * dfg/DFGOSRExitBase.h:
+ (JSC::DFG::OSRExitBase::considerAddingAsFrequentExitSite):
+ (OSRExitBase):
+ * jit/JITStubs.cpp:
+ (JSC::DEFINE_STUB_FUNCTION):
+ * runtime/Options.h:
+ (JSC):
+
2013-05-31 Filip Pizlo <[email protected]>
Remove CodeOrigin::valueProfileOffset since it was only needed for op_call_put_result.
Modified: trunk/Source/_javascript_Core/bytecode/CodeBlock.cpp (153203 => 153204)
--- trunk/Source/_javascript_Core/bytecode/CodeBlock.cpp 2013-07-25 04:01:50 UTC (rev 153203)
+++ trunk/Source/_javascript_Core/bytecode/CodeBlock.cpp 2013-07-25 04:01:52 UTC (rev 153204)
@@ -2897,19 +2897,11 @@
void EvalCodeBlock::jettisonImpl()
{
- ASSERT(JITCode::isOptimizingJIT(jitType()));
- ASSERT(this == replacement());
- if (DFG::shouldShowDisassembly())
- dataLog("Jettisoning ", *this, ".\n");
static_cast<EvalExecutable*>(ownerExecutable())->jettisonOptimizedCode(*vm());
}
void FunctionCodeBlock::jettisonImpl()
{
- ASSERT(JITCode::isOptimizingJIT(jitType()));
- ASSERT(this == replacement());
- if (DFG::shouldShowDisassembly())
- dataLog("Jettisoning ", *this, ".\n");
static_cast<FunctionExecutable*>(ownerExecutable())->jettisonOptimizedCodeFor(*vm(), m_isConstructor ? CodeForConstruct : CodeForCall);
}
@@ -3410,7 +3402,7 @@
for (unsigned i = 0; i < jitCode->osrExit.size(); ++i) {
FTL::OSRExit& exit = jitCode->osrExit[i];
- if (!exit.considerAddingAsFrequentExitSite(this, profiledBlock))
+ if (!exit.considerAddingAsFrequentExitSite(profiledBlock))
continue;
#if DFG_ENABLE(DEBUG_VERBOSE)
Modified: trunk/Source/_javascript_Core/bytecode/CodeBlock.h (153203 => 153204)
--- trunk/Source/_javascript_Core/bytecode/CodeBlock.h 2013-07-25 04:01:50 UTC (rev 153203)
+++ trunk/Source/_javascript_Core/bytecode/CodeBlock.h 2013-07-25 04:01:52 UTC (rev 153204)
@@ -937,7 +937,7 @@
#if ENABLE(JIT)
ClosureCallStubRoutine* findClosureCallForReturnPC(ReturnAddressPtr);
#endif
-
+
#if ENABLE(VALUE_PROFILER)
void updateAllPredictionsAndCountLiveness(OperationInProgress, unsigned& numberOfLiveNonArgumentValueProfiles, unsigned& numberOfSamplesInProfiles);
#endif
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes