RFR: 8185525: [Event Request] Add Tracing event for DictionarySizes
gerard.ziemski at oracle.com
Wed Apr 10 17:10:00 UTC 2019
Thank you Coleen!
On 4/9/19 10:57 AM, coleen.phillimore at oracle.com wrote:
>>> I didn't think this should be moved from jfrPeriodic.cpp. I thought
>>> it could be something like an X macro.
>>> Or just make this bit a function that they all call with event as
>>> + event.set_numberOfBuckets(statistics._number_of_buckets);
>>> + event.set_numberOfEntries(statistics._number_of_entries);
>>> + event.set_totalFootprint(statistics._total_footprint);
>>> + event.set_maximumBucketCount(statistics._maximum_bucket_size);
>>> + event.set_averageBucketCount(statistics._average_bucket_size);
>>> + event.set_varianceOfBucketCount(statistics._variance_of_bucket_size);
>>> + event.set_stdDevOfBucketCount(statistics._stddev_of_bucket_size);
>>> + event.set_insertionRate(statistics._add_rate);
>>> + event.set_removalRate(statistics._remove_rate);
>>> + event.commit();
>> Each of those JFR events are an instance of a different class, so the
>> best I can do is a macro here (otherwise I'd have to create a base
>> class for the TableStatistics events from which to extend our 6 table
>> events, but I'm not sure JFR architecture supports that - it
>> generates class automatically from the event's meta description)
>> Updated webrev http://cr.openjdk.java.net/~gziemski/8185525_rev4/
> Yes, that looks better to me.
> + //statistics.print(tty, "SymbolTable");
> You should remove commented out code. You can always add it back
> locally if you want to debug it again. (I don't need to see this change).
It was pointed out to me, that we can use templates instead of macro
here, so I tried it and I like it:
More information about the jmc-dev