Skip to content

Commit

Permalink
[JSC] Fix bytecode profiler's compilation information
Browse files Browse the repository at this point in the history
https://bugs.webkit.org/show_bug.cgi?id=259962
rdar://113600614

Reviewed by Keith Miller.

We should record Baseline etc. as compilation target.

* Source/JavaScriptCore/jit/JITPlan.cpp:
(JSC::JITPlan::compileInThread):

Canonical link: https://commits.webkit.org/266729@main
  • Loading branch information
Constellation committed Aug 9, 2023
1 parent 6fb2754 commit 84d8a68
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions Source/JavaScriptCore/jit/JITPlan.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -210,10 +210,23 @@ void JITPlan::compileInThread(JITWorklistThread* thread)
break;
}
if (m_codeBlock) { // m_codeBlock will be null if the compilation was cancelled.
if (path == FTLPath)
switch (path) {
case FTLPath:
CODEBLOCK_LOG_EVENT(m_codeBlock, "ftlCompile", ("took ", (after - before).milliseconds(), " ms (DFG: ", (m_timeBeforeFTL - before).milliseconds(), ", B3: ", (after - m_timeBeforeFTL).milliseconds(), ") with ", pathName));
else
break;
case DFGPath:
CODEBLOCK_LOG_EVENT(m_codeBlock, "dfgCompile", ("took ", (after - before).milliseconds(), " ms with ", pathName));
break;
case BaselinePath:
CODEBLOCK_LOG_EVENT(m_codeBlock, "baselineCompile", ("took ", (after - before).milliseconds(), " ms with ", pathName));
break;
case FailPath:
CODEBLOCK_LOG_EVENT(m_codeBlock, "failed compilation", ("took ", (after - before).milliseconds(), " ms with ", pathName));
break;
case CancelPath:
CODEBLOCK_LOG_EVENT(m_codeBlock, "cancelled compilation", ("took ", (after - before).milliseconds(), " ms with ", pathName));
break;
}
}
if (UNLIKELY(reportCompileTimes())) {
dataLog("Optimized ", codeBlockName, " using ", m_mode, " with ", pathName, " into ", codeSize(), " bytes in ", (after - before).milliseconds(), " ms");
Expand Down

0 comments on commit 84d8a68

Please sign in to comment.