RFR: 8298614: Support CDS heap dumping for non-G1 collectors
Ioi Lam
iklam at openjdk.org
Mon Sep 16 19:39:05 UTC 2024
On Fri, 13 Sep 2024 20:20:39 GMT, Matias Saavedra Silva <matsaave at openjdk.org> wrote:
> This patch upstreams [JDK-8333222](https://bugs.openjdk.org/browse/JDK-8333222) from the Leyden repo. Additional test fixes not in that patch were added. Verified with tier 1-5 tests.
test/hotspot/jtreg/runtime/cds/appcds/sharedStrings/InvalidFileFormat.java line 29:
> 27: * @summary Check most common errors in file format
> 28: * @requires vm.cds.write.archived.java.heap
> 29: * @requires vm.flagless
I think the reason you needed to add `vm.flagless` is SharedStringsUtils explicitly adds `-XX:UseG1GC` (long time ago this was required to dump the Java heap objects). It's better to remove `-XX:UseG1GC`.
You might need to ensure that all tests that use SharedStringsUtils have `@requires vm.cds.write.archived.java.heap`.
You should also check all other test cases to see if we misuse `-XX:UseG1GC` for a similar reason.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/21004#discussion_r1761763772
More information about the hotspot-runtime-dev
mailing list