Commit Graph

27 Commits

Author SHA1 Message Date
Leszek Swirski
9bfc84f18f [tools] Use code attribution in timeline view
Reflect the code attribution (in particular, "attribute non-functions to
JS functions") in the timeline view, which visualises the distribution
of each code kind. This allows easier visualisation of which tiers are
active, ignoring stubs that are shared between tiers (like ICs).

Change-Id: I1f2818ffd4e466ce18c01627865186e6a94e2bed
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4105021
Auto-Submit: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84829}
2022-12-14 10:04:50 +00:00
Camillo Bruni
f30f3815f6 [tools] Profview fixes
- Use consistent names: Ignition, Sparkplug, Maglev, Turbofan
- Fix parsing Sparkpliug / Baseline entries
- Fix c++filt calls for recent MacOS versions
- Do not visualise Turboprop entries anymore

Change-Id: Id8fc83c0822383d4c552c898b15c720c44b95cd7
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3865309
Reviewed-by: Jakob Linke <jgruber@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82822}
2022-08-30 13:55:08 +00:00
Camillo Bruni
d121e8eee0 [tools] Add placeholder comment for analytics code
Drive-by-fix: Clean up html header tags a bit

Change-Id: Ib9d3e0a24497f393b1d45b7b6ab46af381252613
No-Try: True
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3845076
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Victor Gomes <victorgomes@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82620}
2022-08-22 12:41:18 +00:00
JialuZhang-intel
6e692296ba [tools] fix deopt func count error in profview.
The "Deoptimized function count" displayed in profview tool
should be the sum of deopt-eager, deopt-lazy and deopt-soft.

Change-Id: I42252930c3685f1ca721691f983abb8adeb492e6
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3793469
Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
Commit-Queue: Jialu Zhang <jialu.zhang@intel.com>
Cr-Commit-Position: refs/heads/main@{#82220}
2022-08-05 11:05:04 +00:00
Camillo Bruni
615255dd4e [tools] Profiler builtins and sparkplug fixes
- Add filter to skip baseline handlers
- Make profiler types more readable
- Refactor tickprocessor test to use serialized symbols
- Add large tickprocessor stress test with a complete V8 log

Change-Id: Icc09c2eb8ea63c1805d793d2d47f79b0d5080b5b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2784686
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Patrick Thier <pthier@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74094}
2021-04-21 11:44:31 +00:00
Jakob Gruber
5ecb5bd978 [nci] Remove more NCI-specific logic
Some logic still remains, notably in compiler/.

Bug: v8:8888
Change-Id: I7e7f10a487e1bc8b90bbbfedbc46bf09bae0717e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2825589
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73969}
2021-04-15 09:01:49 +00:00
Camillo Bruni
2668907759 [tools] Fix profview for sparkplug
- Handle sparkplug code
- Handle regexp code-creation events in the tick-processor, which
  have no valid state marker in the maybe_func data
- Remove calls to print() that break the tick-processor web version

Change-Id: Ic726d1ae3a41cd46f42cf5498e8463564d3b6b83
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2784562
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Patrick Thier <pthier@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73631}
2021-03-24 13:22:21 +00:00
Mythri A
aac25548c2 [tools,turboprop] Extend profview to show turboprop information
This cl extends profview to
1. Show Turboprop ticks in a different color in timeline panel
2. In summary panel, show Turboprop optimizations and TurboFan
optimizations as two different entries
3. Fix deopts in summary panel after the rename to deopts
4. Also show information about bailouts (happen only with Turboprop)

Bug: v8:9684
Change-Id: I028b12a55741c789ecc1d212d1517a57496379dc
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2573477
Commit-Queue: Mythri Alle <mythria@chromium.org>
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#71638}
2020-12-07 10:17:25 +00:00
Mythri A
abc448881a [tools] Update profview landing page with instructions for Android
Change-Id: I4afb695505d145221feca3ff365e0f96b097a6ef
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2573483
Commit-Queue: Mythri Alle <mythria@chromium.org>
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#71636}
2020-12-07 09:59:05 +00:00
Leszek Swirski
d92705e53b [profview] Use requestAnimationFrame to schedule a render
This is more idiomatic than using a Promise.

