Skip to content

Detect cold CallTarget invalidation and reset its profile; Limit number of recompilations within a time period #11610

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

JohnTortugo
Copy link
Contributor

Closes: #11045

Please review this patch that modifies Truffle to:

  1. Reset a CallTarget's profile when the nmethod associated with it was invalidated by HotSpot because the Code Cache's method flushing heuristics deemed the nmethod to be cold.

  2. Limit the number of compilations that a CallTarget can have within a time period. This doesn't change the current behavior, instead it just makes the constraint more flexible. I added a new parameter, MaximumCompilationsWindow, that the user can set to specify a time window within which the number of compilations will be limited (currently the window is whole duration of application execution).

Tests:

  • OSX AArch64 with LabsJDK "tip" using "mx gate"
  • Linux x65 with LabsJDK "tip" using "mx gate"
  • GitHub Actions
  • We have been running an internal system with similar changes for months and we didn't notice any regression.

@oracle-contributor-agreement oracle-contributor-agreement bot added the OCA Verified All contributors have signed the Oracle Contributor Agreement. label Jul 12, 2025
@JohnTortugo JohnTortugo changed the title Detect cold method invalidation & reprofile. Limit on number of compilations Detect cold CallTarget invalidation and reset its profile; Limit number of recompilations within a time period Jul 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
OCA Verified All contributors have signed the Oracle Contributor Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Truffle OptimizedCallTarget profile counters do not decay
1 participant