RESOLVED FIXED 175440
Apply the UNLIKELY macro to some unlikely things.
https://bugs.webkit.org/show_bug.cgi?id=175440
Summary Apply the UNLIKELY macro to some unlikely things.
Mark Lam
Reported 2017-08-10 13:50:36 PDT
These changes came about from noticing that VM::m_perBytecodeProfiler is only used when Options::useProfiler() is true. Options::useProfiler() is false by default.
Attachments
proposed patch. (17.93 KB, patch)
2017-08-10 14:13 PDT, Mark Lam
ysuzuki: review+
patch for landing. (17.97 KB, patch)
2017-08-10 14:28 PDT, Mark Lam
no flags
Radar WebKit Bug Importer
Comment 1 2017-08-10 13:52:10 PDT
Mark Lam
Comment 2 2017-08-10 14:13:21 PDT
Created attachment 317843 [details] proposed patch.
Build Bot
Comment 3 2017-08-10 14:15:14 PDT
Attachment 317843 [details] did not pass style-queue: ERROR: Source/JavaScriptCore/dfg/DFGPlan.cpp:147: Wrong number of spaces before statement. (expected: 8) [whitespace/indent] [4] Total errors found: 1 in 15 files If any of these errors are false positives, please file a bug against check-webkit-style.
Yusuke Suzuki
Comment 4 2017-08-10 14:17:28 PDT
Comment on attachment 317843 [details] proposed patch. View in context: https://bugs.webkit.org/attachment.cgi?id=317843&action=review r=me > Source/JavaScriptCore/bytecode/CodeBlock.cpp:1920 > + if (UNLIKELY(Profiler::Compilation* compilation = jitCode()->dfgCommon()->compilation.get())) IIRC, this does not work in some platforms (it causes compiling error). `if (UNLIKELY(Type x = ...))` Please check EWS. If EWS becomes green, ignore this comment :) > Source/JavaScriptCore/ftl/FTLLink.cpp:71 > + if (UNLIKELY(Profiler::Compilation* compilation = graph.compilation())) { Ditto. > Source/JavaScriptCore/runtime/ScriptExecutable.cpp:160 > + if (UNLIKELY(Debugger* debugger = genericCodeBlock->globalObject()->debugger())) Ditto.
Mark Lam
Comment 5 2017-08-10 14:25:20 PDT
Thanks for the review. I've fixed the issues, and will retest on EWS.
Mark Lam
Comment 6 2017-08-10 14:28:54 PDT
Created attachment 317848 [details] patch for landing.
Build Bot
Comment 7 2017-08-10 14:31:44 PDT
Attachment 317848 [details] did not pass style-queue: ERROR: Source/JavaScriptCore/dfg/DFGPlan.cpp:147: Wrong number of spaces before statement. (expected: 8) [whitespace/indent] [4] Total errors found: 1 in 15 files If any of these errors are false positives, please file a bug against check-webkit-style.
WebKit Commit Bot
Comment 8 2017-08-10 16:00:09 PDT
Comment on attachment 317848 [details] patch for landing. Clearing flags on attachment: 317848 Committed r220556: <http://trac.webkit.org/changeset/220556>
WebKit Commit Bot
Comment 9 2017-08-10 16:00:11 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.