RFR: 8238197: JFR: Rework setting and getting EventHandler
Jaroslav Bachorik
jbachorik at openjdk.java.net
Thu Jun 10 08:50:18 UTC 2021
On Wed, 9 Jun 2021 21:29:51 GMT, Markus Grönlund <mgronlun at openjdk.org> wrote:
> Greetings,
>
> please help review this changeset which moves the setting and getting of event handlers to native to avoid allocations.
>
> Testing: jdk_jfr, stress
>
> Thanks
> Markus
src/hotspot/share/jfr/jni/jfrJavaSupport.cpp line 777:
> 775: descriptor);
> 776: return typed_field_holder != NULL ? typed_field_holder : ik->find_field(vmSymbols::eventHandler_name(),
> 777: vmSymbols::object_signature(), // untyped
When would be the event handler field untyped?
src/hotspot/share/jfr/jni/jfrJavaSupport.cpp line 811:
> 809: assert(java_lang_Class::as_Klass(h_mirror()) == field_holder, "invariant");
> 810: const oop handler_oop = JNIHandles::resolve(handler);
> 811: assert(handler_oop != NULL, "invariant");
Should this be rather
if (handler_oop == NULL) {
return false;
}
to have it consistent with the code in `get_handler_field_descriptor()`?
-------------
PR: https://git.openjdk.java.net/jdk/pull/4445
More information about the hotspot-jfr-dev
mailing list