Skip to content

Conversation

@ymanton
Copy link
Member

@ymanton ymanton commented Oct 28, 2025

The commits in this PR enable the JIT compiler's fan-in heuristics at >warm opt levels and reduce the method size threshold from 50 bytecodes to 30. Methods that are smaller than the threshold are not considered by the fan-in heuristic. By reducing the threshold we allow more methods to be considered by the heuristic, which tries to prevent inlining of methods that are called from a large number of call sites (i.e. that have a high fan-in). This change shows positive effects on certain benchmarks that have small methods that are called from thousands of call sites.

The patches also add the TR_disableFanInAtHighOpt env var which can be set to prevent the fan-in heuristic from being used at >warm.

(The method size threshold can already be controlled via the -Xjit:iprofilerFaninMethodMinSize= option.)

Allow smaller methods to be considered.

Signed-off-by: Younes Manton <[email protected]>
@ymanton
Copy link
Member Author

ymanton commented Oct 28, 2025

FYI @vijaysun-omr.

I've opened this as a draft for the time being so that I can evaluate some other alternatives. Namely whether enabling fan-in at >warm is worthwhile, whether leaving the threshold size at 50 and instead removing the threshold check from one of the two places it's used in is beneficial, and so on.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant