[master] RFR: JDK-8301786: [Lilliput] Failing CompressedClassPointerEncoding.java

Aleksey Shipilev shade at openjdk.org
Mon Feb 6 17:24:28 UTC 2023


On Mon, 6 Feb 2023 16:16:13 GMT, Thomas Stuefe <stuefe at openjdk.org> wrote:

> This fixes and expands runtime/CompressedOops/CompressedClassPointerEncoding.java.
> 
> Test had been broken by integration of [JDK-8294677](https://bugs.openjdk.org/browse/JDK-8294677), but to my embarrassment, I found that the test had never actually been finished, some vital checks were missing.
> 
> I fixed all that, clarified comments, and also changed the test to have multiple sub tests. I manually tested on x64 and aarch64.
> 
> On aarch64, I tried to test both `xor` and `movk` encoding modes but was unable to test latter - the lowest valid encoding base that would trigger `movk` mode is `0xa00_00000000`, and the kernel on my Raspi box is compiled for max. 39 bits for virtual user space addresses. That makes mapping at higher addresses fail. See comment in test.
> 
> There is more work to be done for aarch64: runtime/CompressedOops/CompressedClassPointerEncoding.java asserts. I opened https://bugs.openjdk.org/browse/JDK-8301880 to track that.

Looks okay to me.

test/hotspot/jtreg/runtime/CompressedOops/CompressedClassPointerEncoding.java line 44:

> 42: 
> 43: ///// x64 ///////////////////////////////////////////////////////////////
> 44: 

While I suspect the comments like these are fine for jtreg, this is not the usual style for these. Test IDs are probably enough to get this done.

test/hotspot/jtreg/runtime/CompressedOops/CompressedClassPointerEncoding.java line 153:

> 151:     final static int narrowKlassBitSize = 22;
> 152:     final static int narrowKlassShift = 9;
> 153:     final static long narrowKlassValueSpan = (long)1 << narrowKlassBitSize;

Java style: `1L` instead of `(long)1`.

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

Marked as reviewed by shade (Committer).

PR: https://git.openjdk.org/lilliput/pull/72


More information about the lilliput-dev mailing list