RFR: 8357600: Patch nmethod flushing message to include more details

Cesar Soares Lucas cslucas at openjdk.org
Fri May 23 18:26:51 UTC 2025


On Fri, 23 May 2025 09:29:24 GMT, Aleksey Shipilev <shade at openjdk.org> wrote:

>> Please review this patch for adding more details to nmethod flushing message. These details are particularly important when investigating interaction of JVMCI compiled code and code cache flushing heuristics.
>> 
>> Tested on Linux x64 with JTREG tier1-3 using fastdebug and release builds.
>
> A bit concerned about performance impact of this logging, especially since we are under `CodeCache_lock`. So I would suggest two improvements:
> 
> 1. Maybe move logging before acquiring `CodeCache_lock`? Not sure if it is safe for various `CodeCache::*` getters.
> 
> 2. Predicate the argument preparation/logging with:
> 
> ``` 
>   LogTarget(Debug, codecache) lt;
>   if (lt.is_enabled()) {
>     ...

Thank you for the comments @shipilev . TBH I totally overlooked that lock there and I didn't know about the `LogTarget::is_enabled()`

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

PR Comment: https://git.openjdk.org/jdk/pull/25402#issuecomment-2905412473


More information about the hotspot-compiler-dev mailing list