From ysr at openjdk.org Wed Nov 5 00:19:13 2025 From: ysr at openjdk.org (Y. Srinivas Ramakrishna) Date: Wed, 5 Nov 2025 00:19:13 GMT Subject: [master] RFR: 8371186: Lilliput2: Disable JFR Leak Profiler & related tests until it's fixed with +UseCompactObjectHeaders Message-ID: <9SVh_BWuPQ0lgg08MD-3QHOd4xmcHuZAsG0gNPzx4Sc=.7c6ab250-29e8-495a-9301-c6e74de548cd@github.com> The JFR leak profiler stores an encoded reference to a (canonical) path from roots to each of a set of sampled objects after GC at some interval in the space available in the displaced mark word on the sampled object's header. With Lilliput2, there isn't enough space to store such information in the header. Instead, we probably want to use a side hashtable to temporarily keep such information. We've filed a ticket to do that work. Meanwhile, in this PR, we will disable the Leak Profiler when Lilliput2's `UseCompactObjectHeaders` is enabled. (This is already done in the Leak Profiler, e.g., for Shenanodah GC.) We'll also disable tests of the LeakProfiler when Lilliput2's UseCompactObjectHeaders is enabled. The JFR Leak Profiler workaround and the disabled tests will need to be re-enabled once the Leak Profiler is reworked to not use the object header in this manner in Lilliput2 with +UseCompactObjectHeaders. ------------- Commit messages: - More minor tweaks - - fix typo - More tweaks related to flagless and UCOH etc. for tests. - 1. disable leak profiler if Lilliput2 - - Fix BYTE_ARRAY_OVERHEAD for the case of Lilliput2 for another couple - - Add a new assertion and expand an assertion message in the leak Changes: https://git.openjdk.org/lilliput/pull/205/files Webrev: https://webrevs.openjdk.org/?repo=lilliput&pr=205&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8371186 Stats: 74 lines in 32 files changed: 52 ins; 6 del; 16 mod Patch: https://git.openjdk.org/lilliput/pull/205.diff Fetch: git fetch https://git.openjdk.org/lilliput.git pull/205/head:pull/205 PR: https://git.openjdk.org/lilliput/pull/205 From shade at openjdk.org Wed Nov 5 10:47:11 2025 From: shade at openjdk.org (Aleksey Shipilev) Date: Wed, 5 Nov 2025 10:47:11 GMT Subject: [master] RFR: 8371186: Lilliput2: Disable JFR Leak Profiler & related tests until it's fixed with +UseCompactObjectHeaders In-Reply-To: <9SVh_BWuPQ0lgg08MD-3QHOd4xmcHuZAsG0gNPzx4Sc=.7c6ab250-29e8-495a-9301-c6e74de548cd@github.com> References: <9SVh_BWuPQ0lgg08MD-3QHOd4xmcHuZAsG0gNPzx4Sc=.7c6ab250-29e8-495a-9301-c6e74de548cd@github.com> Message-ID: <5oVxBVqt9uZVYEyOKmgQl2TX863BHIsj9w0sFE8LYQ4=.3723cbff-2b81-4a11-bc72-9999fc6bc680@github.com> On Tue, 4 Nov 2025 02:03:03 GMT, Y. Srinivas Ramakrishna wrote: > The JFR leak profiler stores an encoded reference to a (canonical) path from roots to each of a set of sampled objects after GC at some interval in the space available in the displaced mark word on the sampled object's header. With Lilliput2, there isn't enough space to store such information in the header. Instead, we probably want to use a side hashtable to temporarily keep such information. We've filed a ticket to do that work. > > Meanwhile, in this PR, we disable the Leak Profiler when Lilliput2's `UseCompactObjectHeaders` is enabled. (This is already done in the Leak Profiler, e.g., for Shenanodah GC.) > > We also disable tests of the LeakProfiler when Lilliput2's UseCompactObjectHeaders is enabled. > > The JFR Leak Profiler workaround and the disabled tests will need to be re-enabled once the Leak Profiler is reworked to not use the object header in this manner in Lilliput2 with +UseCompactObjectHeaders. > > The PR also fixes some comments and fixes 3 jfr/event/allocation tests that needed to know about the correct new array header size overhead. > > ### Testing > - [x] `TEST_VM_FLAGLESS=true make test TEST="test/jdk/jdk/jfr" JTREG="JAVA_OPTIONS=+/-UseCompactObjectHeaders"` > - passes all tests with `-UseCompactObjectHeaders` > - skips previously failing tests with `+UseCompactObjectHeaders` > - [x] `TEST_VM_FLAGLESS=true make test TEST="test/jdk/jdk/jfr/event/allocation" JTREG="JAVA_OPTIONS=+/-UseCompactObjectHeaders"` > - passes all tests with `+/-UseCompactObjectHeaders` > - would fail with `+UseCompactObjectHeaders` without fix > > ### For followup > - Recorded failing tests which will be re-enabled when [JDK-8371185](https://bugs.openjdk.org/browse/JDK-8371185) is fixed. Generally, avoid doing whitespace changes and test tag reshufflings, especially if they deviate from upstream? These would cause more merge conflicts (and thus opportunities for bugs) later. test/jdk/jdk/jfr/event/oldobject/TestClassLoaderLeak.java line 43: > 41: * @requires vm.flagless > 42: * @requires vm.hasJFR > 43: * @requires vm.flagless Why `vm.flagless` was removed? It stays the same in other tests. ------------- PR Review: https://git.openjdk.org/lilliput/pull/205#pullrequestreview-3421174399 PR Review Comment: https://git.openjdk.org/lilliput/pull/205#discussion_r2493923665 From ysr at openjdk.org Wed Nov 5 15:07:10 2025 From: ysr at openjdk.org (Y. Srinivas Ramakrishna) Date: Wed, 5 Nov 2025 15:07:10 GMT Subject: [master] RFR: 8371186: Lilliput2: Disable JFR Leak Profiler & related tests until it's fixed with +UseCompactObjectHeaders In-Reply-To: <5oVxBVqt9uZVYEyOKmgQl2TX863BHIsj9w0sFE8LYQ4=.3723cbff-2b81-4a11-bc72-9999fc6bc680@github.com> References: <9SVh_BWuPQ0lgg08MD-3QHOd4xmcHuZAsG0gNPzx4Sc=.7c6ab250-29e8-495a-9301-c6e74de548cd@github.com> <5oVxBVqt9uZVYEyOKmgQl2TX863BHIsj9w0sFE8LYQ4=.3723cbff-2b81-4a11-bc72-9999fc6bc680@github.com> Message-ID: <7EffzCL3ICxt3fAucZVr0rV3OUpHlQh66SmhRXbOoLY=.b62f5c7c-96b0-417d-ba0c-18c54569be5a@github.com> On Wed, 5 Nov 2025 10:43:11 GMT, Aleksey Shipilev wrote: >> The JFR leak profiler stores an encoded reference to a (canonical) path from roots to each of a set of sampled objects after GC at some interval in the space available in the displaced mark word on the sampled object's header. With Lilliput2, there isn't enough space to store such information in the header. Instead, we probably want to use a side hashtable to temporarily keep such information. We've filed a ticket to do that work. >> >> Meanwhile, in this PR, we disable the Leak Profiler when Lilliput2's `UseCompactObjectHeaders` is enabled. (This is already done in the Leak Profiler, e.g., for Shenanodah GC.) >> >> We also disable tests of the LeakProfiler when Lilliput2's UseCompactObjectHeaders is enabled. >> >> The JFR Leak Profiler workaround and the disabled tests will need to be re-enabled once the Leak Profiler is reworked to not use the object header in this manner in Lilliput2 with +UseCompactObjectHeaders. >> >> The PR also fixes some comments and fixes 3 jfr/event/allocation tests that needed to know about the correct new array header size overhead. >> >> ### Testing >> - [x] `TEST_VM_FLAGLESS=true make test TEST="test/jdk/jdk/jfr" JTREG="JAVA_OPTIONS=+/-UseCompactObjectHeaders"` >> - passes all tests with `-UseCompactObjectHeaders` >> - skips previously failing tests with `+UseCompactObjectHeaders` >> - [x] `TEST_VM_FLAGLESS=true make test TEST="test/jdk/jdk/jfr/event/allocation" JTREG="JAVA_OPTIONS=+/-UseCompactObjectHeaders"` >> - passes all tests with `+/-UseCompactObjectHeaders` >> - would fail with `+UseCompactObjectHeaders` without fix >> >> ### For followup >> - Recorded failing tests which will be re-enabled when [JDK-8371185](https://bugs.openjdk.org/browse/JDK-8371185) is fixed. > > test/jdk/jdk/jfr/event/oldobject/TestClassLoaderLeak.java line 43: > >> 41: * @requires vm.flagless >> 42: * @requires vm.hasJFR >> 43: * @requires vm.flagless > > Why `vm.flagless` was removed? It stays the same in other tests. There's an extra one on line 41, which remains. In general, I realize there isn't a canonical order for these, which if it were adhered to would be good. ------------- PR Review Comment: https://git.openjdk.org/lilliput/pull/205#discussion_r2494953967 From ysr at openjdk.org Wed Nov 5 15:09:20 2025 From: ysr at openjdk.org (Y. Srinivas Ramakrishna) Date: Wed, 5 Nov 2025 15:09:20 GMT Subject: [master] RFR: 8371186: Lilliput2: Disable JFR Leak Profiler & related tests until it's fixed with +UseCompactObjectHeaders In-Reply-To: <5oVxBVqt9uZVYEyOKmgQl2TX863BHIsj9w0sFE8LYQ4=.3723cbff-2b81-4a11-bc72-9999fc6bc680@github.com> References: <9SVh_BWuPQ0lgg08MD-3QHOd4xmcHuZAsG0gNPzx4Sc=.7c6ab250-29e8-495a-9301-c6e74de548cd@github.com> <5oVxBVqt9uZVYEyOKmgQl2TX863BHIsj9w0sFE8LYQ4=.3723cbff-2b81-4a11-bc72-9999fc6bc680@github.com> Message-ID: On Wed, 5 Nov 2025 10:44:39 GMT, Aleksey Shipilev wrote: > Generally, avoid doing whitespace changes and test tag reshufflings, especially if they deviate from upstream? These would cause more merge conflicts (and thus opportunities for bugs) later. Good point; I'll go over it with an eye to reducing that, modulo earlier comment about a canonical order for `@requires` etc. which might avoid (or reduce churn in) such issues in general. ------------- PR Comment: https://git.openjdk.org/lilliput/pull/205#issuecomment-3491756928 From ysr at openjdk.org Thu Nov 6 00:50:34 2025 From: ysr at openjdk.org (Y. Srinivas Ramakrishna) Date: Thu, 6 Nov 2025 00:50:34 GMT Subject: [master] RFR: 8371186: Lilliput2: Disable JFR Leak Profiler & related tests until it's fixed with +UseCompactObjectHeaders In-Reply-To: <9SVh_BWuPQ0lgg08MD-3QHOd4xmcHuZAsG0gNPzx4Sc=.7c6ab250-29e8-495a-9301-c6e74de548cd@github.com> References: <9SVh_BWuPQ0lgg08MD-3QHOd4xmcHuZAsG0gNPzx4Sc=.7c6ab250-29e8-495a-9301-c6e74de548cd@github.com> Message-ID: On Tue, 4 Nov 2025 02:03:03 GMT, Y. Srinivas Ramakrishna wrote: > The JFR leak profiler stores an encoded reference to a (canonical) path from roots to each of a set of sampled objects after GC at some interval in the space available in the displaced mark word on the sampled object's header. With Lilliput2, there isn't enough space to store such information in the header. Instead, we probably want to use a side hashtable to temporarily keep such information. We've filed a ticket to do that work. > > Meanwhile, in this PR, we disable the Leak Profiler when Lilliput2's `UseCompactObjectHeaders` is enabled. (This is already done in the Leak Profiler, e.g., for Shenanodah GC.) > > We also disable tests of the LeakProfiler when Lilliput2's UseCompactObjectHeaders is enabled. > > The JFR Leak Profiler workaround and the disabled tests will need to be re-enabled once the Leak Profiler is reworked to not use the object header in this manner in Lilliput2 with +UseCompactObjectHeaders. > > The PR also fixes some comments and fixes 3 jfr/event/allocation tests that needed to know about the correct new array header size overhead. > > ### Testing > - [x] `TEST_VM_FLAGLESS=true make test TEST="test/jdk/jdk/jfr" JTREG="JAVA_OPTIONS=+/-UseCompactObjectHeaders"` > - passes all tests with `-UseCompactObjectHeaders` > - skips previously failing tests with `+UseCompactObjectHeaders` > - [x] `TEST_VM_FLAGLESS=true make test TEST="test/jdk/jdk/jfr/event/allocation" JTREG="JAVA_OPTIONS=+/-UseCompactObjectHeaders"` > - passes all tests with `+/-UseCompactObjectHeaders` > - would fail with `+UseCompactObjectHeaders` without fix > > ### For followup > - Recorded failing tests which will be re-enabled when [JDK-8371185](https://bugs.openjdk.org/browse/JDK-8371185) is fixed. cc @rkennke @tstuefe for reviews. Thanks! ------------- PR Comment: https://git.openjdk.org/lilliput/pull/205#issuecomment-3494295213 From rkennke at openjdk.org Thu Nov 6 13:41:51 2025 From: rkennke at openjdk.org (Roman Kennke) Date: Thu, 6 Nov 2025 13:41:51 GMT Subject: [master] RFR: 8371186: Lilliput2: Disable JFR Leak Profiler & related tests until it's fixed with +UseCompactObjectHeaders In-Reply-To: <9SVh_BWuPQ0lgg08MD-3QHOd4xmcHuZAsG0gNPzx4Sc=.7c6ab250-29e8-495a-9301-c6e74de548cd@github.com> References: <9SVh_BWuPQ0lgg08MD-3QHOd4xmcHuZAsG0gNPzx4Sc=.7c6ab250-29e8-495a-9301-c6e74de548cd@github.com> Message-ID: On Tue, 4 Nov 2025 02:03:03 GMT, Y. Srinivas Ramakrishna wrote: > The JFR leak profiler stores an encoded reference to a (canonical) path from roots to each of a set of sampled objects after GC at some interval in the space available in the displaced mark word on the sampled object's header. With Lilliput2, there isn't enough space to store such information in the header. Instead, we probably want to use a side hashtable to temporarily keep such information. We've filed a ticket to do that work. > > Meanwhile, in this PR, we disable the Leak Profiler when Lilliput2's `UseCompactObjectHeaders` is enabled. (This is already done in the Leak Profiler, e.g., for Shenanodah GC.) > > We also disable tests of the LeakProfiler when Lilliput2's UseCompactObjectHeaders is enabled. > > The JFR Leak Profiler workaround and the disabled tests will need to be re-enabled once the Leak Profiler is reworked to not use the object header in this manner in Lilliput2 with +UseCompactObjectHeaders. > > The PR also fixes some comments and fixes 3 jfr/event/allocation tests that needed to know about the correct new array header size overhead. > > ### Testing > - [x] `TEST_VM_FLAGLESS=true make test TEST="test/jdk/jdk/jfr" JTREG="JAVA_OPTIONS=+/-UseCompactObjectHeaders"` > - passes all tests with `-UseCompactObjectHeaders` > - skips previously failing tests with `+UseCompactObjectHeaders` > - [x] `TEST_VM_FLAGLESS=true make test TEST="test/jdk/jdk/jfr/event/allocation" JTREG="JAVA_OPTIONS=+/-UseCompactObjectHeaders"` > - passes all tests with `+/-UseCompactObjectHeaders` > - would fail with `+UseCompactObjectHeaders` without fix > > ### For followup > - Recorded failing tests which will be re-enabled when [JDK-8371185](https://bugs.openjdk.org/browse/JDK-8371185) is fixed. Looks good to me. (The change seems to do more than what the subject says, though.) Thank you! ------------- Marked as reviewed by rkennke (Reviewer). PR Review: https://git.openjdk.org/lilliput/pull/205#pullrequestreview-3428233803 From ysr at openjdk.org Thu Nov 6 22:16:43 2025 From: ysr at openjdk.org (Y. Srinivas Ramakrishna) Date: Thu, 6 Nov 2025 22:16:43 GMT Subject: [master] RFR: 8371186: Lilliput2: Disable JFR Leak Profiler & related tests until it's fixed with +UseCompactObjectHeaders In-Reply-To: References: <9SVh_BWuPQ0lgg08MD-3QHOd4xmcHuZAsG0gNPzx4Sc=.7c6ab250-29e8-495a-9301-c6e74de548cd@github.com> <5oVxBVqt9uZVYEyOKmgQl2TX863BHIsj9w0sFE8LYQ4=.3723cbff-2b81-4a11-bc72-9999fc6bc680@github.com> Message-ID: On Wed, 5 Nov 2025 15:06:53 GMT, Y. Srinivas Ramakrishna wrote: > > Generally, avoid doing whitespace changes and test tag reshufflings, especially if they deviate from upstream? These would cause more merge conflicts (and thus opportunities for bugs) later. > > Good point; I'll go over it with an eye to reducing that, modulo earlier comment about a canonical order for `@requires` etc. which might avoid (or reduce churn in) such issues in general. @shipilev , I confirmed that the order or @requires for the touched files was consistent. I'll file a cleanup ticket upstream to canonicalize the order to clean it up, separately. Will resolve your comment with a pointer to the filed ticket on tip, which should clear up the merge issue you allude to. ------------- PR Comment: https://git.openjdk.org/lilliput/pull/205#issuecomment-3499583520 From ysr at openjdk.org Thu Nov 6 22:16:44 2025 From: ysr at openjdk.org (Y. Srinivas Ramakrishna) Date: Thu, 6 Nov 2025 22:16:44 GMT Subject: [master] RFR: 8371186: Lilliput2: Disable JFR Leak Profiler & related tests until it's fixed with +UseCompactObjectHeaders In-Reply-To: References: <9SVh_BWuPQ0lgg08MD-3QHOd4xmcHuZAsG0gNPzx4Sc=.7c6ab250-29e8-495a-9301-c6e74de548cd@github.com> Message-ID: On Thu, 6 Nov 2025 13:38:42 GMT, Roman Kennke wrote: > Looks good to me. (The change seems to do more than what the subject says, though.) Thank you! Thanks for the review! (Indeed the bug description doesn't capture all of the work, but I have tried to do that in the PR description at the top.) ------------- PR Comment: https://git.openjdk.org/lilliput/pull/205#issuecomment-3499586414 From ysr at openjdk.org Thu Nov 6 22:30:16 2025 From: ysr at openjdk.org (Y. Srinivas Ramakrishna) Date: Thu, 6 Nov 2025 22:30:16 GMT Subject: [master] RFR: 8371186: Lilliput2: Disable JFR Leak Profiler & related tests until it's fixed with +UseCompactObjectHeaders In-Reply-To: References: <9SVh_BWuPQ0lgg08MD-3QHOd4xmcHuZAsG0gNPzx4Sc=.7c6ab250-29e8-495a-9301-c6e74de548cd@github.com> <5oVxBVqt9uZVYEyOKmgQl2TX863BHIsj9w0sFE8LYQ4=.3723cbff-2b81-4a11-bc72-9999fc6bc680@github.com> Message-ID: On Thu, 6 Nov 2025 22:13:08 GMT, Y. Srinivas Ramakrishna wrote: > > > Generally, avoid doing whitespace changes and test tag reshufflings, especially if they deviate from upstream? These would cause more merge conflicts (and thus opportunities for bugs) later. > > > > > > Good point; I'll go over it with an eye to reducing that, modulo earlier comment about a canonical order for `@requires` etc. which might avoid (or reduce churn in) such issues in general. > > @shipilev , I confirmed that the order or @requires for the touched files was consistent. I'll file a cleanup ticket upstream to canonicalize the order to clean it up, separately. > > Will resolve your comment with a pointer to the filed ticket on tip, which should clear up the merge issue you allude to. Filed https://bugs.openjdk.org/browse/JDK-8371445 ------------- PR Comment: https://git.openjdk.org/lilliput/pull/205#issuecomment-3499618069 From ysr at openjdk.org Thu Nov 6 22:30:16 2025 From: ysr at openjdk.org (Y. Srinivas Ramakrishna) Date: Thu, 6 Nov 2025 22:30:16 GMT Subject: [master] Integrated: 8371186: Lilliput2: Disable JFR Leak Profiler & related tests until it's fixed with +UseCompactObjectHeaders In-Reply-To: <9SVh_BWuPQ0lgg08MD-3QHOd4xmcHuZAsG0gNPzx4Sc=.7c6ab250-29e8-495a-9301-c6e74de548cd@github.com> References: <9SVh_BWuPQ0lgg08MD-3QHOd4xmcHuZAsG0gNPzx4Sc=.7c6ab250-29e8-495a-9301-c6e74de548cd@github.com> Message-ID: On Tue, 4 Nov 2025 02:03:03 GMT, Y. Srinivas Ramakrishna wrote: > The JFR leak profiler stores an encoded reference to a (canonical) path from roots to each of a set of sampled objects after GC at some interval in the space available in the displaced mark word on the sampled object's header. With Lilliput2, there isn't enough space to store such information in the header. Instead, we probably want to use a side hashtable to temporarily keep such information. We've filed a ticket to do that work. > > Meanwhile, in this PR, we disable the Leak Profiler when Lilliput2's `UseCompactObjectHeaders` is enabled. (This is already done in the Leak Profiler, e.g., for Shenanodah GC.) > > We also disable tests of the LeakProfiler when Lilliput2's UseCompactObjectHeaders is enabled. > > The JFR Leak Profiler workaround and the disabled tests will need to be re-enabled once the Leak Profiler is reworked to not use the object header in this manner in Lilliput2 with +UseCompactObjectHeaders. > > The PR also fixes some comments and fixes 3 jfr/event/allocation tests that needed to know about the correct new array header size overhead. > > ### Testing > - [x] `TEST_VM_FLAGLESS=true make test TEST="test/jdk/jdk/jfr" JTREG="JAVA_OPTIONS=+/-UseCompactObjectHeaders"` > - passes all tests with `-UseCompactObjectHeaders` > - skips previously failing tests with `+UseCompactObjectHeaders` > - [x] `TEST_VM_FLAGLESS=true make test TEST="test/jdk/jdk/jfr/event/allocation" JTREG="JAVA_OPTIONS=+/-UseCompactObjectHeaders"` > - passes all tests with `+/-UseCompactObjectHeaders` > - would fail with `+UseCompactObjectHeaders` without fix > > ### For followup > - Recorded failing tests which will be re-enabled when [JDK-8371185](https://bugs.openjdk.org/browse/JDK-8371185) is fixed. This pull request has now been integrated. Changeset: 6f12fc01 Author: Y. Srinivas Ramakrishna URL: https://git.openjdk.org/lilliput/commit/6f12fc01eed8b75c3e9befe9ffc9ca0278320ec0 Stats: 74 lines in 32 files changed: 52 ins; 6 del; 16 mod 8371186: Lilliput2: Disable JFR Leak Profiler & related tests until it's fixed with +UseCompactObjectHeaders The JFR leak profiler stores an encoded reference to a (canonical) path from roots to each of a set of sampled objects after GC at some interval in the space available in the displaced mark word on the sampled object's header. With Lilliput2, there isn't enough space to store such information in the header. Instead, we probably want to use a side hashtable to temporarily keep such information. We've filed a ticket to do that work. Meanwhile, in this PR, we will disable the Leak Profiler when Lilliput2's `UseCompactObjectHeaders` is enabled. (This is already done in the Leak Profiler, e.g., for Shenanodah GC.) We'll also disable tests of the LeakProfiler when Lilliput2's UseCompactObjectHeaders is enabled. The JFR Leak Profiler workaround and the disabled tests will need to be re-enabled once the Leak Profiler is reworked to not use the object header in this manner in Lilliput2 with +UseCompactObjectHeaders. Reviewed-by: rkennke ------------- PR: https://git.openjdk.org/lilliput/pull/205