Changeset 245017 in webkit
- Timestamp:
- May 7, 2019 10:41:42 AM (5 years ago)
- Location:
- trunk
- Files:
-
- 1 added
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JSTests/ChangeLog
r245001 r245017 1 2019-05-07 Saam Barati <sbarati@apple.com> 2 3 Don't OSR enter into an FTL CodeBlock that has been jettisoned 4 https://bugs.webkit.org/show_bug.cgi?id=197531 5 <rdar://problem/50162379> 6 7 Reviewed by Yusuke Suzuki. 8 9 * stress/dont-osr-enter-into-jettisoned-ftl-code-block.js: Added. 10 1 11 2019-05-06 Dean Jackson <dino@apple.com> 2 12 -
trunk/Source/JavaScriptCore/ChangeLog
r244999 r245017 1 2019-05-07 Saam Barati <sbarati@apple.com> 2 3 Don't OSR enter into an FTL CodeBlock that has been jettisoned 4 https://bugs.webkit.org/show_bug.cgi?id=197531 5 <rdar://problem/50162379> 6 7 Reviewed by Yusuke Suzuki. 8 9 Sometimes we make silly mistakes. This is one of those times. It's invalid to OSR 10 enter into an FTL OSR entry code block that has been jettisoned already. 11 12 * dfg/DFGJITCode.cpp: 13 (JSC::DFG::JITCode::clearOSREntryBlockAndResetThresholds): 14 * dfg/DFGJITCode.h: 15 (JSC::DFG::JITCode::clearOSREntryBlock): Deleted. 16 * dfg/DFGOSREntry.cpp: 17 (JSC::DFG::prepareOSREntry): 18 (JSC::DFG::prepareCatchOSREntry): 19 * dfg/DFGOperations.cpp: 20 * ftl/FTLOSREntry.cpp: 21 (JSC::FTL::prepareOSREntry): 22 1 23 2019-05-06 Keith Miller <keith_miller@apple.com> 2 24 -
trunk/Source/JavaScriptCore/dfg/DFGJITCode.cpp
r244764 r245017 212 212 m_osrEntryBlock.set(vm, owner, osrEntryBlock); 213 213 } 214 215 void JITCode::clearOSREntryBlockAndResetThresholds(CodeBlock *dfgCodeBlock) 216 { 217 ASSERT(m_osrEntryBlock); 218 219 unsigned osrEntryBytecode = m_osrEntryBlock->jitCode()->ftlForOSREntry()->bytecodeIndex(); 220 m_osrEntryBlock.clear(); 221 osrEntryRetry = 0; 222 tierUpEntryTriggers.set(osrEntryBytecode, JITCode::TriggerReason::DontTrigger); 223 setOptimizationThresholdBasedOnCompilationResult(dfgCodeBlock, CompilationDeferred); 224 } 214 225 #endif // ENABLE(FTL_JIT) 215 226 -
trunk/Source/JavaScriptCore/dfg/DFGJITCode.h
r242192 r245017 122 122 CodeBlock* osrEntryBlock() { return m_osrEntryBlock.get(); } 123 123 void setOSREntryBlock(VM&, const JSCell* owner, CodeBlock* osrEntryBlock); 124 void clearOSREntryBlock () { m_osrEntryBlock.clear(); }124 void clearOSREntryBlockAndResetThresholds(CodeBlock* dfgCodeBlock); 125 125 #endif 126 126 -
trunk/Source/JavaScriptCore/dfg/DFGOSREntry.cpp
r244764 r245017 99 99 ASSERT(codeBlock->alternative()->jitType() == JITType::BaselineJIT); 100 100 ASSERT(!codeBlock->jitCodeMap()); 101 ASSERT(codeBlock->jitCode()->dfgCommon()->isStillValid); 101 102 102 103 if (!Options::useOSREntryToDFG()) … … 343 344 { 344 345 ASSERT(codeBlock->jitType() == JITType::DFGJIT || codeBlock->jitType() == JITType::FTLJIT); 346 ASSERT(codeBlock->jitCode()->dfgCommon()->isStillValid); 345 347 346 348 if (!Options::useOSREntryToDFG() && codeBlock->jitCode()->jitType() == JITType::DFGJIT) -
trunk/Source/JavaScriptCore/dfg/DFGOperations.cpp
r244996 r245017 3320 3320 // without exponential backoff and we only do this for the entry code block. 3321 3321 CODEBLOCK_LOG_EVENT(codeBlock, "delayFTLCompile", ("OSR entry failed too many times")); 3322 unsigned osrEntryBytecode = entryBlock->jitCode()->ftlForOSREntry()->bytecodeIndex(); 3323 jitCode->clearOSREntryBlock(); 3324 jitCode->osrEntryRetry = 0; 3325 jitCode->tierUpEntryTriggers.set(osrEntryBytecode, JITCode::TriggerReason::DontTrigger); 3326 jitCode->setOptimizationThresholdBasedOnCompilationResult( 3327 codeBlock, CompilationDeferred); 3322 jitCode->clearOSREntryBlockAndResetThresholds(codeBlock); 3328 3323 return nullptr; 3329 3324 } -
trunk/Source/JavaScriptCore/ftl/FTLOSREntry.cpp
r242192 r245017 49 49 DFG::JITCode* dfgCode = dfgCodeBlock->jitCode()->dfg(); 50 50 ForOSREntryJITCode* entryCode = entryCodeBlock->jitCode()->ftlForOSREntry(); 51 52 if (!entryCode->dfgCommon()->isStillValid) { 53 dfgCode->clearOSREntryBlockAndResetThresholds(dfgCodeBlock); 54 return 0; 55 } 51 56 52 57 if (Options::verboseOSR()) {
Note: See TracChangeset
for help on using the changeset viewer.