RFR: 8352251: Implement JEP 518: JFR Cooperative Sampling [v32]

Markus Grönlund mgronlun at openjdk.org
Wed May 21 11:26:57 UTC 2025


On Wed, 21 May 2025 11:15:52 GMT, Aleksey Shipilev <shade at openjdk.org> wrote:

> > > I am taking a look how to unbreak Minimal and Zero again.
> > 
> > 
> > Hmm. I thought JFR was not defined for Zero?
> 
> Yes. But there is an instance of the fairly common `#if` vs `#ifdef` trap here:
> 
> ```
> diff --git a/src/hotspot/share/runtime/safepointMechanism.cpp b/src/hotspot/share/runtime/safepointMechanism.cpp
> index 57fbc9078c8..d4160161f19 100644
> --- a/src/hotspot/share/runtime/safepointMechanism.cpp
> +++ b/src/hotspot/share/runtime/safepointMechanism.cpp
> @@ -32,7 +32,7 @@
>  #include "runtime/safepointMechanism.inline.hpp"
>  #include "runtime/stackWatermarkSet.hpp"
>  #include "utilities/globalDefinitions.hpp"
> -#ifdef INCLUDE_JFR
> +#if INCLUDE_JFR
>  #include "jfr/jfr.inline.hpp"
>  #endif
> ```
> 
> "No JFR" is `#define INCLUDE_JFR 0`. Which means `#if INCLUDE_JFR` == `false`, but `#ifdef INCLUDE_JFR` == `true`.
> 
> The patch above fixes both Minimal and Zero Hotspot fastdebug builds for me locally. I am running full builds now.

Arghh...that old crap again...

-------------

PR Comment: https://git.openjdk.org/jdk/pull/24296#issuecomment-2897587228


More information about the hotspot-jfr-dev mailing list