Change-Id: I61443e90ef1c0c589284851ea9be410153919eb5
Reviewed-on: https://chromium-review.googlesource.com/c/456278
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58828}
2019-01-15 13:08:46 +00:00
Jaroslav Sevcik
d0a638b124 [profview] Fix the source indexing with ids.
This addresses bunch of problems introduced by the attempt to
remove indexing by function names
https://chromium-review.googlesource.com/c/1267496.

Now I tested with the right version of the file :-)

Change-Id: Idfc8a17a0890d0453d14b949388c34c36a0b64f5
Reviewed-on: https://chromium-review.googlesource.com/c/1270575
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Jaroslav Sevcik <jarin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56463}
2018-10-09 07:05:50 +00:00
Jaroslav Sevcik
2218d41803 [profview] Use function/script id rather than the name string.
Using function ids is more reliable since there can be several functions
or scripts with the same name. Also, that way we do not have to parse
anything.

Change-Id: If657141d0d6e27dabb49456e0275cce65e753541
Reviewed-on: https://chromium-review.googlesource.com/c/1267496
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Jaroslav Sevcik <jarin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56431}
2018-10-08 06:18:51 +00:00
Bret Sepulveda
b9cb78a705 profview: View source code of functions with samples inline.
If profiling is done with --log-source-code profview will now display
a "View source" link for each function in the tree view. Clicking this
will show a new source viewer, with sampled lines highlighted. See the
associated bug for screenshots.

This patch also fixes a bug in the profiler where the source info of
only the first code object for each function would be logged, and
includes some refactoring.

Bug: v8:6240
Change-Id: Ib96a9cfc54543d0dc9bef4657cdeb96ce28b223c
Reviewed-on: https://chromium-review.googlesource.com/1194231
Commit-Queue: Bret Sepulveda <bsep@chromium.org>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55542}
2018-08-31 11:32:33 +00:00
Bret Sepulveda
cb65864d29 profview: Fix leaking state when switching log files.
When switching log files, if a function was selected the timeline would
attempt to draw its ticks and would usually crash. It would also
preserve the selected section of the timeline.

This patch wipes out the current state when loading a new log file,
with the exception of the current mode (Summary, Bottom up, etc). As a
consequence, the timeline size is now calculated in TimelineView.render
so it will always be drawn at the right size.

Bug: v8:6240
Change-Id: Ie15dd9b225901c8f4df614444458ae2aeaf74ccc
Reviewed-on: https://chromium-review.googlesource.com/1186340
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Commit-Queue: Bret Sepulveda <bsep@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55339}
2018-08-23 10:26:43 +00:00
Bret Sepulveda
6fcf0a0e3d profview: Improve behavior when given a log with few ticks.
Previously, when given a log with few ticks, the timeline would lump
them all into one or two buckets. This patch allows ticks to be assigned
to buckets more sparsely.

This patch also fixes a bug where there was a gap on the right side of
the timeline, which also caused the function tick marks to be slightly
misaligned. This was more noticable with fewer buckets.

Bug: v8:6240
Change-Id: Ib7353c0420caec8591590815271d329ea1a030fb
Reviewed-on: https://chromium-review.googlesource.com/1174440
Commit-Queue: Bret Sepulveda <bsep@chromium.org>
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55125}
2018-08-14 13:34:51 +00:00
Bret Sepulveda
38e0fb849f profview: Make entire tree row clickable, and change row node structure.
This patch also includes some CSS tweaks and other minor cleanup.

Bug: v8:6240
Change-Id: I86e26fe53465dff6f9a706f58e565b1f1ee559da
Reviewed-on: https://chromium-review.googlesource.com/1172360
Commit-Queue: Bret Sepulveda <bsep@chromium.org>
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55089}
2018-08-13 14:19:30 +00:00
Bret Sepulveda
9459544d7e profview: Change bucket colors.
This patch reshuffles the colors used for the various tick categories in
the visualization. Category rows are now light gray. The new colors are
taken from the Material palette. See screenshots on the associated bug.

This patch also labels the GC bucket as such, instead of having the same
label as uncategorized C++.

