During reviewing JDK-8256811, [~cjplummer] has following comments (https://github.com/openjdk/jdk/pull/9168#discussion_r907812755)
"This looked a bit strange to me w.r.t. when we activate class tracking, so I looked into it. It turns out that when the debugger sends a request for CLASS_UNLOAD events, we convert it to EI_GC_FINISH and install a handler for it (and activate class tracking as you see in the above code). Activating doesn't do much. In fact it's not even where the ObjectFree events are enabled. This is done unconditionally in `classTrack_initialize()`, which is called whenever the debug agent is initialized. This means we always have the ObjectFree events enabled, even when the debugger has not requested CLASS_LOAD events. This seems like a bit of a performance issue. Maybe `classTrack_activate()` is where we should be enabling ObjectFree events. We should probably file a separate CR to have this fixed"