Bug 88446 - Web Inspector: [Chromium] profiler - differentiate between native code (program) and idle time
Summary: Web Inspector: [Chromium] profiler - differentiate between native code (progr...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (Deprecated) (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Eugene Klyuchnikov
URL:
Keywords:
Depends on: 103120
Blocks:
  Show dependency treegraph
 
Reported: 2012-06-06 13:07 PDT by Paul Irish
Modified: 2012-12-20 00:46 PST (History)
14 users (show)

See Also:


Attachments
Patch (2.89 KB, patch)
2012-12-18 06:57 PST, Eugene Klyuchnikov
pfeldman: review+
Details | Formatted Diff | Diff
Patch (2.96 KB, patch)
2012-12-18 21:11 PST, Eugene Klyuchnikov
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Paul Irish 2012-06-06 13:07:59 PDT
The term (program) in the profiler is unclear to developers. It accounts for native code execution (captured by about:profiler in chromium) as well as idle time. Is it possible to identify what is real idle time?

A common use case is:

* User starts recording a profiler session
* User does an action which could use optimization
* User stops recording

What often happens is that the added time to manually start/stop the profiler in the GUI adds so much idle time that (program) can have %s of 90% or more. This makes the remaining percentages quite small and the user has to find "very expensive" operations that are taking < 1%.

"(idle)" would would help clarify this situation as well as perhaps an ability to filter out Idle time from the profiling totals.


From mnaganov: 

> Idle time is still native code time, so they both are combined in (program). To distinguish between them, we could tell the profiler that certain native functions it sees on the call stack actually mean idleness.
Comment 1 Mikhail Naganov 2012-06-07 01:49:56 PDT
I think this only relates to the Chromium port, as the JSC version already displays distinct entries for "(idle)" and "(program)"
Comment 2 Nicholas C. Zakas 2012-11-28 10:27:04 PST
The "(program)" is incredibly confusing for web developers, especially new ones. Just today, I had to tell a new web dev to ignore that, which caused much confusion. I came to realize even my understanding was incorrect. It appears that "(program)" is made up of several aspects, including idle time, native code, and globally executed JavaScript. In general, idle time isn't useful for debugging purposes. Likewise, native time isn't particularly useful without knowing how the JavaScript code is interacting with it. 

At the very least, separating these three out would give some clarity (though I would whole-heartedly love to eliminate idle and native code completely - just not useful enough).
Comment 3 Eugene Klyuchnikov 2012-12-18 06:57:25 PST
Created attachment 179933 [details]
Patch
Comment 4 Pavel Feldman 2012-12-18 09:43:21 PST
Comment on attachment 179933 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=179933&action=review

> Source/WebCore/ChangeLog:10
> +        injected as a top level node ti profile.

to profile.
Comment 5 Eugene Klyuchnikov 2012-12-18 21:11:21 PST
Created attachment 180084 [details]
Patch
Comment 6 Eugene Klyuchnikov 2012-12-18 21:13:02 PST
Comment on attachment 179933 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=179933&action=review

>> Source/WebCore/ChangeLog:10
>> +        injected as a top level node ti profile.
> 
> to profile.

Fixed.
Comment 7 WebKit Review Bot 2012-12-18 22:43:12 PST
Comment on attachment 180084 [details]
Patch

Clearing flags on attachment: 180084

Committed r138118: <http://trac.webkit.org/changeset/138118>