RFR: 8273597: Rectify Thread::is_ConcurrentGC_thread() [v2]
Per Liden
pliden at openjdk.java.net
Mon Sep 13 12:13:49 UTC 2021
On Fri, 10 Sep 2021 14:30:41 GMT, Coleen Phillimore <coleenp at openjdk.org> wrote:
>> src/hotspot/share/code/nmethod.cpp line 1563:
>>
>>> 1561: DEBUG_ONLY(bool called_by_gc = Universe::heap()->is_gc_active() ||
>>> 1562: Thread::current()->is_ConcurrentGC_thread() ||
>>> 1563: Thread::current()->is_Worker_thread();)
>>
>> Three places use the same condition. Did you consider creating a helper function?
>
> I wonder if adding a helper function would encourage people to think they're the same again.
All three places doesn't quite have identical conditions today. We might want to clean this up, for example, I'd argue that at least one of the asserts could be removed. However, I'm not sure I want to do such a cleanup of a fairly unrelated thing as part of this PR.
-------------
PR: https://git.openjdk.java.net/jdk/pull/5463
More information about the shenandoah-dev
mailing list