RFR: 8330064: JFR: Incorrect function declarations for register/unregister_stack_filter
David Holmes
dholmes at openjdk.org
Thu Apr 11 13:13:43 UTC 2024
On Thu, 11 Apr 2024 11:56:27 GMT, Markus Grönlund <mgronlun 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.
Thanks for the review @mgronlun
-------------
PR Comment: https://git.openjdk.org/jdk/pull/18733#issuecomment-2049663606
More information about the hotspot-jfr-dev
mailing list