Processes and visualizes maps (aka hidden classes) created by v8 during execution.
Derived from the one included with v8/tools.
npm install -g v8-map-processor
- Install a compatible Node.js or V8 runtime
- a) Install Node.js
>=v10
from nodejs.org or elsewhere - b) Install d8 via
npm install -g jsvu
- note that d8 is named
v8
so either link it tod8
or usev8
when typing the next command
- note that d8 is named
- a) Install Node.js
- Run your app with the
--trace-maps
flag, i.e.<node|d8> --trace-maps example/points.js
- note that if running with
d8
functionality likesetTimeout
,console.log
andprocess
are not available
- note that if running with
- Run
v8-map-processor
in the same directory to load the producedv8.log
into the maps visualizer
The Stats view will show constructor and function names which can be selected to show more information regarding related maps.
To focus on the maps created as part of the example, once you load the visualizer scroll to the very right of the timeline to skip the maps that are created during initialization. Then you can click on any of the bars do get more info.
In the case you ran with Node.js you'll see an overwhelming amount of data and may have to find
the maps you are interested in by searching for the constructor name via Cmd|Ctrl-f
(in the
example case Point
) and then selecting it in the Stats view.
The following keyboard shortcuts are available:
- arrow up: select previous edge
- arrow down: select next edge
- arrow left: move to previous chunk
- arrow right: move to next chunk
-
+
: increase timeline resolution -
-
: decrease timeline resolution