RFR: 8357396: Refactor nmethod::make_not_entrant to use Enum instead of "const char*"
Marc Chevalier
mchevalier at openjdk.org
Fri May 23 07:53:52 UTC 2025
On Tue, 20 May 2025 22:08:18 GMT, Cesar Soares Lucas <cslucas at openjdk.org> wrote:
> Please review this refactor to transform the reasons for making an nmethod not entrant from `const char*` into enum values.
>
> Tested on Linux x64 with JTREG tier1-3 in fastdebug and release mode.
src/hotspot/share/jvmci/jvmciCompilerToVM.cpp line 1388:
> 1386: C2V_VMENTRY(void, invalidateHotSpotNmethod, (JNIEnv* env, jobject, jobject hs_nmethod, jboolean deoptimize))
> 1387: JVMCIObject nmethod_mirror = JVMCIENV->wrap(hs_nmethod);
> 1388: JVMCIENV->invalidate_nmethod_mirror(nmethod_mirror, deoptimize, nmethod::NMethodChangeReason::JVMCI_invalidate_nmethod, JVMCI_CHECK);
Agree with @mhaessig's comment. If further discussion turns out to prefer the current `enum` over an `enum class`, then this `NMethodChangeReason::` is useless.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/25338#discussion_r2104027069
More information about the hotspot-dev
mailing list