Commit Graph

23 Commits

Author SHA1 Message Date
George Wort
0282737d83 [turbolizer] Display live ranges with sequences
Display register allocation live ranges alongside sequences in
turbolizer.

The existing --trace-turbo flag now also outputs the register
allocation data as part of the json file alongside the
instruction sequence data that is already produced before and
after register allocation is performed. This data includes live
range intervals for each virtual and fixed register and the state
of their assignments.

This json data can now be displayed in turbolizer alongside the
instruction sequences. The information is presented as a grid,
with each grid cell representing a LifeTimePosition of a certain
virtual register, determined by the column and row indices
respectively. Each LifeTimePosition is shown to be part of an
instruction id which itself is shown to be part of a block id.
Each interval is shown as a coloured rectangle positioned over
the relevant cells, and displaying text to indicate the state of
their assignment.

The Resizer object has been extended to allow the grid's html
panel to be varied in size in the same manner that the left and
right panels can be. The size of the grid itself must also be
adjusted whenever the div container changes size.

The RangeView class is introduced and is created and held by the
single SequenceView object used to display the
InstructionSequence data before and after register allocation.
A checkbox allows the user to show/hide the range view, this is
disabled when register allocation data is not provided or more
than 249 instructions are in the sequence. The latter being
required due to the css grid-row-col limit of 1000 alond with
helping alleviate performance issues. The SequenceView object
tracks the phase index currently selected as well as whether or
not it is currently being shown. This ensures that the RangeView
is not hidden and shown when switching between before and after
register allocation, allowing for a smoother transition between
the two. The scroll position is also saved and restored for
convenience.

The data about the instruction sequence required for the display
is held by the RangeView object and reset whenever a new
instruction sequence is shown. The grid div must sync its scroll
with the headers and row labels so as to ensure a consistent
view. The register allocation data is extracted from the json,
with each register row showing all intervals within the relevant
ranges. When the view is switched between before and after
register allocation, the relevant intervals are swapped in.

Bug: v8:7327
Notry: true
Change-Id: I183535a2410a7d663382f387199885250fb98691
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2184232
Reviewed-by: Georg Neis <neis@chromium.org>
Reviewed-by: Santiago Aboy Solanes <solanes@chromium.org>
Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68019}
2020-05-27 15:50:45 +00:00
Santiago Aboy Solanes
2187575733 [turbolizer] Toggling maximize keeps the side panels size consistent
We now keep the same percentage of the window occupied by the panel
when toggling Maximize (both maximizing, or un-maximizing). This
also means that it no longer forces the side panels open when
toggling maximizing.

Also took the opportunity and cleaned up names and resizer.ts.

Bug: v8:7327
Change-Id: I60b574a833f3059e447aa17fae8a687d32ac29d5
Notry: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1903970
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#65085}
2019-11-20 19:08:57 +00:00
Santiago Aboy Solanes
b137286b16 [turbolizer] Solve prettify issues
PR wasn't defined correctly and it was causing issues.

Added prettify to the npm packages, and removed the (not needed)
explicit prettify.css.

Bug: v8:7327
Change-Id: Ieb8999d63df6764354dd628516e0ed9270b8a862
Notry: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1893344
Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org>
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Cr-Commit-Position: refs/heads/master@{#64726}
2019-11-04 10:31:30 +00:00
Mathias Bynens
638d1b3137 [tools] Clean up HTML for tools
This patch ensures each HTML page has a DOCTYPE (to trigger
standards mode as opposed to quirks mode), a <meta
charset="utf-8">, and a <title>.

Additionally, it removes redundant attribute/value pairs such
as `type="text/javascript"` on <script> elements or
`type="text/css"` on <style> or <link rel="stylesheet">
elements. [1]

Finally, it removes the optional solidus for self-closing HTML
elements. [2]

[1] https://mathiasbynens.be/notes/html5-levels#type-attributes
[2] https://mathiasbynens.be/notes/html5-levels#solidus

Change-Id: I66d2700be120dc8fd52bdf38f9d34749f55e1e7f
Reviewed-on: https://chromium-review.googlesource.com/c/1396084
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Mathias Bynens <mathias@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58561}
2019-01-06 14:20:33 +00:00
Sigurd Schneider
be11d9b875 [turbolizer] Add toolbar only after graph is loaded
This should make it possible to load a new graph without reloading
Turbolizer.