Bug: v8:6240
Change-Id: I3909a177148b98e99d63f5ec9ae02e3c6f63eb24
Reviewed-on: https://chromium-review.googlesource.com/1172139
Commit-Queue: Bret Sepulveda <bsep@chromium.org>
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55078}
2018-08-13 09:40:31 +00:00
Franziska Hinkelmann
022b2d499a [profview] Use identity operator
Use !== instead of !=.

Bug: 
Change-Id: I3f8127d54b80973f9ea7bb6ddf25afd928cb3045
Reviewed-on: https://chromium-review.googlesource.com/753733
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Commit-Queue: Franziska Hinkelmann <franzih@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49210}
2017-11-08 09:11:33 +00:00
Leszek Swirski
dadbde038d [profview] Distinguish between parse/opt/unopt compile
Rather than lumping in parsing, bytecode compilation and optimized
compilation all into the same VM "compile" state, seperate them out
into individual states.  Additionally, add support for these states
to tickprocessor and profview.

Cq-Include-Trybots: master.tryserver.chromium.linux:linux_chromium_rel_ng
Change-Id: I5be943e23cae042e32e9ccb24415c67c18658b4b
Reviewed-on: https://chromium-review.googlesource.com/608973
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Reviewed-by: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47283}
2017-08-10 15:44:36 +00:00
jarin
9ff68b0c47 [profview] Add runtime-entry top-down tree.
Review-Url: https://codereview.chromium.org/2811953003
Cr-Commit-Position: refs/heads/master@{#44561}
2017-04-11 11:33:47 +00:00
jarin
12d815b36e [profiler] Web UI: add summary of opts/deopts.
This adds optimization and deoptimization counts to the Web UI. Also, the function timeline
now shows optimization and deoptimization marks.

Review-Url: https://codereview.chromium.org/2753543006
Cr-Commit-Position: refs/heads/master@{#44033}
2017-03-22 16:02:25 +00:00
Leszek Swirski
64746e5fed [profview] Show all variants of a function in the timeline
When displaying a single function's timeline, display all its variants
(colour-coded by kind) instead of just the ones with the same code-id.
This allows us to see all optimised versions of a function, as well as
changes between optimised and unoptimised.

Drive-by -- Do some rounding to get rendering pixel-perfect.

Change-Id: I385c83b39414ac5e59208b7a25b488d6a283e2b0

NOTRY=true

Change-Id: I385c83b39414ac5e59208b7a25b488d6a283e2b0
Reviewed-on: https://chromium-review.googlesource.com/455833
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#43894}
2017-03-17 12:09:32 +00:00
leszeks
65a07b7a10 [tools/profview] Add individual function timeline view
Adds a bar below the current timeline view which can show the time
when an individual function was on the stack. Functions in the call
stack are now clickable to show them in this view.

Sections where the function was on the stack, but not at the top, are
displayed at half height.

Review-Url: https://codereview.chromium.org/2737083003
Cr-Commit-Position: refs/heads/master@{#43673}
2017-03-08 15:03:22 +00:00
jarin
698c2f3bbd [profiler] Web UI - add time-as-text description to the interval highlight.
Review-Url: https://codereview.chromium.org/2732883004
Cr-Commit-Position: refs/heads/master@{#43639}
2017-03-07 13:29:43 +00:00
jarin
3c63c40f3e [profiler] In the web UI, make all the call tree models lazy.
Review-Url: https://codereview.chromium.org/2736723003
Cr-Commit-Position: refs/heads/master@{#43614}
2017-03-06 14:59:41 +00:00
jarin
437dece4d9 [profiler] This adds function butterflies to the function list.
The function list is now filtered by category by default, and sorting improved to break ties better.

Since the butterfly trees get massive, I had to start expanding the call trees on demand. This is implemented by keeping track of all ticks that cross given tree node (+ position where they crosses it). This seems to work quite well - in subsequent CL, I am planning to flip the bottom-up and top-down trees to use this.

Review-Url: https://codereview.chromium.org/2730293002
Cr-Commit-Position: refs/heads/master@{#43602}
2017-03-06 09:37:37 +00:00
jarin
fcce4797bc [profiler] Graphical front-end for tick processor.
Improvements:
- top-down call tree.
- interactive restriction to time interval.

Review-Url: https://codereview.chromium.org/2696903002
Cr-Commit-Position: refs/heads/master@{#43599}
2017-03-04 13:04:58 +00:00