RFR: JDK-8311788: ClassLoadUnloadTest fails on AIX after JDK-8193513
Matthias Baesken
mbaesken at openjdk.org
Wed Jul 12 11:05:13 UTC 2023
On Wed, 12 Jul 2023 07:54:20 GMT, Thomas Stuefe <stuefe at openjdk.org> wrote:
> > Hi Thomas, maybe using something else like ClassUnloadTest would work too. Using StringConcatHelper came out of the discussion in https://bugs.openjdk.org/browse/JDK-8193513
>
> Hi Matthias,
>
> `ClassUnloadTest` is always present, since we are executing it. StringConcatHelper may get renamed or moved or removed in the future, and then this test breaks again.
>
> In contrast to very basic classes like `j.l.String` we also know that `ClassUnloadTest` will get loaded with traditional class loading, not materialized via CDS heap archive. Which may interfere with callstack tracing.
>
> If you use the same argument as we start the child process with, you don't even need to hardcode the name. Example:
>
> ```
> String x = ClassUnloadTestMain.class.getName();
>
> pb = exec("-Xlog:class+load+cause", "-XX:LogClassLoadingCauseFor=" + x);
> checkFor("[class,load,cause]", "Java stack when loading " + x + ":");
>
> pb = exec("-Xlog:class+load+cause+native", "-XX:LogClassLoadingCauseFor=" + x);
> checkFor("[class,load,cause,native]", "Native stack when loading " + x + ":");
>
> pb = exec("-Xlog:class+load+cause*", "-XX:LogClassLoadingCauseFor=" + x);
> checkFor("[class,load,cause] Java stack when loading " + x + ":");
> checkFor("[class,load,cause,native] Native stack when loading " + x + ":");
> ```
>
> passed for me.
>
> Cheers, Thomas
Hi Thomas I adjusted the test following your suggestion .
-------------
PR Comment: https://git.openjdk.org/jdk/pull/14829#issuecomment-1632294301
More information about the hotspot-runtime-dev
mailing list