Notry: true
Change-Id: Ic6f8bdf7fee658836612043d8893614ae54d7e15
Bug: v8:7327
Reviewed-on: https://chromium-review.googlesource.com/c/1347476
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57716}
2018-11-22 09:03:19 +00:00
Sigurd Schneider
a43ba7dace [turbolizer] Add tabs to left and right pane
Notry: true
Bug: v8:7327
Change-Id: I5192891c85da12638e036b605713264d0e59aedc
Reviewed-on: https://chromium-review.googlesource.com/c/1324490
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57355}
2018-11-08 14:00:01 +00:00
Sigurd Schneider
e15e42487a [turbolizer] Make resizing easier to use
Increase width of resizers and clean up CSS.

Drive-by: Add hot recompile watch command. Run
  npm run-script watch
and rollup will recompile on file changes.

Notry: true
Bug: v8:7327
Change-Id: If24e18049ff565a7584b5cca9c64431e4ac03f77
Reviewed-on: https://chromium-review.googlesource.com/c/1320852
Reviewed-by: Georg Neis <neis@chromium.org>
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57353}
2018-11-08 13:35:37 +00:00
Sigurd Schneider
8c9f5ca80b [turbolizer] Do not scroll toolbox in middle pane
Change-Id: I1fe4454e3c0f2ec5cc044e36c311012d41e896a7
Notry: true
Bug: v8:7327
Reviewed-on: https://chromium-review.googlesource.com/c/1319768
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57287}
2018-11-06 15:25:34 +00:00
Sigurd Schneider
32224e4a14 [turbolizer] Improve page-load performance for >10MB json files
Notry: true
Change-Id: Iacc8aadc62956cf5fab13c60a9eaa52318519d62
Bug: v8:7327
Reviewed-on: https://chromium-review.googlesource.com/c/1317813
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: Stephan Herhut <herhut@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57267}
2018-11-06 10:22:36 +00:00
Sigurd Schneider
b8e3793a8e [turbolizer] Treeshake d3 library
Bug: v8:7327
Change-Id: I96fa8f6c2dbc9fb3da0be9a8b8d730cc1d1e3415
Reviewed-on: https://chromium-review.googlesource.com/1131456
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54452}
2018-07-16 08:45:20 +00:00
Sigurd Schneider
8a7d8f8142 [turbolizer] Migrate d3 from v3 to v5
This CL updates the d3.js library to version 5.4. The most notable
change is that the library can now distinguish between click and drag
events if an element supports both selection via click and displacement
via drag.

Curiously, npm created a 'package-lock.json', which is ~500 lines, and
which is supposed to be checked into the repository according to documentation.

Change-Id: Ifabd236296d951f390e0a1516d89e73138ce1713
Reviewed-on: https://chromium-review.googlesource.com/1076234
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53604}
2018-06-08 09:06:43 +00:00
Sigurd Schneider
d4258eb14c [turbolizer] Convert Turbolizer to TypeScript
Change-Id: I2be450c6498ce863d5e36acf02db643788e6c8bf
Reviewed-on: https://chromium-review.googlesource.com/1068045
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53400}
2018-05-29 10:07:41 +00:00
Sigurd Schneider
3cd0a367aa [turbolizer] Refactor view management
Change-Id: I6d84e7ef500aecd83a77ed2ce3fed4e15b29b7ac
Reviewed-on: https://chromium-review.googlesource.com/1065881
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: Peter Marshall <petermarshall@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53289}
2018-05-22 18:19:52 +00:00
Sigurd Schneider
a97a362d86 [turbolizer] Add support for inlined functions
This CL adds support for inlined functions in Turbolizer. It is also a
refactoring of the Turbolizer code-base. Most importantly, handling of
source positions changed to exact source positions, and not code ranges.
This improves selection interoperability between different phase views.

A separate CL changes the Turbolizer JSON format to include inlining
information. This Turbolizer update, however, is intended to be backwards
compatible with the JSON format Turbolizer generated before the JSON
format change.


