RFR: 8241160: Concurrent class unloading reports GCTraceTime events as JFR pause sub-phase events
Kim Barrett
kim.barrett at oracle.com
Thu Mar 26 19:01:08 UTC 2020
> On Mar 26, 2020, at 5:34 AM, Stefan Karlsson <stefan.karlsson at oracle.com> wrote:
>
> On 2020-03-25 23:37, Kim Barrett wrote:
>> src/hotspot/share/gc/shared/gcTraceSend.cpp
>> 306 assert(phase->level() < 2, "There is only two levels for ConcurrentPhase");
>>
>> Seems like there ought to be a named constant for that "2", similar to
>> PhasesStack::PHASE_LEVELS used in a similar place in visit_pause. But
>> then, there's a mismatch between PHASE_LEVELS (6) and the number of
>> cases in visit_pause (4). That's "interesting"...
>
> Yeah. visit_pause checks that we don't push too many levels of phases, but we already check that when we push phases:
>
> […]
> I think it would make sense to remove that assert, to get rid of that confusion.
>
> I'm not so sure about removing 'assert(phase->level() < 2' since it's there to to catch when we start to use deeper nesting of the concurrent phases. Maybe if we also add EventGCPhaseConcurrentLevel2-4 (analogous to visit_pause) and then get rid of this assert?
>
> If we want to go ahead and do any of these changes (find a name for the 2 or adding events) I'll create a separate RFR.
Thanks for the walk-through. Your suggestion seems reasonable.
More information about the hotspot-gc-dev
mailing list