Changeset 161705 in webkit
- Timestamp:
- Jan 10, 2014 5:29:24 PM (10 years ago)
- Location:
- branches/jsCStack/Source/JavaScriptCore
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/jsCStack/Source/JavaScriptCore/ChangeLog
r161695 r161705 1 2014-01-10 Filip Pizlo <fpizlo@apple.com> 2 3 It should be easier to diagnose FTL performance issues due to register preservation thunks 4 https://bugs.webkit.org/show_bug.cgi?id=126798 5 6 Not yet reviewed. 7 8 You can now use --verboseFTLToJSThunk=true --verboseFTLFailure=true to figure out 9 which code blocks are rejected by the FTL and yet get called from functions that 10 were FTL compiled. Any such rejections in major benchmarks should be fixed. 11 12 * bytecode/CodeBlock.cpp: 13 (JSC::CodeBlock::CodeBlock): 14 * ftl/FTLCapabilities.cpp: 15 (JSC::FTL::verboseCapabilities): 16 (JSC::FTL::canCompile): 17 * jit/RegisterPreservationWrapperGenerator.cpp: 18 (JSC::generateRegisterPreservationWrapper): 19 * runtime/Executable.cpp: 20 (JSC::ExecutableBase::dump): 21 * runtime/Executable.h: 22 * runtime/Options.cpp: 23 (JSC::Options::initialize): 24 * runtime/Options.h: 25 1 26 2014-01-10 Filip Pizlo <fpizlo@apple.com> 2 27 -
branches/jsCStack/Source/JavaScriptCore/bytecode/CodeBlock.cpp
r161600 r161705 1844 1844 // If the concurrent thread will want the code block's hash, then compute it here 1845 1845 // synchronously. 1846 if (Options::showDisassembly() 1847 || Options::showDFGDisassembly() 1848 || Options::dumpBytecodeAtDFGTime() 1849 || Options::dumpGraphAtEachPhase() 1850 || Options::verboseCompilation() 1851 || Options::logCompilationChanges() 1852 || Options::validateGraph() 1853 || Options::validateGraphAtEachPhase() 1854 || Options::verboseOSR() 1855 || Options::verboseCompilationQueue() 1856 || Options::reportCompileTimes() 1857 || Options::verboseCFA()) 1846 if (Options::alwaysComputeHash()) 1858 1847 hash(); 1859 1848 -
branches/jsCStack/Source/JavaScriptCore/ftl/FTLCapabilities.cpp
r161409 r161705 32 32 33 33 using namespace DFG; 34 35 static bool verboseCapabilities() 36 { 37 return verboseCompilationEnabled() || Options::verboseFTLFailure(); 38 } 34 39 35 40 inline CapabilityLevel canCompile(Node* node) … … 235 240 { 236 241 if (graph.m_codeBlock->codeType() != FunctionCode) { 237 if (verboseC ompilationEnabled())238 dataLog("FTL rejecting code block that doesn't belong to a function.\n");242 if (verboseCapabilities()) 243 dataLog("FTL rejecting ", *graph.m_codeBlock, " because it doesn't belong to a function.\n"); 239 244 return CannotCompile; 240 245 } … … 244 249 // CreateActivation/TearOffActivation, we might not see those nodes in case of 245 250 // OSR entry. 246 if (verboseC ompilationEnabled())247 dataLog("FTL rejecting code block that uses activations.\n");251 if (verboseCapabilities()) 252 dataLog("FTL rejecting ", *graph.m_codeBlock, " because it uses activations.\n"); 248 253 return CannotCompile; 249 254 } … … 286 291 default: 287 292 // Don't know how to handle anything else. 288 if (verboseC ompilationEnabled()) {289 dataLog("FTL rejecting node because of bad use kind: ", edge.useKind(), " in node:\n");293 if (verboseCapabilities()) { 294 dataLog("FTL rejecting node in ", *graph.m_codeBlock, " because of bad use kind: ", edge.useKind(), " in node:\n"); 290 295 graph.dump(WTF::dataFile(), " ", node); 291 296 } … … 296 301 switch (canCompile(node)) { 297 302 case CannotCompile: 298 if (verboseC ompilationEnabled()) {299 dataLog("FTL rejecting node :\n");303 if (verboseCapabilities()) { 304 dataLog("FTL rejecting node in ", *graph.m_codeBlock, ":\n"); 300 305 graph.dump(WTF::dataFile(), " ", node); 301 306 } -
branches/jsCStack/Source/JavaScriptCore/jit/RegisterPreservationWrapperGenerator.cpp
r161270 r161705 117 117 LinkBuffer linkBuffer(vm, &jit, GLOBAL_THUNK_ID); 118 118 linkBuffer.link(call, CodeLocationLabel(target)); 119 120 if (Options::verboseFTLToJSThunk()) 121 dataLog("Need a thunk for calls from FTL to non-FTL version of ", *executable, "\n"); 119 122 120 123 return FINALIZE_DFG_CODE(linkBuffer, ("Register preservation wrapper for %s/%s, %p", toCString(executable->hashFor(CodeForCall)).data(), toCString(executable->hashFor(CodeForConstruct)).data(), target.executableAddress())); -
branches/jsCStack/Source/JavaScriptCore/runtime/Executable.cpp
r160893 r161705 607 607 } 608 608 609 void ExecutableBase::dump(PrintStream& out) const 610 { 611 ExecutableBase* realThis = const_cast<ExecutableBase*>(this); 612 613 if (classInfo() == NativeExecutable::info()) { 614 NativeExecutable* native = jsCast<NativeExecutable*>(realThis); 615 out.print("NativeExecutable:", RawPointer(bitwise_cast<void*>(native->function())), "/", RawPointer(bitwise_cast<void*>(native->constructor()))); 616 return; 617 } 618 619 if (classInfo() == EvalExecutable::info()) { 620 EvalExecutable* eval = jsCast<EvalExecutable*>(realThis); 621 if (CodeBlock* codeBlock = eval->codeBlock()) 622 out.print(*codeBlock); 623 else 624 out.print("EvalExecutable w/o CodeBlock"); 625 return; 626 } 627 628 if (classInfo() == ProgramExecutable::info()) { 629 ProgramExecutable* eval = jsCast<ProgramExecutable*>(realThis); 630 if (CodeBlock* codeBlock = eval->codeBlock()) 631 out.print(*codeBlock); 632 else 633 out.print("ProgramExecutable w/o CodeBlock"); 634 return; 635 } 636 637 FunctionExecutable* function = jsCast<FunctionExecutable*>(realThis); 638 if (!function->eitherCodeBlock()) 639 out.print("FunctionExecutable w/o CodeBlock"); 640 else { 641 CommaPrinter comma("/"); 642 if (function->codeBlockForCall()) 643 out.print(comma, *function->codeBlockForCall()); 644 if (function->codeBlockForConstruct()) 645 out.print(comma, *function->codeBlockForConstruct()); 646 } 647 } 648 609 649 CodeBlockHash ExecutableBase::hashFor(CodeSpecializationKind kind) const 610 650 { -
branches/jsCStack/Source/JavaScriptCore/runtime/Executable.h
r160980 r161705 270 270 return NoIntrinsic; 271 271 } 272 273 void dump(PrintStream&) const; 272 274 273 275 protected: -
branches/jsCStack/Source/JavaScriptCore/runtime/Options.cpp
r160092 r161705 212 212 useRegExpJIT() = false; 213 213 #endif 214 214 215 if (showDisassembly() 216 || showDFGDisassembly() 217 || dumpBytecodeAtDFGTime() 218 || dumpGraphAtEachPhase() 219 || verboseCompilation() 220 || logCompilationChanges() 221 || validateGraph() 222 || validateGraphAtEachPhase() 223 || verboseOSR() 224 || verboseCompilationQueue() 225 || reportCompileTimes() 226 || verboseCFA() 227 || verboseFTLFailure()) 228 alwaysComputeHash() = true; 229 215 230 // Do range checks where needed and make corrections to the options: 216 231 ASSERT(thresholdForOptimizeAfterLongWarmUp() >= thresholdForOptimizeAfterWarmUp()); -
branches/jsCStack/Source/JavaScriptCore/runtime/Options.h
r161599 r161705 125 125 v(bool, reportCompileTimes, false) \ 126 126 v(bool, verboseCFA, false) \ 127 v(bool, verboseFTLToJSThunk, false) \ 128 v(bool, verboseFTLFailure, false) \ 129 v(bool, alwaysComputeHash, false) \ 127 130 \ 128 131 v(bool, enableOSREntryToDFG, true) \
Note: See TracChangeset
for help on using the changeset viewer.