beforeTrial/afterTrial not called for warmup forks
Alex Averbuch
alex.averbuch at neo4j.com
Fri Dec 22 09:43:25 UTC 2017
Thanks, Aleksey.
On Thu, Dec 21, 2017 at 8:23 AM, Aleksey Shipilev <shade at redhat.com> wrote:
> Hi,
>
> On 12/15/2017 10:21 AM, Alex Averbuch wrote:
> > I've noticed that ExternalProfiler#addJVMInvokeOptions &
> > ExternalProfiler#addJVMOptions are invoked for warmup forks, but that
> > ExternalProfiler#beforeTrial & ExternalProfiler#afterTrial are not.
> >
> > On first impression it feels inconsistent.
> > Is this intended behavior?
>
> It is inconsistent. The intent was to ignore profiler results for warmup
> forks, and it was crudely
> implemented by doing the warmup forks separately, this is why
> {after,before}Trial is called only
> with measurement forks. But, JVM still forks with the added of
> ExternalProfiler JVM options during
> warmup forks anyway.
>
> It seems more consistent to run ExternalProfilers during warmup forks too,
> and just ignore their
> results. This is less surprising, and aligns better with what
> InternalProfilers are doing --
> internal profilers also run during warmups and their results ignored.
>
> Fixed with:
> https://bugs.openjdk.java.net/browse/CODETOOLS-7902088
>
> Thanks,
> -Aleksey
>
>
>
More information about the jmh-dev
mailing list