RFR: 8265180: JvmtiCompiledMethodLoadEvent should include the stub section of nmethods

Tom Rodriguez never at openjdk.java.net
Wed Apr 14 16:31:43 UTC 2021


On Wed, 14 Apr 2021 07:51:13 GMT, Stefan Karlsson <stefank at openjdk.org> wrote:

>> 8265180: JvmtiCompiledMethodLoadEvent should include the stub section of nmethods
>
> src/hotspot/share/prims/jvmtiExport.cpp line 1111:
> 
>> 1109:           : JvmtiMethodEventMark(thread,methodHandle(thread, nm->method())) {
>> 1110:     _code_data = nm->code_begin();
>> 1111:     _code_size = (jint)pointer_delta(nm->code_end(), nm->code_begin(), sizeof(char));
> 
> Could CodeBlob::code_size be used instead?:
> 
>   int code_size() const                          { return           code_end()       -           code_begin();       }

It certainly could.  I was just following the pattern used by JvmtiExport::post_dynamic_code_generated but maybe it's better to use the real nmethod API.  I'll change it.

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

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


More information about the serviceability-dev mailing list