RFR: 8265129: Add intrinsic support for JVM.getClassId [v10]

Markus Grönlund mgronlun at openjdk.java.net
Fri May 21 11:45:38 UTC 2021


On Fri, 21 May 2021 11:10:55 GMT, Denghui Dong <ddong at openjdk.org> wrote:

>> 8265129: Add intrinsic support for JVM.getClassId
>
> Denghui Dong has updated the pull request incrementally with one additional commit since the last revision:
> 
>   update

src/hotspot/share/jfr/jfr.cpp line 115:

> 113: }
> 114: 
> 115: JRT_LEAF(void, Jfr::trace_id_load_barrier(Klass * klass))

please declare as const, as in Jfr::trace_id_load_barrier(const Klass* klass);"

src/hotspot/share/jfr/jfr.hpp line 58:

> 56:   static void include_thread(Thread* thread);
> 57: 
> 58:   // get_class_id intrinsic support

"Klass" needs a fwd declaration.

src/hotspot/share/jfr/jfr.hpp line 59:

> 57: 
> 58:   // get_class_id intrinsic support
> 59:   static void trace_id_load_barrier(Klass* klass);

I think we can make this general, because it is not necessarily specialized for the intrinsic use. Can we rename this to "get_class_id(const Klass* klass): instead? Then we can remove the comment // get_class_id intrinsic support., thanks

src/hotspot/share/opto/library_call.cpp line 32:

> 30: #include "compiler/compileLog.hpp"
> 31: #include "gc/shared/barrierSet.hpp"
> 32: #if INCLUDE_JFR

It is custom to put the conditional includes at the end, not inlined (please see other files for conditional includes). Thanks.

-------------

PR: https://git.openjdk.java.net/jdk/pull/3470


More information about the hotspot-compiler-dev mailing list