Bug: v8:7327
Change-Id: Ic67506a6f3a36fe98c012b1e76994972779c1fd2
Reviewed-on: https://chromium-review.googlesource.com/1032784
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: Daniel Clifford <danno@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53213}
2018-05-16 13:43:14 +00:00
Sigurd Schneider
8432d3815a [turbolizer] Fix scrolling in disassembly view
Bug: v8:7327
Change-Id: Ic33a0d86f055ac5ec3607d8e57d796428f4b9d20
Reviewed-on: https://chromium-review.googlesource.com/873378
Reviewed-by: Georg Neis <neis@chromium.org>
Reviewed-by: Daniel Clifford <danno@chromium.org>
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Cr-Commit-Position: refs/heads/master@{#50682}
2018-01-18 13:47:35 +00:00
Sigurd Schneider
43d588cce6 [turbolizer] Eye candy that helps readability
- Turbolizer highlights input and output nodes on hover.
- The three panes support resizing now (snap to side still works).

Bug: 
Change-Id: Ida1513fd714a02ab772885ea1fdf6d9da8d540f6
Reviewed-on: https://chromium-review.googlesource.com/837068
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: Daniel Clifford <danno@chromium.org>
Cr-Commit-Position: refs/heads/master@{#50523}
2018-01-12 09:35:30 +00:00
Alexander.Gilday2
4a64e9497b [turbolizer] Improved display of perf profiling information.
All events recorded are shown in separate columns simulatneously, using
rectangles with heatmap-style colouring. Hovering over the shapes gives
the event name, count, and percentage.

BUG=

Review-Url: https://codereview.chromium.org/2228553004
Cr-Commit-Position: refs/heads/master@{#39408}
2016-09-14 09:45:41 +00:00
bgeron
5a4cbaedb1 [turbolizer] Give the HTML file a title, for bookmarks and tab labels.
BUG=

Review-Url: https://codereview.chromium.org/2293483002
Cr-Commit-Position: refs/heads/master@{#39297}
2016-09-08 21:29:01 +00:00
bgeron
01766cd8cc [turbolizer] Visualize also the dead nodes.
R=danno,jarin
BUG=

Review-Url: https://codereview.chromium.org/2226293002
Cr-Commit-Position: refs/heads/master@{#38502}
2016-08-09 16:20:32 +00:00
Alexander.Gilday2
286e2b14a5 [turbolizer] Add support for showing perf profiling information.
perf-turbo.py merges a perf data file and a turbofan trace file into a
single json object which can then be piped to a file and uploaded to
turbolizer to display the profiling data in the disassembly. With the
changes, turbolizer now shows the event counts for instruction in
percentage form and with heatmap-stype colouring. Multiple different
events can be recorded at once with a new drop-down menu to select which
event to view the counts of. The documentation has been updated with
instructions. Using the script is optional and turbolizer retains
previous functionality if a trace without profiling data is uploaded.

BUG=None

Review-Url: https://codereview.chromium.org/2174803002
Cr-Commit-Position: refs/heads/master@{#38124}
2016-07-28 09:42:38 +00:00
bgeron
7ef24ad99c [turbolizer] Style improvements.
- Remove duplicated CSS.
- Expand landing area of upload button.
- Give the toolbox a transparent white background.
- Make the phase-select box look nicer before file load.
- Remove the margin at the top of the screen.

The height of the margin was exactly the height of span#graph-toolbox,
and due to the semantics of position:relative, space was reserved for it
at the top of div#middle.

BUG=
R=danno

Review-Url: https://codereview.chromium.org/2164373002
Cr-Commit-Position: refs/heads/master@{#38003}
2016-07-25 09:50:41 +00:00
danno
deb67d7d05 [turbolizer]: Fix bugs
* The default text (placeholder) in the search box is now present.
* All key events handled by turbolizer are not passed through to Chrome.

Review-Url: https://codereview.chromium.org/2061713002
Cr-Commit-Position: refs/heads/master@{#36936}
2016-06-13 16:36:09 +00:00
danno
9c15c05596 Add a html-based visualizer for TurboFan graphs
Review-Url: https://codereview.chromium.org/729913004
Cr-Commit-Position: refs/heads/master@{#36351}
2016-05-19 08:18:01 +00:00