RFR: 8282420: JFR: Remove event handlers [v6]
Markus Grönlund
mgronlun at openjdk.org
Thu Jul 7 13:15:44 UTC 2022
On Wed, 6 Jul 2022 20:25:57 GMT, Doug Simon <dnsimon at openjdk.org> wrote:
>> Yes. It's been fixed. See:
>> https://github.com/openjdk/jdk/pull/8680
>
> Yes, I see the bodies are guarded. I was referring to the declarations here in `jfrResolution.hpp`. Shouldn't it be something like:
>
> #ifdef COMPILER1
> static void on_c1_resolution(const GraphBuilder * builder, const ciKlass * holder, const ciMethod * target);
> #endif
> #ifdef COMPILER2
> static void on_c2_resolution(const Parse * parse, const ciKlass * holder, const ciMethod * target);
> #endif
>
> and likewise in `jfr.hpp`:
>
> #ifdef COMPILER2
> static void on_resolution(const Parse* parse, const ciKlass* holder, const ciMethod* target);
> #endif
> #ifdef COMPILER1
> static void on_resolution(const GraphBuilder* builder, const ciKlass* holder, const ciMethod* target);
> #endif
In general, we would like to reduce the amount of conditionalization because it makes the code harder to read and follow. Compilers should not require a definition until a definition is actually needed. Are you seeing compilation errors?
-------------
PR: https://git.openjdk.org/jdk/pull/8383
More information about the hotspot-jfr-dev
mailing list