Integrated: 8358578: Small -XX:NMethodSizeLimit triggers "not in CodeBuffer memory" assert in C1
Manuel Hässig
mhaessig at openjdk.org
Fri Jun 20 01:36:41 UTC 2025
On Wed, 18 Jun 2025 14:07:29 GMT, Manuel Hässig <mhaessig at openjdk.org> wrote:
> Running `java -XX:NMethodSizeLimit=100 -version` triggers an assert because the lower limit of the debug flag `NMethodSizeLimit` is too low.
>
> `NMethodSizeLimit` corresponds more or less directly to the C1 code buffer size. It was added as a debug flag in 2005 to make it easier to stress the code paths related to the buffer size. Nowadays, it is not used for any stressing, but it has caused a bunch of bugs ([JDK-8316653](https://bugs.openjdk.org/browse/JDK-8316653), [JDK-8318817](https://bugs.openjdk.org/browse/JDK-8318817), [JDK-8320682](https://bugs.openjdk.org/browse/JDK-8320682)). Therefore, this PR removes the debug flag `NMethodSizeLimit` and converts it to a constant.
>
> Because this removes the code causing the error, this bug does not have a regression test (in fact, it removes regression tests).
>
> # Testing
>
> - [x] [Github Actions](https://github.com/mhaessig/jdk/actions/runs/15735062162)
> - [ ] tier1 through tier3 plus Oracle internal testing on all Oracle supported platforms
This pull request has now been integrated.
Changeset: a6464b74
Author: Manuel Hässig <mhaessig at openjdk.org>
Committer: SendaoYan <syan at openjdk.org>
URL: https://git.openjdk.org/jdk/commit/a6464b74a8c9b97653b292c18f5604d4d030a9cb
Stats: 55 lines in 6 files changed: 0 ins; 48 del; 7 mod
8358578: Small -XX:NMethodSizeLimit triggers "not in CodeBuffer memory" assert in C1
Reviewed-by: kvn, syan, thartmann
-------------
PR: https://git.openjdk.org/jdk/pull/25876
More information about the hotspot-compiler-dev
mailing list