RFR: 8325467: Support methods with many arguments in C2 [v17]

Daniel Lundén dlunden at openjdk.org
Mon Jun 23 13:28:49 UTC 2025


On Fri, 20 Jun 2025 10:14:09 GMT, Emanuel Peter <epeter at openjdk.org> wrote:

>> I assume you mean resource allocate in the default `Thread::current()->resource_area()`? The existing resource marks are often far away, leading to unnecessary memory consumption. Trying to narrow the existing resource marks does lead to conflicts. I added a motivation to the description in `compile.hpp`!
>
> And these conflicts cannot be resolved? Can you bring an example that is too much effort?

One example is the `ResourceMark` at the top of `PhaseCFG::sched_call` (added in this changeset) which conflicts with the `ResourceMark` at the top of `PhaseCFG::global_code_motion`. Specifically, the conflict is at the `VectorSet` named `visited` in `PhaseCFG::global_code_motion` and named `next_call` in `PhaseCFG::sched_call`. I don't see a trivial resolution, but I'm open to suggestions. There are loops in between the resource marks, so memory consumption will potentially increase significantly if we simply remove the inner resource mark.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/20404#discussion_r2161635554


More information about the hotspot-compiler-dev mailing list