RFR: 8315362: NMT: summary diff reports threads count incorrectly [v7]
Evgeny Ignatenko
duke at openjdk.org
Sat Oct 14 22:16:16 UTC 2023
On Fri, 13 Oct 2023 09:47:27 GMT, Thomas Stuefe <stuefe at openjdk.org> wrote:
>> Evgeny Ignatenko has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains eight additional commits since the last revision:
>>
>> - Merge branch 'openjdk:master' into pr/8315362
>> - Move thread count to MemBaseline
>> - Not check exact amount of added threads
>> - Remove bootclasspath from test
>> - Change thread_count var type to size_t
>> - Review comments
>> - Resolve conflicts
>> - 8315362: NMT: summary diff reports threads count incorrectly
>
> src/hotspot/share/services/threadStackTracker.cpp line 85:
>
>> 83: bool removed = _simple_thread_stacks->remove(site);
>> 84: assert(removed, "Must exist");
>> 85: _thread_count--;
>
> Move out of loop
Fixed. Also moverd tc out
> test/hotspot/jtreg/runtime/NMT/SummaryDiffThreadCount.java line 61:
>
>> 59: pb.command(new String[] { JDKToolFinder.getJDKTool("jcmd"), pid, "VM.native_memory", "summary.diff"});
>> 60: output = new OutputAnalyzer(pb.start());
>> 61: output.shouldMatch("threads #\\d+ \\+");
>
> So the trailing + is the trick, right? Add a little comment above? Also, just to be sure, execute the test with the pre-patched version to check that it correctly fails.
Done. Test correctly fails with build from master
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/15490#discussion_r1359646556
PR Review Comment: https://git.openjdk.org/jdk/pull/15490#discussion_r1359646544
More information about the hotspot-runtime-dev
mailing list