RFR: 8329332: Remove CompiledMethod and CodeBlobLayout classes [v2]
Vladimir Kozlov
kvn at openjdk.org
Wed Apr 3 17:01:10 UTC 2024
On Wed, 3 Apr 2024 15:12:31 GMT, Stefan Karlsson <stefank at openjdk.org> wrote:
>> Vladimir Kozlov has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Removed not_used state of nmethod
>
> src/hotspot/share/code/nmethod.cpp line 812:
>
>> 810: // By calling this nmethod entry barrier, it plays along and acts
>> 811: // like any other nmethod found on the stack of a thread (fewer surprises).
>> 812: nmethod* nm = as_nmethod_or_null();
>
> Calling as_nmethod_or_null() from within functions in the nmethod class is suspicious. Shouldn't all such usages be removed? (I'm fine with doing that as a separate change)
Good catch! The code was moved from CompiledMethod where it made sense but now it is not needed. Here the change I will make:
// like any other nmethod found on the stack of a thread (fewer surprises).
- nmethod* nm = as_nmethod_or_null();
- if (nm != nullptr && bs_nm->is_armed(nm)) {
+ nmethod* nm = this;
+ if (bs_nm->is_armed(nm)) {
bool alive = bs_nm->nmethod_entry_barrier(nm);
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/18554#discussion_r1550118967
More information about the serviceability-dev
mailing list