RFR: 8330064: JFR: Incorrect function declarations for register/unregister_stack_filter
Daniel D. Daugherty
dcubed at openjdk.org
Sat Apr 13 13:50:45 UTC 2024
On Thu, 11 Apr 2024 00:57:28 GMT, David Holmes <dholmes at openjdk.org> wrote:
> The commit from [JDK-8314745](https://bugs.openjdk.org/browse/JDK-8314745) contains
>
> jlong JNICALL jfr_register_stack_filter(JNIEnv* env, jobject classes, jobject methods);
> jlong JNICALL jfr_unregister_stack_filter(JNIEnv* env, jlong start_filter_id);
>
> in `jfrJniMethod.hpp`, but the definitions have different signatures:
>
> JVM_ENTRY_NO_ENV(jlong, jfr_register_stack_filter(JNIEnv* env, jclass jvm, jobjectArray classes, jobjectArray methods))
> return JfrStackFilterRegistry::add(classes, methods, thread);
> JVM_END
>
> JVM_ENTRY_NO_ENV(void, jfr_unregister_stack_filter(JNIEnv* env, jclass jvm, jlong id))
> JfrStackFilterRegistry::remove(id);
> JVM_END
>
>
> This fixes the declarations to match the definitions.
>
> The issue was detected attempting a 32-bit Windows built. Unclear why our main toolchains have not complained about this.
>
> Testing:
> - tiers 1-3 (sanity)
> - GHA
Thumbs up. That's quite the parameter mismatch for our main compilers to miss.
-------------
Marked as reviewed by dcubed (Reviewer).
PR Review: https://git.openjdk.org/jdk/pull/18733#pullrequestreview-1999266330
More information about the hotspot-jfr-dev
mailing list