RFR: 8256741: Reduce footprint of compiler interface data structures

Claes Redestad redestad at openjdk.java.net
Fri Nov 20 22:42:02 UTC 2020


On Fri, 20 Nov 2020 22:21:04 GMT, Chris Plummer <cjplummer at openjdk.org> wrote:

>> A few data structure in the ci allocate unconditionally created GrowableArrays out-of-line, have fields that are newer updated/read, or are unnecessarily cached. By cleaning this up we can slightly reduce memory used for JIT compilations while slightly speeding them up.
>
> src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/ci/ciObjectFactory.java line 82:
> 
>> 80:   public GrowableArray<ciSymbol> symbols() {
>> 81:     Address addr = getAddress().addOffsetTo(symbolsField.getOffset());
>> 82:     return GrowableArray.create(addr, ciSymbolConstructor);
> 
> It's unclear to me why these two changes were needed. Don't they produce the same result before and after?

When changing the fields from  `GrowableArray<..>*` to `GrowableArray<..>` I looked around and found another use of an embedded `GrowableArray` in `InlineTree.java` and took my cues from that. If you're certain these approaches are semantically identical I can drop these changes, but as I'm not exactly sure how to verify and test this I went the safe(?) route of leaning on prior art here.

-------------

PR: https://git.openjdk.java.net/jdk/pull/1346


More information about the serviceability-dev mailing list