<?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>151695</bug_id>
          
          <creation_ts>2015-11-30 22:34:56 -0800</creation_ts>
          <short_desc>Web Inspector: Split code coverage and type profilers</short_desc>
          <delta_ts>2026-01-12 09:04:56 -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>
          <dependson>162469</dependson>
    
    <dependson>160750</dependson>
    
    <dependson>160973</dependson>
          <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>saam</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1145142</commentid>
    <comment_count>0</comment_count>
    <who name="Nikita Vasilyev">nvasilyev</who>
    <bug_when>2015-11-30 22:34:56 -0800</bug_when>
    <thetext>* Split code coverage and type profilers;
* Turn on code coverage profiler (grayed out text) by default;
* Turn off type profiler (type info pills) by default;
* [T] button will continue to toggle type profiler but won&apos;t affect code coverage profiler;
* Code hotness visualizer, when implemented, will introduce a new button next to [T] and will be off by default.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1145143</commentid>
    <comment_count>1</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2015-11-30 22:35:10 -0800</bug_when>
    <thetext>&lt;rdar://problem/23700835&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1215437</commentid>
    <comment_count>2</comment_count>
      <attachid>284830</attachid>
    <who name="Nikita Vasilyev">nvasilyev</who>
    <bug_when>2016-07-28 16:12:35 -0700</bug_when>
    <thetext>Created attachment 284830
WIP</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1215438</commentid>
    <comment_count>3</comment_count>
      <attachid>284831</attachid>
    <who name="Nikita Vasilyev">nvasilyev</who>
    <bug_when>2016-07-28 16:14:44 -0700</bug_when>
    <thetext>Created attachment 284831
