RFR: 8342818: Implement CPU Time Profiling for JFR
Markus Grönlund
mgronlun at openjdk.org
Wed Oct 30 14:19:18 UTC 2024
On Wed, 28 Aug 2024 16:47:21 GMT, Johannes Bechberger <jbechberger at openjdk.org> wrote:
> This is the code for the [JEP draft: CPU Time based profiling for JFR].
src/jdk.jfr/share/classes/jdk/jfr/internal/EventControl.java line 84:
> 82: addControl(Threshold.NAME, defineThreshold(eventType));
> 83: }
> 84: if (eventType.hasStackTrace() && !eventType.isCPUTimeMethodSampling()) {
The second clause is not really needed, right? I don't think the CPUTimeMethodSampling event hasStacktrace() is true.
The event has a separate StackTrace field in the event, but that is not what is being checked here.
src/jdk.jfr/share/conf/jfr/profile.jfc line 195:
> 193: <event name="jdk.CPUTimeSample">
> 194: <setting name="enabled" control="method-sampling-enabled">false</setting>
> 195: <setting name="throttle">10ms</setting>
Can a rate be given here instead of an absolute value? Otherwise, there is a mismatch between the default. jfc and the profile.jfc which seems quite unintuitive.
test/jdk/jdk/jfr/event/profiling/TestCPUTimeAndExecutionSample.java line 35:
> 33: * @test
> 34: * @key jfr
> 35: * @requires vm.hasJFR
@requires vm.hasJFR & os.family == "linux" ?
test/jdk/jdk/jfr/event/profiling/TestCPUTimeSamplingLongPeriod.java line 35:
> 33: * @test
> 34: * @key jfr
> 35: * @requires vm.hasJFR
@requires vm.hasJFR & os.family == "linux"?
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/20752#discussion_r1822726454
PR Review Comment: https://git.openjdk.org/jdk/pull/20752#discussion_r1822731716
PR Review Comment: https://git.openjdk.org/jdk/pull/20752#discussion_r1822734759
PR Review Comment: https://git.openjdk.org/jdk/pull/20752#discussion_r1822736281
More information about the hotspot-dev
mailing list