Semantics of ObjectAllocationSample.weight
Gunnar Morling
gunnar at hibernate.org
Sun May 23 20:45:33 UTC 2021
Hi,
I'm trying to understand the exact semantics of the "weight" attribute of
the new JFR event type ObjectAllocationSample, which was added in Java 16.
My interpretation so far has been that this would be essentially the number
of bytes allocated since the previous ObjectAllocationSample was emitted.
Is that correct? The event docs say:
"The relative weight of the sample. Aggregating the weights for a large
number of samples, for a particular class, thread or stack trace, gives a
statistically accurate representation of the allocation pressure"
Is this to say my understanding above is (only) correct when looking at a
large number of OAS events? I believe it is, based on the observation that
sum(ObjectAllocationInNewTLAB.tlabSize) +
sum(jdk.ObjectAllocationOutsideTLAB.allocationSize) =
sum(jdk.ObjectAllocationSample.weight) for a large number of events. Any
confirmation (or correction) would be appreciated. Also, does any more
extensive description of the weight attribute exist somewhere?
Thanks a lot,
--Gunnar
More information about the hotspot-jfr-dev
mailing list