Changeset 277110 in webkit
- Timestamp:
- May 6, 2021 12:41:15 PM (3 years ago)
- Location:
- trunk/Source/JavaScriptCore
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/ChangeLog
r277094 r277110 1 2021-05-06 Filip Pizlo <fpizlo@apple.com> 2 3 It should be possible to --logJIT=true 4 https://bugs.webkit.org/show_bug.cgi?id=225464 5 6 Reviewed by Mark Lam. 7 8 This makes it easy to just log when JITing happens. It's like --dumpDisassembly=true but 9 without the disassembly. 10 11 * assembler/LinkBuffer.cpp: 12 (JSC::LinkBuffer::finalizeCodeWithDisassemblyImpl): 13 * assembler/LinkBuffer.h: 14 * runtime/Options.cpp: 15 (JSC::Options::recomputeDependentOptions): 16 * runtime/OptionsList.h: 17 1 18 2021-05-06 Mark Lam <mark.lam@apple.com> 2 19 -
trunk/Source/JavaScriptCore/assembler/LinkBuffer.cpp
r276292 r277110 91 91 #endif 92 92 93 if (!dumpDisassembly || m_alreadyDisassembled) 94 return result; 95 93 bool justDumpingHeader = !dumpDisassembly || m_alreadyDisassembled; 94 96 95 StringPrintStream out; 97 96 out.printf("Generated JIT code for "); … … 103 102 104 103 uint8_t* executableAddress = result.code().untaggedExecutableAddress<uint8_t*>(); 105 out.printf(" Code at [%p, %p) :\n", executableAddress, executableAddress + result.size());104 out.printf(" Code at [%p, %p)%s\n", executableAddress, executableAddress + result.size(), justDumpingHeader ? "." : ":"); 106 105 107 106 CString header = out.toCString(); 107 108 if (justDumpingHeader) { 109 if (Options::logJIT()) 110 dataLog(header); 111 return result; 112 } 108 113 109 114 if (Options::asyncDisassembly()) { -
trunk/Source/JavaScriptCore/assembler/LinkBuffer.h
r272191 r277110 379 379 380 380 #if OS(LINUX) 381 #define FINALIZE_CODE_IF(condition, linkBufferReference, resultPtrTag, ...) 382 (UNLIKELY((condition) )\383 ? (linkBufferReference).finalizeCodeWithDisassembly<resultPtrTag>( true, __VA_ARGS__) \381 #define FINALIZE_CODE_IF(condition, linkBufferReference, resultPtrTag, ...) \ 382 (UNLIKELY((condition) || JSC::Options::logJIT()) \ 383 ? (linkBufferReference).finalizeCodeWithDisassembly<resultPtrTag>((condition), __VA_ARGS__) \ 384 384 : (UNLIKELY(JSC::Options::logJITCodeForPerf()) \ 385 385 ? (linkBufferReference).finalizeCodeWithDisassembly<resultPtrTag>(false, __VA_ARGS__) \ 386 386 : (linkBufferReference).finalizeCodeWithoutDisassembly<resultPtrTag>())) 387 387 #else 388 #define FINALIZE_CODE_IF(condition, linkBufferReference, resultPtrTag, ...) 389 (UNLIKELY((condition) )\390 ? (linkBufferReference).finalizeCodeWithDisassembly<resultPtrTag>( true, __VA_ARGS__) \388 #define FINALIZE_CODE_IF(condition, linkBufferReference, resultPtrTag, ...) \ 389 (UNLIKELY((condition) || JSC::Options::logJIT()) \ 390 ? (linkBufferReference).finalizeCodeWithDisassembly<resultPtrTag>((condition), __VA_ARGS__) \ 391 391 : (linkBufferReference).finalizeCodeWithoutDisassembly<resultPtrTag>()) 392 392 #endif -
trunk/Source/JavaScriptCore/runtime/Options.cpp
r273138 r277110 452 452 Options::useFastTLSForWasmContext() = false; 453 453 454 if (Options::dumpDisassembly() 454 if (Options::logJIT() 455 || Options::dumpDisassembly() 455 456 || Options::dumpDFGDisassembly() 456 457 || Options::dumpFTLDisassembly() -
trunk/Source/JavaScriptCore/runtime/OptionsList.h
r276858 r277110 123 123 v(Bool, dumpDisassembly, false, Normal, "dumps disassembly of all JIT compiled code upon compilation") \ 124 124 v(Bool, asyncDisassembly, false, Normal, nullptr) \ 125 v(Bool, logJIT, false, Normal, nullptr) \ 125 126 v(Bool, dumpDFGDisassembly, false, Normal, "dumps disassembly of DFG function upon compilation") \ 126 127 v(Bool, dumpFTLDisassembly, false, Normal, "dumps disassembly of FTL function upon compilation") \
Note: See TracChangeset
for help on using the changeset viewer.