RFR: 8266936: Add a finalization JFR event [v10]

Markus Grönlund mgronlun at openjdk.java.net
Mon Oct 18 16:38:50 UTC 2021


On Tue, 31 Aug 2021 08:42:58 GMT, Erik Gahlin <egahlin at openjdk.org> wrote:

>> Markus Grönlund has updated the pull request incrementally with three additional commits since the last revision:
>> 
>>  - localize
>>  - cleanup
>>  - FinalizerStatistics
>
> test/jdk/jdk/jfr/event/runtime/TestFinalizerStatisticsEvent.java line 98:
> 
>> 96:               case TEST_CLASS_NAME: {
>> 97:                   Asserts.assertTrue(event.getString("codeSource").startsWith("file://"));
>> 98:                   foundTestClassName = true;
> 
> Could we (sanity) check "objects" and "totalFinalzersRun" fields as well?

It's risky to do because of the non-deterministic nature of when the Finalizer thread runs (if at all). The best I could think of is to check if either field is 0 or more, but that becomes so weak it's not much of a sanity check.

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

PR: https://git.openjdk.java.net/jdk/pull/4731


More information about the hotspot-runtime-dev mailing list