New allocation profiler
Aleksey Shipilev
aleksey.shipilev at oracle.com
Wed Apr 15 20:10:01 UTC 2015
On 04/15/2015 10:56 PM, Vladimir Sitnikov wrote:
>> So (puts his Maintainer Hat on), please fold HotspotAllocationProfiler
>> into GCProfiler, if don't have strong objections against doing so.
>
> Will do that.
Thanks!
> It looks like there is no way to print "allocation profiler is not
> supported" warning since it could be "regular -prof" gc works while
> allocation does not (e.g. jre<1.6u26)
Since 6u26 is very legacy at this point, I'd like to ignore this issue.
Don't produce alloc rate results if you can't. Make a note about that in
GCProfile code.
>
> Another quick question:
>
> In GCProfiler we have
> if (c > 0) {
> churn.add(name, c);
> }
>
> Isn't that a measuring bias?
> I think we should measure all the values, otherwise you are just
> throwing away zero measurements for no reason.
$churn accumulates the results within the iteration. Therefore,
filtering zeroes is a-okay there. When afterIteration produces the
results, it will generate the results for any space that was observed as
non-zero at least once *over the course of benchmark*. In other words,
we are computing the "sum" over the churn rates, and missing zeros there
is ok.
But there is a potential for the measurement bias elsewhere, when
"missing" result for a particular iteration has the potential to offset
the results:
https://bugs.openjdk.java.net/browse/CODETOOLS-7901375
In GCProfiler, this measurement bias is alleviated by having warmup
iterations to "warmup" the $observedSpaces set we care about.
Thanks,
-Aleksey
More information about the jmh-dev
mailing list