<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>151470</bug_id>
          
          <creation_ts>2015-11-19 18:10:13 -0800</creation_ts>
          <short_desc>Web Inspector: Code hotness visualizer: introduce &quot;isScope: true&quot; property</short_desc>
          <delta_ts>2026-01-12 09:03:14 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>Web Inspector</component>
          <version>WebKit Local Build</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>ASSIGNED</bug_status>
          <resolution></resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          <blocked>146115</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Nikita Vasilyev">nvasilyev</reporter>
          <assigned_to name="Nikita Vasilyev">nvasilyev</assigned_to>
          <cc>graouts</cc>
    
    <cc>inspector-bugzilla-changes</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1143526</commentid>
    <comment_count>0</comment_count>
    <who name="Nikita Vasilyev">nvasilyev</who>
    <bug_when>2015-11-19 18:10:13 -0800</bug_when>
    <thetext>TL;DR
https://github.com/WebKit/webkit/blob/a7970c63ab35ad903f6060e2ba28eaf1bd562801/Source/JavaScriptCore/runtime/ControlFlowProfiler.cpp#L97
Instead emitting &quot;executionCount: 1&quot; for scopes, we should introduce a separate property. We could name it &quot;parsed: true&quot; instead of &quot;executionCount: 1&quot;. I&apos;m not sure if &quot;parsed&quot; 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&apos;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.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1143527</commentid>
    <comment_count>1</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2015-11-19 18:10:54 -0800</bug_when>
    <thetext>&lt;rdar://problem/23623352&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1147159</commentid>
    <comment_count>2</comment_count>
    <who name="Nikita Vasilyev">nvasilyev</who>
    <bug_when>2015-12-07 19:37:20 -0800</bug_when>
    <thetext>(In reply to comment #0)
&gt; TL;DR
&gt; https://github.com/WebKit/webkit/blob/
&gt; a7970c63ab35ad903f6060e2ba28eaf1bd562801/Source/JavaScriptCore/runtime/
&gt; ControlFlowProfiler.cpp#L97
&gt; Instead emitting &quot;executionCount: 1&quot; for scopes, we should introduce a
&gt; separate property. We could name it &quot;parsed: true&quot; instead of
&gt; &quot;executionCount: 1&quot;. I&apos;m not sure if &quot;parsed&quot; is technically accurate, so
&gt; bike-shedding is welcome.

I renamed it from &quot;parsed&quot; to &quot;isScope&quot;.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>