<html>
<head>
<base href="https://bugs.webkit.org/" />
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW - Web Inspector: Code hotness visualizer: introduce "parsed: true" property"
href="https://bugs.webkit.org/show_bug.cgi?id=151470">151470</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Web Inspector: Code hotness visualizer: introduce "parsed: true" property
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr>
<tr>
<th>Product</th>
<td>WebKit
</td>
</tr>
<tr>
<th>Version</th>
<td>WebKit Local Build
</td>
</tr>
<tr>
<th>Hardware</th>
<td>All
</td>
</tr>
<tr>
<th>OS</th>
<td>All
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>Normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>P2
</td>
</tr>
<tr>
<th>Component</th>
<td>Web Inspector
</td>
</tr>
<tr>
<th>Assignee</th>
<td>webkit-unassigned@lists.webkit.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>nvasilyev@apple.com
</td>
</tr>
<tr>
<th>CC</th>
<td>bburg@apple.com, graouts@webkit.org, joepeck@webkit.org, mattbaker@apple.com, nvasilyev@apple.com, timothy@apple.com, webkit-bug-importer@group.apple.com
</td>
</tr>
<tr>
<th>Blocks</th>
<td>146115
</td>
</tr></table>
<p>
<div>
<pre>TL;DR
<a href="https://github.com/WebKit/webkit/blob/a7970c63ab35ad903f6060e2ba28eaf1bd562801/Source/JavaScriptCore/runtime/ControlFlowProfiler.cpp#L97">https://github.com/WebKit/webkit/blob/a7970c63ab35ad903f6060e2ba28eaf1bd562801/Source/JavaScriptCore/runtime/ControlFlowProfiler.cpp#L97</a>
Instead emitting "executionCount: 1" for scopes, we should introduce a separate property. We could name it "parsed: true" instead of "executionCount: 1". I'm not sure if "parsed" is technically accurate, so bike-shedding is welcome.
Longer explanation:
var x = 1;
function foo() {
return 42;
}
Upon reading executing the JS code above, one of the ranges RuntimeAgent.getBasicBlocks would emit be:
{
startOffset: 0,
endOffset: // end of the file
hasExecuted: true,
executionCount: 1
}
This is a bit misleading, since function foo hasn't been executed.
I suggest to instead emit:
{
startOffset: 0,
endOffset: // end of the file
hasExecuted: true,
parsed: true
}
Having a different property would allow to style these ranges differently.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>