Wasm has the attribute sourceLineToBytecodePosition and adds the source
lines via setSourceLineToBytecodePosition in which they are 0-based.
Non-Wasm doesn't have that attribute and uses insertSourcePositions
which is 1-based. In non-wasm we are being off by one.
As a note, the sourcePositionsInRange call in insertSourcePositions
doesn't return a list for Wasm since they rely on
setSourceLineToBytecodePosition and therefore do not have that
off-by-one error.
Drive-by: Several elements have the same source position so update
addHtmlElementToSourcePosition to handle more than one element.
Drive-by: Renames due to having the same name but different
capitalization, which was confusing.
Bug: v8:7327
Change-Id: Ie8a066ca629054a5f5a754deec0ed1917bed2b33
Notry: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3008634
Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75655}
In the schedule phase (and only in this phase!) the node 0 was not
being selected due to `!0` being true. We meant to be checking
against undefined rather than this.
Bug: v8:7327
Notry: true
Change-Id: Ie675979219868725b0e345065cec7a2a7091fda8
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3008215
Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75585}
Now we can click any panel and connect to the others via highlight. Note
that we do not have a bijection between panels and (e.g. one node can be
several instructions in the generated code.
Bug: v8:7327, v8:11192
Notry: true
Change-Id: Idfabce98bfdfc1b6cd26d540e6f0bbac47754de1
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3001175
Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org>
Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75576}
Now, when we click an instruction in the register allocation phase we
will have highlighted both the middle panel and right panel.
Previously only the right panel was highlighted.
Note that the reverse is not yet true (i.e. clickin the right panel
does not highlight the middle panel).
Bug: v8:7327
Notry: true
Change-Id: Ia45d54a33587eac3706d5fbf56e01f19d6f94144
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3001170
Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org>
Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75575}
If you now click a line number on the source panel (left panel) you will
get the nodes (middle panel) highlighted and the disassembly code (right
panel). As a bonus, you can click on the middle or right panels and get
the same result (i.e. you can click on a disassembly instruction and see
the highlighted source text and nodes).
Note that not all source text has a node or disassembly instruction
associated with it.
Bug: v8:7327, v8:11192
Notry: true
Change-Id: Ia20aff02407e0d9d118c26a0b5895ee521288565
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3000965
Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75574}
Display UsePositions in the intervals
in live ranges in turbolizer.
Uses are shown as vertical red lines.
Bug: v8:7327
Change-Id: Iab8d08989b9113d1b7d393252de5988e8b25b8de
Notry: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2224215
Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Reviewed-by: Santiago Aboy Solanes <solanes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68102}
Hide the arrow button div for snapping the live range
panel when a new file is loaded.
Bug: v8:7327
Change-Id: I576444f12a0557cc6716eb0214586b54a042a899
Notry: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2224838
Reviewed-by: Santiago Aboy Solanes <solanes@chromium.org>
Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68087}
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}
... after executing their action.
This allows to search for a regex, click "hide unselected nodes", and
then immediately using graph view's keyboard shortcuts (e.g i, o, r).
Bug: v8:7327
Change-Id: Ieb7dbb3f1e32a78131500f8fb8b7805417c60e4e
Notry: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1930906
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#65166}
Remove sep(Left|Right)Snap as they were never read from
Bug: v8:7327
Change-Id: Id09fa0ec606a75d40cc946b354bc1a260f3b68ac
Notry: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1928855
Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org>
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Cr-Commit-Position: refs/heads/master@{#65100}
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}
After searching now we are focused on the svg, which allows using
the keyboard shortcuts after searching.
Bug: v8:7327
Change-Id: I57f5490ecb9858971aefae66b9808460108dc936
Notry: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1925147
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Cr-Commit-Position: refs/heads/master@{#65084}
Allows the use of PageUp and PageDown in sequence and schedule phases.
Since graphmultiview had a tabindex of 0, it was sitting on top of
sequence and schedule. This blocked the use of PageUp and PageDown
to scroll in these phases.
Bug: v8:7327
Change-Id: I4fc129cd9d5ea82e469cd4b67c12a455ec920317
Notry: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1914207
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Cr-Commit-Position: refs/heads/master@{#64947}
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}
In the case where we fail on the 'before register allocation' phase,
we will have the instructions to print, but turbolizer will fail to
show them because it will look for the non-existent offsets.
Bug: v8:7327
Change-Id: I52e520dcb662fe9931f1bb29cd2c16cd62913158
Notry: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1889883
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#64650}
Before this change, the activeElement used to be the body and not
multiview. Then, the EventListener wasn't triggering.
Bug: v8:7327
Change-Id: I9782159ffd510c9a7afd83695f20ede9e774ac20
Notry: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1868624
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org>
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Cr-Commit-Position: refs/heads/master@{#64422}
Since the resizers (the handles used to resize the panes) were
getting bigger when selected, they obscured part of the scrollbar
making the scrollbar too hard to select.
Also, when they were snapped, the right resizer totally obscured
the scrollbar.
Bug: v8:7327
Change-Id: I04f3df00181df2265890ef54706091b3bc36f23e
Notry: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1869191
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Cr-Commit-Position: refs/heads/master@{#64421}
The top bar was being scrolled down since the whole viewpane was
scrollable. It will now work in the way the "Dissasembly" tab
works: the content is scrollable, but not the pane.
This change makes Schedule and Sequence consistent within the
other panels.
As a drive-by fix, remove some unused constants.
Bug: v8:7327, v8:9517
Notry: true
Change-Id: I22f8abb6524cb297f43930fc8036b36b7ce59751
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1863203
Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org>
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Cr-Commit-Position: refs/heads/master@{#64347}
They have no function and are confusing to first time users, who think
that you have to click that to upload a file.
It would be better to not add them at all, but the logic searches for
'li.last-tab' and it seems hard to unravel.
Bug: v8:7327
Notry: true
Change-Id: I07e903947e15ccc0d5431488a4c4fcded999f91d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1863194
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Cr-Commit-Position: refs/heads/master@{#64325}
The info tab says that 'i' reveals outputs and 'o' reveals inputs, it should be
the opposite.
Bug: v8:7327
Change-Id: I1bf96653129e14ef315a01dc2c7a3083c9caa5bb
Notry: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1692929
Commit-Queue: Pierre Langlois <pierre.langlois@arm.com>
Auto-Submit: Pierre Langlois <pierre.langlois@arm.com>
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62603}
Also show constant for ArchNops that encode assigning from a
constant.
Change-Id: I84590005dda62ebf445aada57f826f5ffcd5a802
Bug: v8:7327
Notry: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1672943
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: Daniel Clifford <danno@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62388}
It was hiding the nodes, but never showing them. Therefore it wasn't
'toggling'.
Change-Id: I6fe57860f44ba05abac0f1575678a494f9d07ae8
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1649557
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Auto-Submit: Santiago Aboy Solanes <solanes@chromium.org>
Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62057}
Some of the tooltips had the wrong text on them when hovering over with
the mouse.
Change-Id: I4d1ba37b0fad276356b76d16710a5dba7dedc6ca
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1649556
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62056}
after previous change, which moved icons to .png format and
to subdirectory img/.
Bug: v8:7327
Notry: true
Change-Id: Iebbbe175cc65ed1f2e505084344a2b55864732e7
Reviewed-on: https://chromium-review.googlesource.com/c/1494009
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59940}
This allows to reset the layout to the the inital layout of the graph,
which only contains the control nodes.
Change-Id: I7ab9fb1615057df99983369cd0fcdd42a68e1924
Notry: true
Bug: v8:7327
Reviewed-on: https://chromium-review.googlesource.com/c/1409436
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58814}
This enables per-phase toolbox items, which makes the toolbar easier
to understand and use.
Change-Id: I1b44d28595c118f0ba55dd64eea54415b51b93aa
Notry: true
Bug: v8:7327
Reviewed-on: https://chromium-review.googlesource.com/c/1409435
Reviewed-by: Georg Neis <neis@chromium.org>
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58813}
The URL must not have a leading slash, and the file needs to be included
in the deployment script.
TBR=neis@chromium.org
Change-Id: Idd3fc25c052cb720d4956f630a8ddca7e5d36a1a
Notry: true
Bug: v8:7327
Reviewed-on: https://chromium-review.googlesource.com/c/1409432
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58799}
This is a first step towards support for opening more than one
turbolizer json file at once.
Change-Id: Id51ce47c59492ba63de03eceb0163fa1701ea500
Notry: true
Bug: v8:7327
Reviewed-on: https://chromium-review.googlesource.com/c/1407057
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58790}
..as mentioned in the info tab.
Change-Id: I9ddbe1ad7eb3242ad7839650aecc7305a902fb0d
Notry: true
Bug: v8:7327
Reviewed-on: https://chromium-review.googlesource.com/c/1407056
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58789}
..instead of wrongly keeping the location from the previous view if
the selection became empty after attaching it.
Change-Id: I606010ad86034c2ec06e00c82143a22ca2d88274
Notry: true
Bug: v8:7327
Reviewed-on: https://chromium-review.googlesource.com/c/1407055
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58788}
..and display them in the extended node title (on hover).
Notry: true
Bug: v8:7327
Change-Id: Ic9cd6207269686edb42ecf1bee8f7ef7b6caa035
Reviewed-on: https://chromium-review.googlesource.com/c/1407054
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58783}
- 'let' instead of 'var', and prefer 'const'
- Prefer for-of over indexed interation
- Variable names should be 'camel-case' or
all-caps snake-case.
- Only one variable declaration per line
Change-Id: I645dd2333d6d9a993f24c29121f5f156249f1b71
Notry: true
Bug: v8:7327
Reviewed-on: https://chromium-review.googlesource.com/c/1405320
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58761}