RFR: 8326205: Grouping frequently called C2 nmethods in CodeCache [v6]

Chad Rakoczy duke at openjdk.org
Tue Jan 27 23:34:26 UTC 2026


On Tue, 20 Jan 2026 10:03:39 GMT, George Wort <duke at openjdk.org> wrote:

> Won't the GC only remove an nmethod if it's inaccessible rather than it just being cold though? Or does the GC sweep methods that haven't been called for a while?

The GC should remove nmethods even if they are still accessible. There is a check to determine if an nmethod should be removed based on the `is_cold` heuristic ([link](https://github.com/openjdk/jdk/blob/fa1b1d677ac492dfdd3110b9303a4c2b009046c8/src/hotspot/share/code/nmethod.cpp#L2736-L2741))

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

PR Comment: https://git.openjdk.org/jdk/pull/27858#issuecomment-3808110703


More information about the hotspot-compiler-dev mailing list