Bug 163408 - Web Inspector: Call RuntimeAgent.disableTypeProfiler when Type Profiler is turned off
Summary: Web Inspector: Call RuntimeAgent.disableTypeProfiler when Type Profiler is tu...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (show other bugs)
Version: WebKit Nightly Build
Hardware: All All
: P2 Normal
Assignee: Nikita Vasilyev
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2016-10-13 15:18 PDT by Nikita Vasilyev
Modified: 2016-11-11 12:42 PST (History)
7 users (show)

See Also:


Attachments
Patch (2.15 KB, patch)
2016-11-11 12:03 PST, Nikita Vasilyev
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Nikita Vasilyev 2016-10-13 15:18:33 PDT
Disabling Type Profiler by clicking the [T] button should signal the backend to stop collecting the data by calling RuntimeAgent.disableTypeProfiler method.

RuntimeAgent.disableTypeProfiler is currently unused.
Comment 1 Radar WebKit Bug Importer 2016-10-13 15:18:53 PDT
<rdar://problem/28764269>
Comment 2 Nikita Vasilyev 2016-11-10 11:38:16 PST
There's a comment in _setTypeTokenAnnotatorEnabledState method:

// Because we disable type profiling when exiting the inspector, there is no need to call
// RuntimeAgent.disableTypeProfiler() here.  If we were to call it here, JavaScriptCore would
// compile out all the necessary type profiling information, so if a user were to quickly press then
// unpress the type profiling button, we wouldn't be able to re-show type information which would
// provide a confusing user experience.

Sometimes I disable Type Profiler to read code with less distractions and then turn it back on.
Unlike Code Coverage, enabling Type Profiler adds tokens that take up space.

I think it makes a lot of sense to call RuntimeAgent.disableControlFlowProfiler() when turning off Code Coverage
by clicking [C] icon. Disabling Type Profiler, however, has drawbacks.

Any opinions?
Comment 3 Nikita Vasilyev 2016-11-11 12:03:49 PST
Created attachment 294517 [details]
Patch

Here's a patch that makes Type Profiler consistent with Code Coverage.
Comment 4 WebKit Commit Bot 2016-11-11 12:42:03 PST
Comment on attachment 294517 [details]
Patch

Clearing flags on attachment: 294517

Committed r208604: <http://trac.webkit.org/changeset/208604>
Comment 5 WebKit Commit Bot 2016-11-11 12:42:07 PST
All reviewed patches have been landed.  Closing bug.