RFR: 8342818: Implement CPU Time Profiling for JFR [v4]
Thomas Stuefe
stuefe at openjdk.org
Thu Oct 31 13:15:39 UTC 2024
On Wed, 30 Oct 2024 19:34:23 GMT, Johannes Bechberger <jbechberger at openjdk.org> wrote:
>> This is the code for the [JEP draft: CPU Time based profiling for JFR].
>
> Johannes Bechberger has updated the pull request incrementally with one additional commit since the last revision:
>
> Remove min_valid_free_size_bytes
Is there any form design document? The description in the JEP is extremely sparse, and this PR carries no information at all.
The ability to accurately and precisely measure CPU consumption was added to Linux in 2.16.12 through a timer that emits signals at regular intervals of time spent on the CPU (as opposed to elapsed, or "wall-clock" time). Most profilers on Linux utilize this mechanism to produce CPU time profiles.
<snip>
This Linux capability should be employed by JFR to safely produce CPU time profilers on the JDK. This functionality will allow the wide audience of developers deploying Java applications on Linux to make them more efficient.
That is all I could find. Is there more?
I am mostly curious - and I admit, nervous - about reentrant safety. I see, again, use of setjmp/longjmp semantics here in combination with a mechanism that I believe stops the JVM at arbitrary(?) times, which to me is a warning sign.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/20752#issuecomment-2449813561
More information about the hotspot-dev
mailing list