RFR (S) 8247615: Initialize the bytes left for the heap sampler

Man Cao manc at google.com
Thu Jun 25 23:53:52 UTC 2020


Thanks for fixing this!

> 53 ThreadHeapSampler() : _bytes_until_sample(get_sampling_interval())  {

Does this work better? (It has to be done after the initialization of _rnd.)
_bytes_until_sample = pick_next_sample();

It could avoid completely missing to sample the first 512K allocation.
It could also avoid the problem where every thread deterministically
allocates the same object at 512K, although this is unlikely.

-Man
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.java.net/pipermail/serviceability-dev/attachments/20200625/65cd4c8f/attachment.htm>


More information about the serviceability-dev mailing list