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

Vladimir Kozlov kvn at openjdk.java.net
Tue May 18 23:23:41 UTC 2021


On Mon, 17 May 2021 07:20:18 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:
> 
>   fix crash problem

There is no explanation in JDK-8265129 for what code you implementing intrinsic (except pseudo code in comments in library_call.cpp). The method `getClassId` is declared native in JFR code:
https://github.com/openjdk/jdk/blob/master/src/jdk.jfr/share/classes/jdk/jfr/internal/JVM.java#L134
but I had hard time to find native implementation for it or for `getClassIdNonIntrinsic` method (I used `grep -i getClassIdNonIntrinsic -r src/`). I eventually found this code:
https://github.com/openjdk/jdk/blob/master/src/hotspot/share/jfr/recorder/checkpoint/types/traceid/jfrTraceId.cpp#L178
which seems is not what is implemented here.

On other hand if you have already native implementation I think we will not benefit much from its intrinsics - you save only only call. Based on complexity of your current changes I would prefer to simple remove current intrinsic code in C1 and C2 which does not work anyway, as you said. And let JFR use native implementation.

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

Changes requested by kvn (Reviewer).

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


More information about the hotspot-compiler-dev mailing list