WIP</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1215441</commentid>
    <comment_count>4</comment_count>
    <who name="Blaze Burg">bburg</who>
    <bug_when>2016-07-28 16:16:08 -0700</bug_when>
    <thetext>(In reply to comment #0)
&gt; * Split code coverage and type profilers;
&gt; * Turn on code coverage profiler (grayed out text) by default;
&gt; * Turn off type profiler (type info pills) by default;
&gt; * [T] button will continue to toggle type profiler but won&apos;t affect code
&gt; coverage profiler;
&gt; * Code hotness visualizer, when implemented, will introduce a new button
&gt; next to [T] and will be off by default.

Please do not do all of these things in one patch.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1215444</commentid>
    <comment_count>5</comment_count>
    <who name="Joseph Pecoraro">joepeck</who>
    <bug_when>2016-07-28 16:19:06 -0700</bug_when>
    <thetext>(In reply to comment #0)
&gt; * Turn on code coverage profiler (grayed out text) by default;

When doing this, it would be good to understand its performance impact. We spent a lot of time optimizing performance when the inspector is open for Timelines. It would be good to understand what the impact of this is if we have it always on. Or, change Timeline recording to also turn this off, to avoid a performance impact.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1215448</commentid>
    <comment_count>6</comment_count>
    <who name="Nikita Vasilyev">nvasilyev</who>
    <bug_when>2016-07-28 16:28:54 -0700</bug_when>
    <thetext>(In reply to comment #5)
&gt; (In reply to comment #0)
&gt; &gt; * Turn on code coverage profiler (grayed out text) by default;
&gt; 
&gt; When doing this, it would be good to understand its performance impact. We
&gt; spent a lot of time optimizing performance when the inspector is open for
&gt; Timelines. It would be good to understand what the impact of this is if we
&gt; have it always on. Or, change Timeline recording to also turn this off, to
&gt; avoid a performance impact.

The front-end doesn&apos;t do anything performance intensive until a JS resource is visible.

I don&apos;t know what happens on the backend. Saam should know.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1215451</commentid>
    <comment_count>7</comment_count>
    <who name="Nikita Vasilyev">nvasilyev</who>
    <bug_when>2016-07-28 16:31:20 -0700</bug_when>
    <thetext>(In reply to comment #4)
&gt; (In reply to comment #0)
&gt; &gt; * Split code coverage and type profilers;
&gt; &gt; * Turn on code coverage profiler (grayed out text) by default;
&gt; &gt; * Turn off type profiler (type info pills) by default;
&gt; &gt; * [T] button will continue to toggle type profiler but won&apos;t affect code
&gt; &gt; coverage profiler;
&gt; &gt; * Code hotness visualizer, when implemented, will introduce a new button
&gt; &gt; next to [T] and will be off by default.
&gt; 
&gt; Please do not do all of these things in one patch.

I intended to do the first 4 points in one patch.
2nd to 4th points are just clarifications for the 1st.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1215455</commentid>
    <comment_count>8</comment_count>
    <who name="Joseph Pecoraro">joepeck</who>
    <bug_when>2016-07-28 16:33:31 -0700</bug_when>
    <thetext>(In reply to comment #6)
&gt; (In reply to comment #5)
&gt; &gt; (In reply to comment #0)
&gt; &gt; &gt; * Turn on code coverage profiler (grayed out text) by default;
&gt; &gt; 
&gt; &gt; When doing this, it would be good to understand its performance impact. We
&gt; &gt; spent a lot of time optimizing performance when the inspector is open for
&gt; &gt; Timelines. It would be good to understand what the impact of this is if we
&gt; &gt; have it always on. Or, change Timeline recording to also turn this off, to
&gt; &gt; avoid a performance impact.
&gt; 
&gt; The front-end doesn&apos;t do anything performance intensive until a JS resource
&gt; is visible.
&gt; 
&gt; I don&apos;t know what happens on the backend. Saam should know.

I&apos;m worried about how this will slow down content on the page. For example, running a benchmark with the code coverage enabled / not enabled. Anyone can run that and get numbers. It may be negligible, but we don&apos;t know until we measure. And we can&apos;t easily until this is separated from the Type Profiler, which you are doing!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1215460</commentid>
    <comment_count>9</comment_count>
    <who name="Nikita Vasilyev">nvasilyev</who>
    <bug_when>2016-07-28 16:47:02 -0700</bug_when>
    <thetext>Saam,

RuntimeAgent.enableTypeProfiler() currently enables both type profiler AND basic blocks annotator (for grayed out unexecuted code).

How hard would it be to decouple these two?

Currently, calling RuntimeAgent.getBasicBlocks before RuntimeAgent.enableTypeProfiler() results in error:
    [Error] Error in getting basic block locations: The VM does not currently have a Control Flow Profiler.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1215966</commentid>
    <comment_count>10</comment_count>
    <who name="Saam Barati">saam</who>
    <bug_when>2016-07-31 14:24:34 -0700</bug_when>
    <thetext>(In reply to comment #0)
&gt; * Split code coverage and type profilers;
This should be easy to do. It probably requires hacking
on the protocol a bit, but the control flow profiler, and type profiler,
are logically separate inside JSC. I can help review such a patch. I agree
with Brian that this should be done in its own patch (I have less preference on
the combining of other bits in other patches because I don&apos;t work on Inspector much).

&gt; * Turn on code coverage profiler (grayed out text) by default;
This sounds like a good idea to me. The performance impact of control flow
profiler was something like 10% last time I checked. Maybe a bit less.
But regardless, as Joe mentioned, this should definitely be disabled when
recording a timeline. We don&apos;t want this influencing the data we get out
of the sampling profiler.

&gt; * Turn off type profiler (type info pills) by default;
Isn&apos;t this already the default?

&gt; * [T] button will continue to toggle type profiler but won&apos;t affect code
&gt; coverage profiler;
Sounds good to me.

&gt; * Code hotness visualizer, when implemented, will introduce a new button
&gt; next to [T] and will be off by default.
What is the code hotness visualizer? Is this going to use data from the sampling
profiler? Were you thinking this should be a hybrid of the sampling profiler and
the control flow profiler? I think it&apos;s really important that it&apos;s not a hybrid.
We don&apos;t want the control flow profiler to be enabled when sampling because it
will bias the data we get from the sample. We worked really hard to have the inspector
disable other JSC profilers/debugger features while taking a sample because we
want JSC to run the program being sampled in as close to its natural state as possible.

I guess if it&apos;s not a hybrid of these two profilers, it&apos;s important to ask if we really
need to decouple this from the type profiler. It seems like there is both good and bad
in doing this. It&apos;s nice to have the control flow profiler always on. It&apos;s bad to add complexity
to the inspector&apos;s interface by allowing them to be decoupled. Others probably have stronger/more
informed opinions about this than me.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1216177</commentid>
    <comment_count>11</comment_count>
    <who name="Nikita Vasilyev">nvasilyev</who>
    <bug_when>2016-08-01 11:34:20 -0700</bug_when>
    <thetext>(In reply to comment #10)
&gt; (In reply to comment #0)
&gt; &gt; * Split code coverage and type profilers;
&gt; This should be easy to do. It probably requires hacking
&gt; on the protocol a bit, but the control flow profiler, and type profiler,
&gt; are logically separate inside JSC. I can help review such a patch. I agree
&gt; with Brian that this should be done in its own patch (I have less preference
&gt; on
&gt; the combining of other bits in other patches because I don&apos;t work on
&gt; Inspector much).

I agree now that backend (JSC) and Web Inspector front-end changes should be
in separate patches.

&gt; 
&gt; &gt; * Turn on code coverage profiler (grayed out text) by default;
&gt; This sounds like a good idea to me. The performance impact of control flow
&gt; profiler was something like 10% last time I checked. Maybe a bit less.
&gt; But regardless, as Joe mentioned, this should definitely be disabled when
&gt; recording a timeline. We don&apos;t want this influencing the data we get out
&gt; of the sampling profiler.

Yes, it should be disabled when recording a timeline.

&gt; 
&gt; &gt; * Turn off type profiler (type info pills) by default;
&gt; Isn&apos;t this already the default?

Yes, it is. I meant to write &quot;Keep type profiler turned off by default&quot;.

&gt; &gt; * Code hotness visualizer, when implemented, will introduce a new button
&gt; &gt; next to [T] and will be off by default.
&gt; What is the code hotness visualizer? Is this going to use data from the
&gt; sampling
&gt; profiler? Were you thinking this should be a hybrid of the sampling profiler
&gt; and
&gt; the control flow profiler? I think it&apos;s really important that it&apos;s not a
&gt; hybrid.
&gt; We don&apos;t want the control flow profiler to be enabled when sampling because
&gt; it
&gt; will bias the data we get from the sample. We worked really hard to have the
&gt; inspector
&gt; disable other JSC profilers/debugger features while taking a sample because
&gt; we
&gt; want JSC to run the program being sampled in as close to its natural state
&gt; as possible.

I had written this before sampling profiler was implemented.
Let&apos;s keep the code hotness visualizer, whatever it would be, out of the scope of this bug.

&gt; 
&gt; I guess if it&apos;s not a hybrid of these two profilers, it&apos;s important to ask
&gt; if we really
&gt; need to decouple this from the type profiler. It seems like there is both
&gt; good and bad
&gt; in doing this. It&apos;s nice to have the control flow profiler always on. It&apos;s
&gt; bad to add complexity
&gt; to the inspector&apos;s interface by allowing them to be decoupled. Others
&gt; probably have stronger/more
&gt; informed opinions about this than me.

I find type profiler too intrusive to keep it enabled all the time. 
The control flow profiler adds a lot of value and doesn&apos;t
take any extra screen space.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1218543</commentid>
    <comment_count>12</comment_count>
    <who name="Joseph Pecoraro">joepeck</who>
    <bug_when>2016-08-08 11:57:29 -0700</bug_when>
    <thetext>(In reply to comment #11)
&gt; (In reply to comment #10)
&gt; &gt; (In reply to comment #0)
&gt; &gt; &gt; * Split code coverage and type profilers;
&gt; &gt; [...] I agree with Brian that this should be done in its own patch
&gt; &gt; (I have less preference on the combining of other bits in other
&gt; &gt; patches because I don&apos;t work on Inspector much).
&gt; 
&gt; I agree now that backend (JSC) and Web Inspector front-end changes should be
&gt; in separate patches.

This is not so much about separate patches for backend and frontend changes. This is about separate patches for separate work. Splitting the two profilers is a single task, and that task should have its own bug and patch, separate from all the other tasks mentioned in this bug.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="1"
              ispatch="1"
              isprivate="0"
          >
            <attachid>284830</attachid>
            <date>2016-07-28 16:12:35 -0700</date>
            <delta_ts>2016-07-28 16:14:44 -0700</delta_ts>
            <desc>WIP</desc>
            <filename>WIP.txt</filename>
            <type>text/plain</type>
            <size>4811</size>
            <attacher name="Nikita Vasilyev">nvasilyev</attacher>
            
              <data encoding="base64">ZGlmZiAtLWdpdCBhL1NvdXJjZS9XZWJJbnNwZWN0b3JVSS9Vc2VySW50ZXJmYWNlL1ZpZXdzL1Nv
dXJjZUNvZGVUZXh0RWRpdG9yLmpzIGIvU291cmNlL1dlYkluc3BlY3RvclVJL1VzZXJJbnRlcmZh
Y2UvVmlld3MvU291cmNlQ29kZVRleHRFZGl0b3IuanMKaW5kZXggOWE5Njk3Mi4uMjk0NGI2MyAx
MDA2NDQKLS0tIGEvU291cmNlL1dlYkluc3BlY3RvclVJL1VzZXJJbnRlcmZhY2UvVmlld3MvU291
cmNlQ29kZVRleHRFZGl0b3IuanMKKysrIGIvU291cmNlL1dlYkluc3BlY3RvclVJL1VzZXJJbnRl
cmZhY2UvVmlld3MvU291cmNlQ29kZVRleHRFZGl0b3IuanMKQEAgLTEwOCw4ICsxMDgsMTEgQEAg
V2ViSW5zcGVjdG9yLlNvdXJjZUNvZGVUZXh0RWRpdG9yID0gY2xhc3MgU291cmNlQ29kZVRleHRF
ZGl0b3IgZXh0ZW5kcyBXZWJJbnNwZWMKICAgICAgICAgICAgIGlmICghdGhpcy5fdHlwZVRva2Vu
U2Nyb2xsSGFuZGxlciAmJiAodGhpcy5fdHlwZVRva2VuQW5ub3RhdG9yIHx8IHRoaXMuX2Jhc2lj
QmxvY2tBbm5vdGF0b3IpKQogICAgICAgICAgICAgICAgIHRoaXMuX2VuYWJsZVNjcm9sbEV2ZW50
c0ZvclR5cGVUb2tlbkFubm90YXRvcigpOwogICAgICAgICB9IGVsc2UgewotICAgICAgICAgICAg
aWYgKHRoaXMuX3R5cGVUb2tlbkFubm90YXRvciB8fCB0aGlzLl9iYXNpY0Jsb2NrQW5ub3RhdG9y
KQorICAgICAgICAgICAgaWYgKHRoaXMuX3R5cGVUb2tlbkFubm90YXRvcikKICAgICAgICAgICAg
ICAgICB0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m90YXRvckVuYWJsZWRTdGF0ZSh0cnVlKTsKICAgICAg
ICAgfQogCkBAIC0xNzIzLDYgKzE3NDQsMjEgQEAgV2ViSW5zcGVjdG9yLlNvdXJjZUNvZGVUZXh0
RWRpdG9yID0gY2xhc3MgU291cmNlQ29kZVRleHRFZGl0b3IgZXh0ZW5kcyBXZWJJbnNwZWMKICAg
ICAgICAgdGhpcy5fdXBkYXRlVG9rZW5UcmFja2luZ0NvbnRyb2xsZXJTdGF0ZSgpOwogICAgIH0K
IAorICAgIF9zZXRCYXNpY0Jsb2NrQW5ub3RhdG9yRW5hYmxlZFN0YXRlKHNob3VsZEFjdGl2YXRl
KQorICAgIHsKKyAgICAgICAgaWYgKHNob3VsZEFjdGl2YXRlKSB7CisgICAgICAgICAgICBjb25z
b2xlLmFzc2VydCh0aGlzLnZpc2libGUsICJBbm5vdGF0b3JzIHNob3VsZCBub3QgYmUgZW5hYmxl
ZCBpZiB0aGUgVGV4dEVkaXRvciBpcyBub3QgdmlzaWJsZSIpOworCisgICAgICAgICAgICBpZiAo
dGhpcy5fYmFzaWNCbG9ja0Fubm90YXRvcikgeworICAgICAgICAgICAgICAgIGNvbnNvbGUuYXNz
ZXJ0KCF0aGlzLl9iYXNpY0Jsb2NrQW5ub3RhdG9yLmlzQWN0aXZlKCkpOworICAgICAgICAgICAg
ICAgIHRoaXMuX2Jhc2ljQmxvY2tBbm5vdGF0b3IucmVzZXQoKTsKKyAgICAgICAgICAgIH0KKyAg
ICAgICAgfSBlbHNlIHsKKyAgICAgICAgICAgIGlmICh0aGlzLl9iYXNpY0Jsb2NrQW5ub3RhdG9y
KQorICAgICAgICAgICAgICAgIHRoaXMuX2Jhc2ljQmxvY2tBbm5vdGF0b3IuY2xlYXIoKTsKKyAg
ICAgICAgfQorICAgIH0KKwogICAgIF9nZXRBc3NvY2lhdGVkU2NyaXB0KCkKICAgICB7CiAgICAg
ICAgIHZhciBzY3JpcHQgPSBudWxsOwo=
</data>
<flag name="review"
          id="308489"
          type_id="1"
          status="-"
          setter="nvasilyev"
    />
    <flag name="commit-queue"
          id="308490"
          type_id="3"
          status="-"
          setter="nvasilyev"
    />
          </attachment>
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>284831</attachid>
            <date>2016-07-28 16:14:44 -0700</date>
            <delta_ts>2016-07-28 16:14:44 -0700</delta_ts>
            <desc>WIP</desc>
            <filename>WIP.txt</filename>
            <type>text/plain</type>
            <size>4792</size>
            <attacher name="Nikita Vasilyev">nvasilyev</attacher>
            
              <data encoding="base64">ZGlmZiAtLWdpdCBhL1NvdXJjZS9XZWJJbnNwZWN0b3JVSS9Vc2VySW50ZXJmYWNlL1ZpZXdzL1Nv
dXJjZUNvZGVUZXh0RWRpdG9yLmpzIGIvU291cmNlL1dlYkluc3BlY3RvclVJL1VzZXJJbnRlcmZh
Y2UvVmlld3MvU291cmNlQ29kZVRleHRFZGl0b3IuanMKaW5kZXggOWE5Njk3Mi4uYzFlMTUzYyAx
MDA2NDQKLS0tIGEvU291cmNlL1dlYkluc3BlY3RvclVJL1VzZXJJbnRlcmZhY2UvVmlld3MvU291
cmNlQ29kZVRleHRFZGl0b3IuanMKKysrIGIvU291cmNlL1dlYkluc3BlY3RvclVJL1VzZXJJbnRl
cmZhY2UvVmlld3MvU291cmNlQ29kZVRleHRFZGl0b3IuanMKQEAgLTEwOCw4ICsxMDgsMTEgQEAg
V2ViSW5zcGVjdG9yLlNvdXJjZUNvZGVUZXh0RWRpdG9yID0gY2xhc3MgU291cmNlQ29kZVRleHRF
ZGl0b3IgZXh0ZW5kcyBXZWJJbnNwZWMKICAgICAgICAgICAgIGlmICghdGhpcy5fdHlwZVRva2Vu
U2Nyb2xsSGFuZGxlciAmJiAodGhpcy5fdHlwZVRva2VuQW5ub3RhdG9yIHx8IHRoaXMuX2Jhc2lj
QmxvY2tBbm5vdGF0b3IpKQogICAgICAgICAgICAgICAgIHRoaXMuX2VuYWJsZVNjcm9sbEV2ZW50
c0ZvclR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ICAg
dGhpcy5fYmFzaWNCbG9ja0Fubm90YXRvci5jbGVhcigpOworICAgICAgICB9CisgICAgfQorCiAg
ICAgX2dldEFzc29jaWF0ZWRTY3JpcHQoKQogICAgIHsKICAgICAgICAgdmFyIHNjcmlwdCA9IG51
bGw7Cg==
</data>
<flag name="review"
          id="308491"
          type_id="1"
          status="-"
          setter="nvasilyev"
    />
    <flag name="commit-queue"
          id="308492"
          type_id="3"
          status="-"
          setter="nvasilyev"
    />
          </attachment>
      

    </bug>

</bugzilla>