RFR: 8330064: JFR: Incorrect function declarations for register/unregister_stack_filter
Markus Grönlund
mgronlun at openjdk.org
Thu Apr 11 11:58:41 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
Looks good. Thank you.
-------------
Marked as reviewed by mgronlun (Reviewer).
PR Review: https://git.openjdk.org/jdk/pull/18733#pullrequestreview-1994005168
More information about the hotspot-jfr-dev
mailing list