Bug 197304

Summary: CodeBlock::m_instructionCount is wrong
Product: WebKit Reporter: Saam Barati <saam>
Component: JavaScriptCoreAssignee: Saam Barati <saam>
Status: RESOLVED FIXED    
Severity: Normal CC: benjamin, fpizlo, ggaren, gskachkov, guijemont, keith_miller, mark.lam, msaboff, rmorisset, ticaiolima, tzagallo, webkit-bug-importer, ysuzuki
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
patch
ysuzuki: review+
patch ysuzuki: review+

Saam Barati
Reported 2019-04-25 19:27:22 PDT
The calculation gets op_wide wrong.
Attachments
patch (6.70 KB, patch)
2019-04-30 13:46 PDT, Saam Barati
ysuzuki: review+
patch (24.64 KB, patch)
2019-04-30 16:12 PDT, Saam Barati
ysuzuki: review+
Saam Barati
Comment 1 2019-04-30 13:46:22 PDT
Yusuke Suzuki
Comment 2 2019-04-30 13:48:57 PDT
Comment on attachment 368605 [details] patch r=me. Let's watch the bots, and adjust threshold later if needed!
Saam Barati
Comment 3 2019-04-30 16:12:07 PDT
Yusuke Suzuki
Comment 4 2019-04-30 16:17:39 PDT
Comment on attachment 368623 [details] patch View in context: https://bugs.webkit.org/attachment.cgi?id=368623&action=review r=me > Source/JavaScriptCore/dfg/DFGDisassembler.cpp:77 > + out.print("Generated DFG JIT code for ", CodeBlockWithJITType(m_graph.m_codeBlock, JITType::DFGJIT), ", instruction count = ", m_graph.m_codeBlock->instructionsSize(), ":\n"); It would be nice if we can consistently use `instructions size` instead of `instruction count` in the log too. > Source/JavaScriptCore/dfg/DFGDriver.cpp:88 > + dataLog("DFG(Driver) compiling ", *codeBlock, " with ", mode, ", number of instructions = ", codeBlock->instructionsSize(), "\n"); Ditto. > Source/JavaScriptCore/dfg/DFGPlan.cpp:187 > + dataLog("DFG(Plan) compiling ", *m_codeBlock, " with ", m_mode, ", number of instructions = ", m_codeBlock->instructionsSize(), "\n"); Ditto. > Source/JavaScriptCore/ftl/FTLCompile.cpp:171 > + out.print("Generated ", state.graph.m_plan.mode(), " code for ", CodeBlockWithJITType(state.graph.m_codeBlock, JITType::FTLJIT), ", instruction count = ", state.graph.m_codeBlock->instructionsSize(), ":\n"); Ditto. > Source/JavaScriptCore/ftl/FTLLink.cpp:74 > + toCString("Generated FTL JIT code for ", CodeBlockWithJITType(codeBlock, JITType::FTLJIT), ", instruction count = ", graph.m_codeBlock->instructionsSize(), ":\n")); Ditto. > Source/JavaScriptCore/jit/JIT.cpp:908 > m_vm->machineCodeBytesPerBytecodeWordForBaselineJIT->add( I think `machineCodeBytesPerBytecodeWordForBaselineJIT` name becomes wrong now. > Source/JavaScriptCore/jit/JITDisassembler.cpp:92 > + out.print("Generated Baseline JIT code for ", CodeBlockWithJITType(m_codeBlock, JITType::BaselineJIT), ", instruction count = ", m_codeBlock->instructionsSize(), "\n"); Ditto. > Source/JavaScriptCore/profiler/ProfilerBytecodes.cpp:43 > + , m_instructionCount(codeBlock->instructionsSize()) Should we rename this to `m_instructionsSize` too?
Saam Barati
Comment 5 2019-04-30 16:37:50 PDT
Radar WebKit Bug Importer
Comment 6 2019-04-30 16:38:23 PDT
Saam Barati
Comment 7 2019-04-30 16:38:29 PDT
Comment on attachment 368623 [details] patch Thanks for the review. I made you suggested changes except renaming m_instructionCount in the profiler. For that, if we rename it, we should also go through with changing the name throughout the ruby tool
Note You need to log in before you can comment on or make changes to this bug.