RFR: 8350616: Skip ValidateHazardPtrsClosure in non-debug builds

Kim Barrett kbarrett at openjdk.org
Wed Feb 26 05:47:52 UTC 2025


On Tue, 25 Feb 2025 02:33:23 GMT, David Holmes <dholmes at openjdk.org> wrote:

> Simple cleanup to skip debug code in a non-debug build. This removes some overhead when working with very large numbers of threads. Basic perf testing starting a new thread when 20000 already exist:
> 
> Before: 532377 ns
> After:  361178 ns
> 
> which is 32% improvement.
> 
> Testing:
>   - tiers 1-3 sanity
> 
> Thanks

Changes requested by kbarrett (Reviewer).

src/hotspot/share/runtime/threadSMR.cpp line 369:

> 367: };
> 368: 
> 369: #ifdef DEBUG

Shouldn't that be s/DEBUG/ASSERT/ ?  And similarly for the use.

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

PR Review: https://git.openjdk.org/jdk/pull/23762#pullrequestreview-2643133440
PR Review Comment: https://git.openjdk.org/jdk/pull/23762#discussion_r1970942114


More information about the hotspot-runtime-dev mailing list