RFR (M): 8064458 OopMap class could be more compact
rickard.backman at oracle.com
Tue Apr 28 10:03:37 UTC 2015
can I please have reviews for this change:
While looking at OopMaps a while ago I noticed that there were a couple
of different fields that were unused after the OopMaps were finalised.
I took some time to investigate and rearrange the OopMaps. Since I
didn't want to change how the OopMaps are built I introduced new data
structures. ImmutableOopMapSet and ImmutableOopMap. The original OopMap
structures are used to build up the OopMaps and when finalised they are
copied into the Immutable variants.
The ImmutableOopMapSet contains a few fields [size, count] and then a
list of [pc, offset]. The offset points to the offset after the list
where the ImmutableOopMap is placed. By moving pc out from OopMap to be
part of the list we can now have multiple pcs with identical OopMaps
point to the same data.
We only keep 1 empty OopMap, and the other compaction that is done in
this change is to check if the OopMap is identical to the previous one
and then reuse that one. So no complete uniqueness check.
I ran a couple of small benchmarks and printed the size of the old
OopMaps vs the new. The new layout uses about 20 - 25% of the space on
the benchmarks I've run.
Tested by running through JPRT, running BigApps and NSK.quick.testlist
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 836 bytes
Desc: Digital signature
More information about the hotspot-compiler-dev