RFR: 8315362: NMT: summary diff reports threads count incorrectly [v4]

Thomas Stuefe stuefe at openjdk.org
Tue Oct 10 15:51:13 UTC 2023


On Tue, 10 Oct 2023 13:44:00 GMT, Evgeny Ignatenko <duke at openjdk.org> wrote:

>> Hi,
>> 
>> Your new test fails, as the thread count is larger than expected (7 instead of 5). Have you run the test yourself? Since you're creating 5 threads inside of the main thread, I'd expect the thread count to be at least 6.
>> 
>> The exact output is `(threads #36 +7)` and the error is `java.lang.RuntimeException: 'threads #\d+ +5' missing from stdout/stderr`
>
> Hi @jdksjolen,
> 
> Ofcourse I run this test and it always passes for me. I am using macos-aarch platform.
> Maybe it is not always correct to assume the amout of threads addede since VM could possible spawn some threads for it needs. 
> 
> I guess that we could just check for thread ammout to be increased not assuming the exact amount of new threads then.

@zer0chance Welcome to the OpenJDK.

Some remarks:

Please make it a habit and provide a clear issue- and patch-description in the text of the PR. It serves as documentation both here and in the mailing lists and is nice to reviewers and community.

Testing: At the very least, GHAs should run and be green, or test errors confirmed as being not related. Please enable GHAs in your repo. The issues @jdksjolen reported would have shown probably also in GHAs. Just testing locally on MacOS is definitely not enough for a subsystem that exists on all platforms.

More infos (bit outdated, but the testing is described): https://openjdk.org/contribute

About the thread issue: Number of threads varies depending on the machine. Threads are started dynamically depending on the number of cores (e.g. compiler threads). To rule that out pin the number of cores via JVM command line (2 is a good value).

Cheers, Thomas

-------------

PR Comment: https://git.openjdk.org/jdk/pull/15490#issuecomment-1755727071


More information about the hotspot-runtime-dev mailing list