RFR: 8351651: Cleanup LockStack::is_owning_thread [v5]

Coleen Phillimore coleenp at openjdk.org
Tue Mar 11 16:24:08 UTC 2025


On Tue, 11 Mar 2025 13:30:08 GMT, Stefan Karlsson <stefank at openjdk.org> wrote:

>> The reason I was here was that I was trying to find wasted code in product mode, then I realized it's not used anywhere in product mode.  So I'd rather it not exist in product mode.  I'll compile it out of PRODUCT, that's a better thing to do.
>
> Won't the linker simply remove this? Keep it if you want, but to me these PRODUCT_ONLY / PRODUCT_RETURN / ASSERT just adds noise without giving us anything substantial.

Fixed.

>> It is unrelated, but I mentioned it in the bug report.  Feels like too useless to do on it's own.
>
> I didn't read the bug report with the anticipation that the PR description had all the necessary information.
> 
> I was surprised by this change in a bug named "Cleanup LockStack::is_owning_thread" and I think that future readers might be as well. So, I prefer if you split this into a separate PR. PRs are fast to create nowadays. If you don't want to do that, then at least update the name of the PR.

okay I moved it to another trivial change.  The reason for this cleanup is that this code was in lockStack.inline.hpp indicating it's somewhat performance critical.  In trying to find a performance problem, I don't want to look at this function.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/23981#discussion_r1989676913
PR Review Comment: https://git.openjdk.org/jdk/pull/23981#discussion_r1989679688


More information about the hotspot-runtime-dev mailing list