[Webkit-unassigned] [Bug 151470] New: Web Inspector: Code hotness visualizer: introduce "parsed: true" property

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Nov 19 18:10:13 PST 2015


https://bugs.webkit.org/show_bug.cgi?id=151470

            Bug ID: 151470
           Summary: Web Inspector: Code hotness visualizer: introduce
                    "parsed: true" property
    Classification: Unclassified
           Product: WebKit
           Version: WebKit Local Build
          Hardware: All
                OS: All
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: Web Inspector
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: nvasilyev at apple.com
                CC: bburg at apple.com, graouts at webkit.org,
                    joepeck at webkit.org, mattbaker at apple.com,
                    nvasilyev at apple.com, timothy at apple.com,
                    webkit-bug-importer at group.apple.com
            Blocks: 146115

TL;DR
https://github.com/WebKit/webkit/blob/a7970c63ab35ad903f6060e2ba28eaf1bd562801/Source/JavaScriptCore/runtime/ControlFlowProfiler.cpp#L97
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.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20151120/2bc23955/attachment-0001.html>


More information about the webkit-unassigned mailing list