# HG changeset patch # User shade # Date 1572287045 -3600 # Mon Oct 28 19:24:05 2019 +0100 # Node ID 59f14bf92ce1ba6b63ea188f60a372f2e3616afc # Parent 031b6ed3a935154457a4b0ce571bb2072b800513 7902532: Profiler Javadoc should be clear about SPI-related expectations diff -r 031b6ed3a935 -r 59f14bf92ce1 jmh-core/src/main/java/org/openjdk/jmh/profile/Profiler.java --- a/jmh-core/src/main/java/org/openjdk/jmh/profile/Profiler.java Mon Oct 28 19:24:01 2019 +0100 +++ b/jmh-core/src/main/java/org/openjdk/jmh/profile/Profiler.java Mon Oct 28 19:24:05 2019 +0100 @@ -36,6 +36,12 @@ * The message in {@link org.openjdk.jmh.profile.ProfilerException} should * clearly articulate the reason. * + *

JMH will try to discover profiler implementations using the SPI mechanism. + * Note: discoverable implementations must provide a no-arg constructor + * for initial discovery; the instance created during discovery will be rejected. + * If implementation would have a constructor accepting the String option line, + * it would be preferred for subsequent instantiation over the no-arg constructor. + * *

Profilers normally implement one of the subinterfaces.

* @see org.openjdk.jmh.profile.ExternalProfiler * @see org.openjdk.jmh.profile.InternalProfiler