From shade at openjdk.org Fri Jun 6 15:28:07 2025 From: shade at openjdk.org (Aleksey Shipilev) Date: Fri, 6 Jun 2025 15:28:07 GMT Subject: RFR: 7904026: JOL: Handle (generational) ZGC when dealing with raw addresses In-Reply-To: References: Message-ID: On Thu, 8 May 2025 01:37:35 GMT, Anton Rybochkin wrote: > Because of color bits in lower positions, object alignment size heuristics does not work with generational ZGC. This PR implements address uncolorizing so alignment size and hence object size is calculated correctly Without cross-checking against ZGC sources... Some cosmetics, but also a question: I suppose it would be good to handle the non-generational ZGC to cover JDK 17 and JDK 21? Also, I would think we want https://github.com/openjdk/jol/pull/64/ to be merged first, so we get the automated testing done. jol-core/src/main/java/org/openjdk/jol/vm/HotspotUnsafe.java line 83: > 81: > 82: private final boolean lilliputVM; > 83: private final boolean generationalZGCEnabled; Suggestion: private final boolean isZGC; jol-core/src/main/java/org/openjdk/jol/vm/ZGCAddress.java line 12: > 10: private static final long CLEAR_UNUSED_BITS_MASK = (1L << 46) - 1; > 11: private static final long COLOR_BITS_COUNT = 16; > 12: private static final boolean isAarch = "aarch64".equals(System.getProperty("os.arch")); Suggestion: private static final boolean IS_ARM64 = "aarch64".equals(System.getProperty("os.arch")); ------------- PR Review: https://git.openjdk.org/jol/pull/65#pullrequestreview-2905255289 PR Review Comment: https://git.openjdk.org/jol/pull/65#discussion_r2132394294 PR Review Comment: https://git.openjdk.org/jol/pull/65#discussion_r2132398723 From shade at openjdk.org Fri Jun 6 15:33:07 2025 From: shade at openjdk.org (Aleksey Shipilev) Date: Fri, 6 Jun 2025 15:33:07 GMT Subject: RFR: 7904027: JOL: Add test cases for ZGC and object alignments In-Reply-To: <5lqb7DyrDtr7gMrAcIeboP-Eje9UPCi23mfHa_shVBQ=.4aafe9be-7623-47bf-9c68-4ec44bd7ddf3@github.com> References: <5lqb7DyrDtr7gMrAcIeboP-Eje9UPCi23mfHa_shVBQ=.4aafe9be-7623-47bf-9c68-4ec44bd7ddf3@github.com> Message-ID: On Thu, 8 May 2025 00:43:03 GMT, Anton Rybochkin wrote: > This test reveals incorrect object alignment detection when using generational ZGC which results in high object size reported (512k on aarch64 and 64k otherwise) There are test failures in GHA right now, do you know what are those? [INFO] Running org.openjdk.jol.vm.HotspotUnsafeTest Error: Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.016 s <<< FAILURE! - in org.openjdk.jol.vm.HotspotUnsafeTest Error: org.openjdk.jol.vm.HotspotUnsafeTest.testAlignment Time elapsed: 0.012 s <<< FAILURE! java.lang.AssertionError: expected:<8> but was:<65536> at org.openjdk.jol.vm.HotspotUnsafeTest.testAlignment(HotspotUnsafeTest.java:14) jol-core/pom.xml line 363: > 361: generational-zgc-tests > 362: > 363: 21 Sounds more like `[21,)`? jol-core/src/test/java/org/openjdk/jol/vm/HotspotUnsafeTest.java line 23: > 21: return alignmentProperty > 22: .map(alignment -> Integer.parseInt(substringAfter(alignment, "="))) > 23: .orElseGet(() -> Integer.parseInt(System.getProperty("sun.arch.data.model")) / Byte.SIZE); This is not really correct. On 32-bit, the object alignment is not `32/8 = 4`, it is still `8`. Hotspot just does `8` on these platforms, put `8` in here too. jol-core/src/test/java/org/openjdk/jol/vm/HotspotUnsafeTest.java line 25: > 23: .orElseGet(() -> Integer.parseInt(System.getProperty("sun.arch.data.model")) / Byte.SIZE); > 24: } > 25: } Newline, please. ------------- PR Review: https://git.openjdk.org/jol/pull/64#pullrequestreview-2905274220 PR Review Comment: https://git.openjdk.org/jol/pull/64#discussion_r2132405768 PR Review Comment: https://git.openjdk.org/jol/pull/64#discussion_r2132407825 PR Review Comment: https://git.openjdk.org/jol/pull/64#discussion_r2132408055 From duke at openjdk.org Fri Jun 6 16:01:44 2025 From: duke at openjdk.org (Anton Rybochkin) Date: Fri, 6 Jun 2025 16:01:44 GMT Subject: RFR: 7904027: JOL: Add test cases for ZGC and object alignments [v2] In-Reply-To: <5lqb7DyrDtr7gMrAcIeboP-Eje9UPCi23mfHa_shVBQ=.4aafe9be-7623-47bf-9c68-4ec44bd7ddf3@github.com> References: <5lqb7DyrDtr7gMrAcIeboP-Eje9UPCi23mfHa_shVBQ=.4aafe9be-7623-47bf-9c68-4ec44bd7ddf3@github.com> Message-ID: > This test reveals incorrect object alignment detection when using generational ZGC which results in high object size reported (512k on aarch64 and 64k otherwise) Anton Rybochkin has updated the pull request incrementally with one additional commit since the last revision: Fixed default alignment on 32-bit platforms ------------- Changes: - all: https://git.openjdk.org/jol/pull/64/files - new: https://git.openjdk.org/jol/pull/64/files/43f8a0b6..08b43570 Webrevs: - full: https://webrevs.openjdk.org/?repo=jol&pr=64&range=01 - incr: https://webrevs.openjdk.org/?repo=jol&pr=64&range=00-01 Stats: 2 lines in 1 file changed: 0 ins; 0 del; 2 mod Patch: https://git.openjdk.org/jol/pull/64.diff Fetch: git fetch https://git.openjdk.org/jol.git pull/64/head:pull/64 PR: https://git.openjdk.org/jol/pull/64 From shade at openjdk.org Fri Jun 6 16:01:44 2025 From: shade at openjdk.org (Aleksey Shipilev) Date: Fri, 6 Jun 2025 16:01:44 GMT Subject: RFR: 7904027: JOL: Add test cases for ZGC and object alignments [v2] In-Reply-To: References: <5lqb7DyrDtr7gMrAcIeboP-Eje9UPCi23mfHa_shVBQ=.4aafe9be-7623-47bf-9c68-4ec44bd7ddf3@github.com> Message-ID: On Fri, 6 Jun 2025 15:58:21 GMT, Anton Rybochkin wrote: >> This test reveals incorrect object alignment detection when using generational ZGC which results in high object size reported (512k on aarch64 and 64k otherwise) > > Anton Rybochkin has updated the pull request incrementally with one additional commit since the last revision: > > Fixed default alignment on 32-bit platforms I am also surprised the new file did not have a license header added automatically. Have you tried `mvn clean verify` locally? The licensing plugin should run then. ------------- PR Review: https://git.openjdk.org/jol/pull/64#pullrequestreview-2905357881 From duke at openjdk.org Fri Jun 6 16:01:46 2025 From: duke at openjdk.org (Anton Rybochkin) Date: Fri, 6 Jun 2025 16:01:46 GMT Subject: RFR: 7904027: JOL: Add test cases for ZGC and object alignments [v2] In-Reply-To: References: <5lqb7DyrDtr7gMrAcIeboP-Eje9UPCi23mfHa_shVBQ=.4aafe9be-7623-47bf-9c68-4ec44bd7ddf3@github.com> Message-ID: On Fri, 6 Jun 2025 15:30:15 GMT, Aleksey Shipilev wrote: > There are test failures in GHA right now, do you know what are those? > > ``` > [INFO] Running org.openjdk.jol.vm.HotspotUnsafeTest > Error: Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.016 s <<< FAILURE! - in org.openjdk.jol.vm.HotspotUnsafeTest > Error: org.openjdk.jol.vm.HotspotUnsafeTest.testAlignment Time elapsed: 0.012 s <<< FAILURE! > java.lang.AssertionError: expected:<8> but was:<65536> > at org.openjdk.jol.vm.HotspotUnsafeTest.testAlignment(HotspotUnsafeTest.java:14) > ``` Yes, they illustrate incorrect object alignment calculation in generational ZGC > jol-core/pom.xml line 363: > >> 361: generational-zgc-tests >> 362: >> 363: 21 > > Sounds more like `[21,)`? Java 24+ doesn't have -XX:+ZGenerational flag and has non-generational mode removed. This profile forces usage of generational ZGC in current LTS version, the other profile enables default ZGC available. ------------- PR Comment: https://git.openjdk.org/jol/pull/64#issuecomment-2949731109 PR Review Comment: https://git.openjdk.org/jol/pull/64#discussion_r2132451223 From shade at openjdk.org Fri Jun 6 16:01:47 2025 From: shade at openjdk.org (Aleksey Shipilev) Date: Fri, 6 Jun 2025 16:01:47 GMT Subject: RFR: 7904027: JOL: Add test cases for ZGC and object alignments [v2] In-Reply-To: References: <5lqb7DyrDtr7gMrAcIeboP-Eje9UPCi23mfHa_shVBQ=.4aafe9be-7623-47bf-9c68-4ec44bd7ddf3@github.com> Message-ID: <7QSJfAiuqVd8k53GwzTcRPPYRr6-8YYBPKgeGhQiTAE=.bb79a1f1-175b-4243-82b5-f35018b92a2b@github.com> On Fri, 6 Jun 2025 15:55:17 GMT, Anton Rybochkin wrote: >> jol-core/pom.xml line 363: >> >>> 361: generational-zgc-tests >>> 362: >>> 363: 21 >> >> Sounds more like `[21,)`? > > Java 24+ doesn't have -XX:+ZGenerational flag and has non-generational mode removed. This profile forces usage of generational ZGC in current LTS version, the other profile enables default ZGC available. Ah yes. Nevermind then. ------------- PR Review Comment: https://git.openjdk.org/jol/pull/64#discussion_r2132454228 From shade at openjdk.org Fri Jun 6 16:05:04 2025 From: shade at openjdk.org (Aleksey Shipilev) Date: Fri, 6 Jun 2025 16:05:04 GMT Subject: RFR: 7904027: JOL: Add test cases for ZGC and object alignments [v2] In-Reply-To: References: <5lqb7DyrDtr7gMrAcIeboP-Eje9UPCi23mfHa_shVBQ=.4aafe9be-7623-47bf-9c68-4ec44bd7ddf3@github.com> Message-ID: On Fri, 6 Jun 2025 15:57:58 GMT, Anton Rybochkin wrote: > Yes, they illustrate incorrect object alignment calculation in generational ZGC OK, so we cannot really integrate without the fix? I am trying to see whether there is a path to always green tests. Is https://github.com/openjdk/jol/pull/65 fixing it? ------------- PR Comment: https://git.openjdk.org/jol/pull/64#issuecomment-2949741497 From duke at openjdk.org Fri Jun 6 16:08:42 2025 From: duke at openjdk.org (Anton Rybochkin) Date: Fri, 6 Jun 2025 16:08:42 GMT Subject: RFR: 7904026: JOL: Handle (generational) ZGC when dealing with raw addresses [v2] In-Reply-To: References: Message-ID: <-dfiWlH2ZigGENfmI9JdK4ZNvN-HR6QpuliuSoqY8i4=.e3825db0-3dc0-4f57-bdef-3066eaef599e@github.com> > Because of color bits in lower positions, object alignment size heuristics does not work with generational ZGC. This PR implements address uncolorizing so alignment size and hence object size is calculated correctly Anton Rybochkin has updated the pull request incrementally with two additional commits since the last revision: - Update jol-core/src/main/java/org/openjdk/jol/vm/HotspotUnsafe.java Co-authored-by: Aleksey Shipil?v - Update jol-core/src/main/java/org/openjdk/jol/vm/ZGCAddress.java Co-authored-by: Aleksey Shipil?v ------------- Changes: - all: https://git.openjdk.org/jol/pull/65/files - new: https://git.openjdk.org/jol/pull/65/files/9692cc91..b643960d Webrevs: - full: https://webrevs.openjdk.org/?repo=jol&pr=65&range=01 - incr: https://webrevs.openjdk.org/?repo=jol&pr=65&range=00-01 Stats: 2 lines in 2 files changed: 0 ins; 0 del; 2 mod Patch: https://git.openjdk.org/jol/pull/65.diff Fetch: git fetch https://git.openjdk.org/jol.git pull/65/head:pull/65 PR: https://git.openjdk.org/jol/pull/65 From duke at openjdk.org Fri Jun 6 16:11:42 2025 From: duke at openjdk.org (Anton Rybochkin) Date: Fri, 6 Jun 2025 16:11:42 GMT Subject: RFR: 7904027: JOL: Add test cases for ZGC and object alignments [v3] In-Reply-To: <5lqb7DyrDtr7gMrAcIeboP-Eje9UPCi23mfHa_shVBQ=.4aafe9be-7623-47bf-9c68-4ec44bd7ddf3@github.com> References: <5lqb7DyrDtr7gMrAcIeboP-Eje9UPCi23mfHa_shVBQ=.4aafe9be-7623-47bf-9c68-4ec44bd7ddf3@github.com> Message-ID: > This test reveals incorrect object alignment detection when using generational ZGC which results in high object size reported (512k on aarch64 and 64k otherwise) Anton Rybochkin has updated the pull request incrementally with one additional commit since the last revision: Fixed default alignment on 32-bit platforms ------------- Changes: - all: https://git.openjdk.org/jol/pull/64/files - new: https://git.openjdk.org/jol/pull/64/files/08b43570..32082cb8 Webrevs: - full: https://webrevs.openjdk.org/?repo=jol&pr=64&range=02 - incr: https://webrevs.openjdk.org/?repo=jol&pr=64&range=01-02 Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod Patch: https://git.openjdk.org/jol/pull/64.diff Fetch: git fetch https://git.openjdk.org/jol.git pull/64/head:pull/64 PR: https://git.openjdk.org/jol/pull/64 From duke at openjdk.org Fri Jun 6 16:11:42 2025 From: duke at openjdk.org (Anton Rybochkin) Date: Fri, 6 Jun 2025 16:11:42 GMT Subject: RFR: 7904027: JOL: Add test cases for ZGC and object alignments [v2] In-Reply-To: References: <5lqb7DyrDtr7gMrAcIeboP-Eje9UPCi23mfHa_shVBQ=.4aafe9be-7623-47bf-9c68-4ec44bd7ddf3@github.com> Message-ID: On Fri, 6 Jun 2025 16:01:44 GMT, Anton Rybochkin wrote: >> This test reveals incorrect object alignment detection when using generational ZGC which results in high object size reported (512k on aarch64 and 64k otherwise) > > Anton Rybochkin has updated the pull request incrementally with one additional commit since the last revision: > > Fixed default alignment on 32-bit platforms > > Yes, they illustrate incorrect object alignment calculation in generational ZGC > > OK, so we cannot really integrate without the fix? I am trying to see whether there is a path to always green tests. Is #65 fixing it? Yes, #65 must fix it ------------- PR Comment: https://git.openjdk.org/jol/pull/64#issuecomment-2949753913 From shade at openjdk.org Fri Jun 6 16:11:42 2025 From: shade at openjdk.org (Aleksey Shipilev) Date: Fri, 6 Jun 2025 16:11:42 GMT Subject: RFR: 7904027: JOL: Add test cases for ZGC and object alignments [v2] In-Reply-To: References: <5lqb7DyrDtr7gMrAcIeboP-Eje9UPCi23mfHa_shVBQ=.4aafe9be-7623-47bf-9c68-4ec44bd7ddf3@github.com> Message-ID: On Fri, 6 Jun 2025 16:07:00 GMT, Anton Rybochkin wrote: > Yes, #65 must fix it OK! Then I propose we merge both PR into one, so we get both the fix and the running/passing tests atomically. Up to you which PR to merge to which. ------------- PR Comment: https://git.openjdk.org/jol/pull/64#issuecomment-2949755965 From shade at openjdk.org Fri Jun 6 16:11:43 2025 From: shade at openjdk.org (Aleksey Shipilev) Date: Fri, 6 Jun 2025 16:11:43 GMT Subject: RFR: 7904027: JOL: Add test cases for ZGC and object alignments [v2] In-Reply-To: References: <5lqb7DyrDtr7gMrAcIeboP-Eje9UPCi23mfHa_shVBQ=.4aafe9be-7623-47bf-9c68-4ec44bd7ddf3@github.com> Message-ID: On Fri, 6 Jun 2025 16:01:44 GMT, Anton Rybochkin wrote: >> This test reveals incorrect object alignment detection when using generational ZGC which results in high object size reported (512k on aarch64 and 64k otherwise) > > Anton Rybochkin has updated the pull request incrementally with one additional commit since the last revision: > > Fixed default alignment on 32-bit platforms jol-core/src/test/java/org/openjdk/jol/vm/HotspotUnsafeTest.java line 23: > 21: return alignmentProperty > 22: .map(alignment -> Integer.parseInt(substringAfter(alignment, "="))) > 23: .orElse(Byte.SIZE); `8`, not `Byte.SIZE`. It is 8-byte (64-bit) alignment. Just a coincidence it is also `8` :) ------------- PR Review Comment: https://git.openjdk.org/jol/pull/64#discussion_r2132469851 From duke at openjdk.org Fri Jun 6 16:15:17 2025 From: duke at openjdk.org (Anton Rybochkin) Date: Fri, 6 Jun 2025 16:15:17 GMT Subject: RFR: 7904026: JOL: Handle (generational) ZGC when dealing with raw addresses [v3] In-Reply-To: References: Message-ID: > Because of color bits in lower positions, object alignment size heuristics does not work with generational ZGC. This PR implements address uncolorizing so alignment size and hence object size is calculated correctly Anton Rybochkin has updated the pull request incrementally with four additional commits since the last revision: - Fixed default alignment on 32-bit platforms - Fixed default alignment on 32-bit platforms - Added test executions with ZGC - Added test for object alignment detection ------------- Changes: - all: https://git.openjdk.org/jol/pull/65/files - new: https://git.openjdk.org/jol/pull/65/files/b643960d..dfe26914 Webrevs: - full: https://webrevs.openjdk.org/?repo=jol&pr=65&range=02 - incr: https://webrevs.openjdk.org/?repo=jol&pr=65&range=01-02 Stats: 108 lines in 2 files changed: 108 ins; 0 del; 0 mod Patch: https://git.openjdk.org/jol/pull/65.diff Fetch: git fetch https://git.openjdk.org/jol.git pull/65/head:pull/65 PR: https://git.openjdk.org/jol/pull/65 From duke at openjdk.org Fri Jun 6 16:16:10 2025 From: duke at openjdk.org (Anton Rybochkin) Date: Fri, 6 Jun 2025 16:16:10 GMT Subject: RFR: 7904027: JOL: Add test cases for ZGC and object alignments [v2] In-Reply-To: References: <5lqb7DyrDtr7gMrAcIeboP-Eje9UPCi23mfHa_shVBQ=.4aafe9be-7623-47bf-9c68-4ec44bd7ddf3@github.com> Message-ID: <0WFbPkoqrjAYrNj1Hw9Ng8RVQXjy4P-KkyWGEJQXS9s=.0f78133d-a28f-4310-8c39-8dc7048d877f@github.com> On Fri, 6 Jun 2025 16:07:58 GMT, Aleksey Shipilev wrote: > > Yes, #65 must fix it > > OK! Then I propose we merge both PR into one, so we get both the fix and the running/passing tests atomically. Up to you which PR to merge to which. Thanks, I merged to #65. Closing this one ------------- PR Comment: https://git.openjdk.org/jol/pull/64#issuecomment-2949768279 From duke at openjdk.org Fri Jun 6 16:16:10 2025 From: duke at openjdk.org (Anton Rybochkin) Date: Fri, 6 Jun 2025 16:16:10 GMT Subject: Withdrawn: 7904027: JOL: Add test cases for ZGC and object alignments In-Reply-To: <5lqb7DyrDtr7gMrAcIeboP-Eje9UPCi23mfHa_shVBQ=.4aafe9be-7623-47bf-9c68-4ec44bd7ddf3@github.com> References: <5lqb7DyrDtr7gMrAcIeboP-Eje9UPCi23mfHa_shVBQ=.4aafe9be-7623-47bf-9c68-4ec44bd7ddf3@github.com> Message-ID: On Thu, 8 May 2025 00:43:03 GMT, Anton Rybochkin wrote: > This test reveals incorrect object alignment detection when using generational ZGC which results in high object size reported (512k on aarch64 and 64k otherwise) This pull request has been closed without being integrated. ------------- PR: https://git.openjdk.org/jol/pull/64 From duke at openjdk.org Fri Jun 6 16:20:48 2025 From: duke at openjdk.org (Anton Rybochkin) Date: Fri, 6 Jun 2025 16:20:48 GMT Subject: RFR: 7904026: JOL: Handle (generational) ZGC when dealing with raw addresses [v4] In-Reply-To: References: Message-ID: > Because of color bits in lower positions, object alignment size heuristics does not work with generational ZGC. This PR implements address uncolorizing so alignment size and hence object size is calculated correctly Anton Rybochkin has updated the pull request incrementally with two additional commits since the last revision: - Variable name fixed - Variable name fixed ------------- Changes: - all: https://git.openjdk.org/jol/pull/65/files - new: https://git.openjdk.org/jol/pull/65/files/dfe26914..b3d7c357 Webrevs: - full: https://webrevs.openjdk.org/?repo=jol&pr=65&range=03 - incr: https://webrevs.openjdk.org/?repo=jol&pr=65&range=02-03 Stats: 6 lines in 2 files changed: 0 ins; 0 del; 6 mod Patch: https://git.openjdk.org/jol/pull/65.diff Fetch: git fetch https://git.openjdk.org/jol.git pull/65/head:pull/65 PR: https://git.openjdk.org/jol/pull/65 From duke at openjdk.org Fri Jun 6 16:51:43 2025 From: duke at openjdk.org (Anton Rybochkin) Date: Fri, 6 Jun 2025 16:51:43 GMT Subject: RFR: 7904026: JOL: Handle (generational) ZGC when dealing with raw addresses [v5] In-Reply-To: References: Message-ID: > Because of color bits in lower positions, object alignment size heuristics does not work with generational ZGC. This PR implements address uncolorizing so alignment size and hence object size is calculated correctly Anton Rybochkin has refreshed the contents of this pull request, and previous commits have been removed. The incremental views will show differences compared to the previous content of the PR. The pull request contains two new commits since the last revision: - Variable name fixed - Fixed default alignment on 32-bit platforms ------------- Changes: - all: https://git.openjdk.org/jol/pull/65/files - new: https://git.openjdk.org/jol/pull/65/files/b3d7c357..dff94518 Webrevs: - full: https://webrevs.openjdk.org/?repo=jol&pr=65&range=04 - incr: https://webrevs.openjdk.org/?repo=jol&pr=65&range=03-04 Stats: 0 lines in 0 files changed: 0 ins; 0 del; 0 mod Patch: https://git.openjdk.org/jol/pull/65.diff Fetch: git fetch https://git.openjdk.org/jol.git pull/65/head:pull/65 PR: https://git.openjdk.org/jol/pull/65 From shade at openjdk.org Fri Jun 6 17:16:04 2025 From: shade at openjdk.org (Aleksey Shipilev) Date: Fri, 6 Jun 2025 17:16:04 GMT Subject: RFR: 7904026: JOL: Handle (generational) ZGC when dealing with raw addresses [v5] In-Reply-To: References: Message-ID: On Fri, 6 Jun 2025 16:51:43 GMT, Anton Rybochkin wrote: >> Because of color bits in lower positions, object alignment size heuristics does not work with generational ZGC. This PR implements address uncolorizing so alignment size and hence object size is calculated correctly > > Anton Rybochkin has refreshed the contents of this pull request, and previous commits have been removed. The incremental views will show differences compared to the previous content of the PR. The pull request contains two new commits since the last revision: > > - Variable name fixed > - Fixed default alignment on 32-bit platforms Looking good. We need to touch up a few things. I think it is also okay not to handle non-generational ZGC, if you don't want to deal with it. jol-core/src/main/java/org/openjdk/jol/vm/ZGCAddress.java line 1: > 1: package org.openjdk.jol.vm; Still surprised there is no automatic license header here. Run `mvn clean verify` locally? Maybe we don't cover all the paths, see if tests also need these headers. jol-core/src/test/java/org/openjdk/jol/vm/ZGCAddressTest.java line 35: > 33: } > 34: } > 35: } Add a newline here. ------------- PR Review: https://git.openjdk.org/jol/pull/65#pullrequestreview-2905549200 PR Review Comment: https://git.openjdk.org/jol/pull/65#discussion_r2132568577 PR Review Comment: https://git.openjdk.org/jol/pull/65#discussion_r2132568965 From duke at openjdk.org Fri Jun 6 17:35:18 2025 From: duke at openjdk.org (Anton Rybochkin) Date: Fri, 6 Jun 2025 17:35:18 GMT Subject: RFR: 7904026: JOL: Handle (generational) ZGC when dealing with raw addresses [v6] In-Reply-To: References: Message-ID: <5wiDUlO6Ch6SbvQOCzNmL9Zck5ZgNeanWEliQdLTJxY=.b93a378a-6a18-4acd-997e-d4d25d5f8689@github.com> > Because of color bits in lower positions, object alignment size heuristics does not work with generational ZGC. This PR implements address uncolorizing so alignment size and hence object size is calculated correctly Anton Rybochkin has updated the pull request incrementally with two additional commits since the last revision: - Actualize year in license headers - Added a license header ------------- Changes: - all: https://git.openjdk.org/jol/pull/65/files - new: https://git.openjdk.org/jol/pull/65/files/dff94518..af71b5f0 Webrevs: - full: https://webrevs.openjdk.org/?repo=jol&pr=65&range=05 - incr: https://webrevs.openjdk.org/?repo=jol&pr=65&range=04-05 Stats: 73 lines in 3 files changed: 72 ins; 0 del; 1 mod Patch: https://git.openjdk.org/jol/pull/65.diff Fetch: git fetch https://git.openjdk.org/jol.git pull/65/head:pull/65 PR: https://git.openjdk.org/jol/pull/65 From shade at openjdk.org Fri Jun 6 17:35:18 2025 From: shade at openjdk.org (Aleksey Shipilev) Date: Fri, 6 Jun 2025 17:35:18 GMT Subject: RFR: 7904026: JOL: Handle (generational) ZGC when dealing with raw addresses [v6] In-Reply-To: <5wiDUlO6Ch6SbvQOCzNmL9Zck5ZgNeanWEliQdLTJxY=.b93a378a-6a18-4acd-997e-d4d25d5f8689@github.com> References: <5wiDUlO6Ch6SbvQOCzNmL9Zck5ZgNeanWEliQdLTJxY=.b93a378a-6a18-4acd-997e-d4d25d5f8689@github.com> Message-ID: On Fri, 6 Jun 2025 17:32:05 GMT, Anton Rybochkin wrote: >> Because of color bits in lower positions, object alignment size heuristics does not work with generational ZGC. This PR implements address uncolorizing so alignment size and hence object size is calculated correctly > > Anton Rybochkin has updated the pull request incrementally with two additional commits since the last revision: > > - Actualize year in license headers > - Added a license header Update the years like this, and we are done. Looks fine. We may need to touch it up later, but this is good to go in. Thanks for the contribution! jol-core/src/main/java/org/openjdk/jol/vm/ZGCAddress.java line 2: > 1: /* > 2: * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved. Suggestion: * Copyright (c) 2025, Oracle and/or its affiliates. All rights reserved. jol-core/src/test/java/org/openjdk/jol/vm/HotspotUnsafeTest.java line 2: > 1: /* > 2: * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved. Suggestion: * Copyright (c) 2025, Oracle and/or its affiliates. All rights reserved. jol-core/src/test/java/org/openjdk/jol/vm/ZGCAddressTest.java line 2: > 1: /* > 2: * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved. Suggestion: * Copyright (c) 2025, Oracle and/or its affiliates. All rights reserved. ------------- PR Review: https://git.openjdk.org/jol/pull/65#pullrequestreview-2905584367 Marked as reviewed by shade (Committer). PR Review: https://git.openjdk.org/jol/pull/65#pullrequestreview-2905593165 PR Review Comment: https://git.openjdk.org/jol/pull/65#discussion_r2132587953 PR Review Comment: https://git.openjdk.org/jol/pull/65#discussion_r2132588161 PR Review Comment: https://git.openjdk.org/jol/pull/65#discussion_r2132589016 From duke at openjdk.org Fri Jun 6 17:35:19 2025 From: duke at openjdk.org (Anton Rybochkin) Date: Fri, 6 Jun 2025 17:35:19 GMT Subject: RFR: 7904026: JOL: Handle (generational) ZGC when dealing with raw addresses [v5] In-Reply-To: References: Message-ID: On Fri, 6 Jun 2025 17:12:33 GMT, Aleksey Shipilev wrote: >> Anton Rybochkin has refreshed the contents of this pull request, and previous commits have been removed. The incremental views will show differences compared to the previous content of the PR. The pull request contains two new commits since the last revision: >> >> - Variable name fixed >> - Fixed default alignment on 32-bit platforms > > jol-core/src/main/java/org/openjdk/jol/vm/ZGCAddress.java line 1: > >> 1: package org.openjdk.jol.vm; > > Still surprised there is no automatic license header here. Run `mvn clean verify` locally? Maybe we don't cover all the paths, see if tests also need these headers. Indeed, `mvn clean verify` adds license headers to main sources. I have added it manually for tests ------------- PR Review Comment: https://git.openjdk.org/jol/pull/65#discussion_r2132589795 From duke at openjdk.org Fri Jun 6 17:42:03 2025 From: duke at openjdk.org (Anton Rybochkin) Date: Fri, 6 Jun 2025 17:42:03 GMT Subject: RFR: 7904026: JOL: Handle (generational) ZGC when dealing with raw addresses [v6] In-Reply-To: References: <5wiDUlO6Ch6SbvQOCzNmL9Zck5ZgNeanWEliQdLTJxY=.b93a378a-6a18-4acd-997e-d4d25d5f8689@github.com> Message-ID: <1cB1WuvQeK8ni_eFCmnzJmSTyCWpTp6KTX39tfhP_rw=.135ee4b7-c8a9-4416-9721-d50eb71a4d24@github.com> On Fri, 6 Jun 2025 17:31:05 GMT, Aleksey Shipilev wrote: > Looks fine. We may need to touch it up later, but this is good to go in. Thanks for the contribution! Thanks for the review and the time! ------------- PR Comment: https://git.openjdk.org/jol/pull/65#issuecomment-2949979837 From duke at openjdk.org Fri Jun 6 18:11:47 2025 From: duke at openjdk.org (Anton Rybochkin) Date: Fri, 6 Jun 2025 18:11:47 GMT Subject: RFR: 7904026: JOL: Handle (generational) ZGC when dealing with raw addresses [v7] In-Reply-To: References: Message-ID: <_Y-u6026SAULX5XWkK22RXeVKQT9cJqqsWGbs5QWUHs=.5f26a703-d237-44a8-a2ff-3ba1e209a766@github.com> > Because of color bits in lower positions, object alignment size heuristics does not work with generational ZGC. This PR implements address uncolorizing so alignment size and hence object size is calculated correctly Anton Rybochkin has updated the pull request incrementally with one additional commit since the last revision: Update full name ------------- Changes: - all: https://git.openjdk.org/jol/pull/65/files - new: https://git.openjdk.org/jol/pull/65/files/af71b5f0..5a57a879 Webrevs: - full: https://webrevs.openjdk.org/?repo=jol&pr=65&range=06 - incr: https://webrevs.openjdk.org/?repo=jol&pr=65&range=05-06 Stats: 0 lines in 0 files changed: 0 ins; 0 del; 0 mod Patch: https://git.openjdk.org/jol/pull/65.diff Fetch: git fetch https://git.openjdk.org/jol.git pull/65/head:pull/65 PR: https://git.openjdk.org/jol/pull/65 From shade at openjdk.org Tue Jun 10 07:22:43 2025 From: shade at openjdk.org (Aleksey Shipilev) Date: Tue, 10 Jun 2025 07:22:43 GMT Subject: RFR: 7904026: JOL: Handle (generational) ZGC when dealing with raw addresses [v7] In-Reply-To: <_Y-u6026SAULX5XWkK22RXeVKQT9cJqqsWGbs5QWUHs=.5f26a703-d237-44a8-a2ff-3ba1e209a766@github.com> References: <_Y-u6026SAULX5XWkK22RXeVKQT9cJqqsWGbs5QWUHs=.5f26a703-d237-44a8-a2ff-3ba1e209a766@github.com> Message-ID: On Fri, 6 Jun 2025 18:11:47 GMT, Anton Rybochkin wrote: >> Because of color bits in lower positions, object alignment size heuristics does not work with generational ZGC. This PR implements address uncolorizing so alignment size and hence object size is calculated correctly > > Anton Rybochkin has updated the pull request incrementally with one additional commit since the last revision: > > Update full name You have to say what bots ask you to say: https://github.com/openjdk/jol/pull/65#issuecomment-2861163348 :) ------------- PR Comment: https://git.openjdk.org/jol/pull/65#issuecomment-2957951074 From duke at openjdk.org Tue Jun 10 08:21:04 2025 From: duke at openjdk.org (duke) Date: Tue, 10 Jun 2025 08:21:04 GMT Subject: RFR: 7904026: JOL: Handle (generational) ZGC when dealing with raw addresses [v7] In-Reply-To: <_Y-u6026SAULX5XWkK22RXeVKQT9cJqqsWGbs5QWUHs=.5f26a703-d237-44a8-a2ff-3ba1e209a766@github.com> References: <_Y-u6026SAULX5XWkK22RXeVKQT9cJqqsWGbs5QWUHs=.5f26a703-d237-44a8-a2ff-3ba1e209a766@github.com> Message-ID: On Fri, 6 Jun 2025 18:11:47 GMT, Anton Rybochkin wrote: >> Because of color bits in lower positions, object alignment size heuristics does not work with generational ZGC. This PR implements address uncolorizing so alignment size and hence object size is calculated correctly > > Anton Rybochkin has updated the pull request incrementally with one additional commit since the last revision: > > Update full name @raipc Your change (at version 5a57a8795b30525e10d19520e2c14cb599beee35) is now ready to be sponsored by a Committer. ------------- PR Comment: https://git.openjdk.org/jol/pull/65#issuecomment-2958126740 From duke at openjdk.org Tue Jun 10 08:23:43 2025 From: duke at openjdk.org (Anton Rybochkin) Date: Tue, 10 Jun 2025 08:23:43 GMT Subject: Integrated: 7904026: JOL: Handle (generational) ZGC when dealing with raw addresses In-Reply-To: References: Message-ID: <8WG25TsfP9rw3y2NhpGfAsBOFgHKcnZaJhvvlS-gbdE=.30b33038-3f78-49b4-ab23-dc828578a0e8@github.com> On Thu, 8 May 2025 01:37:35 GMT, Anton Rybochkin wrote: > Because of color bits in lower positions, object alignment size heuristics does not work with generational ZGC. This PR implements address uncolorizing so alignment size and hence object size is calculated correctly This pull request has now been integrated. Changeset: 512496b6 Author: Anton Rybochkin Committer: Aleksey Shipilev URL: https://git.openjdk.org/jol/commit/512496b62c84feb5595f3c39452037abaf8130ff Stats: 256 lines in 6 files changed: 253 ins; 0 del; 3 mod 7904026: JOL: Handle (generational) ZGC when dealing with raw addresses Reviewed-by: shade ------------- PR: https://git.openjdk.org/jol/pull/65