Counting hidden classes in JavaScript
1 answer
Do you need a number of unique hidden classes?
As I understand it, "hidden classes" in V8 sources are known as "maps". Every heap object in V8 has a map pointer (or bit-coded map id) that takes up 1 word of memory (see v8/src/objects.h
grep for Map, map_word).
Probably the most useful option for you is the v8 option --trace_maps
. Then, if v8 with this option does not give you enough information, you can see where in the source file it will be created and attach it to yourself.
(Disclamer: I'm not on the V8 team, so I might be wrong. I've been cracking v8 for quite some time).
+2
source to share