RFR: 8357396: Refactor nmethod::make_not_entrant to use Enum instead of "const char*"

Aleksey Shipilev shade at openjdk.org
Fri May 23 09:01:56 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.

I added this argument to `make_not_entrant` recently in [JDK-8351640](https://bugs.openjdk.org/browse/JDK-8351640) -- mostly to print it in `PrintCompilation` logs. Putting enum might be fine, but it _has to_ maintain the same level of human readability. Do not just print `made not entrant: 42`.

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

Changes requested by shade (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/25338#pullrequestreview-2863731885


More information about the graal-dev mailing list