Bug 104647 - Profiler should show bytecode dumps as they would have been visible to the JITs, including the profiling data that the JITs would see
Summary: Profiler should show bytecode dumps as they would have been visible to the JI...
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Filip Pizlo
Depends on:
Reported: 2012-12-11 01:08 PST by Filip Pizlo
Modified: 2012-12-11 16:22 PST (History)
7 users (show)

See Also:

WRONG PATCH (1.60 KB, patch)
2012-12-11 01:11 PST, Filip Pizlo
no flags Details | Formatted Diff | Diff
work in progress (35.65 KB, patch)
2012-12-11 01:12 PST, Filip Pizlo
no flags Details | Formatted Diff | Diff
sample profiling session (27.55 KB, text/plain)
2012-12-11 14:23 PST, Filip Pizlo
no flags Details
the patch (60.73 KB, patch)
2012-12-11 14:34 PST, Filip Pizlo
oliver: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Filip Pizlo 2012-12-11 01:08:52 PST
The profiler currently records the bytecode at the time that it is first generated.  But bytecode changes over time to incorporate profiling and inline caches.  Currently the bytecode dumps already tell us:

- the state of inline caches of heap accesses
- the state of inline caches of calls

And the bytecode dumps could easily also tell us:

- slow path profiling data
- value profiles

One way to make this all useful is to enable the profiler to see the bytecode dumps at the time that the JITs were invoked.
Comment 1 Filip Pizlo 2012-12-11 01:11:58 PST
Created attachment 178744 [details]
Comment 2 Filip Pizlo 2012-12-11 01:12:50 PST
Created attachment 178745 [details]
work in progress
Comment 3 Filip Pizlo 2012-12-11 14:23:43 PST
Created attachment 178876 [details]
sample profiling session

This shows some of the changes that this patch makes.

- You now see the instruction count in the full summary.
- The full summary is now the default thing displayed when you run the tool (if you want the summary that just includes function names, source counts, and source, then use "s" or "summary")
- New command, "profiling" or "p", which shows all of the profiling views that the JITs saw for each compilation that involved that code block.  In this example I'm looking at a code block that gets inlined *a lot*.  It's fun to see how the profiling "evolves" over time.
Comment 4 Filip Pizlo 2012-12-11 14:34:08 PST
Created attachment 178879 [details]
the patch
Comment 5 Filip Pizlo 2012-12-11 16:22:55 PST
Landed in http://trac.webkit.org/changeset/137379