RFR: 8314550: [macosx-aarch64] serviceability/sa/TestJmapCore.java fails with "sun.jvm.hotspot.debugger.UnmappedAddressException: 801000800"
Chris Plummer
cjplummer at openjdk.org
Fri Aug 25 04:48:08 UTC 2023
On Fri, 25 Aug 2023 02:54:05 GMT, David Holmes <dholmes at openjdk.org> wrote:
> As `AlwaysPreTouch` is false by default, and we don't explicitly turn it on for CI testing, what tests will actually be affected by this change? And for applications that already enable `AlwaysPreTouch` (would they?) what impact might this have e.g. on startup?
In the CR I mentioned the following was added as part of the fix done in [JDK-8293563](https://bugs.openjdk.org/browse/JDK-8293563) (which solves this same issue for the ZGC heap):
public static String getAlwaysPretouchArg(boolean withCore) {
// macosx-aarch64 has an issue where sometimes the java heap will not be dumped to the
// core file. Using -XX:+AlwaysPreTouch fixes the problem.
if (withCore && Platform.isOSX() && Platform.isAArch64()) {
return "-XX:+AlwaysPreTouch";
} else {
return "-XX:-AlwaysPreTouch";
}
}
So this bit of code will make sure that all the SA core file tests use AlwaysPreTouch on macosx-aarch64.
As for performance impact. I'm not certain and I'm also not to certain of the use case for AlwaysPretouch. As far as I can tell in was introduced by [JDK-6806090](https://bugs.openjdk.org/browse/JDK-6806090) and seems it was actually added to help with performance, although I'm not sure how.
The CDS archive tends to be small compared with the java heap, so I would think the relative impact would be small. Also unclear is how much of the archive is likely to get mapped in on startup anyway. Perhaps @iklam can add some insight.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/15423#issuecomment-1692749815
More information about the hotspot-runtime-dev
mailing list