Skip to content

8390866: [Valhalla] revisit array load profiling - #32483

Open
rwestrel wants to merge 58 commits into
openjdk:masterfrom
rwestrel:JDK-8390866
Open

8390866: [Valhalla] revisit array load profiling#32483
rwestrel wants to merge 58 commits into
openjdk:masterfrom
rwestrel:JDK-8390866

Conversation

@rwestrel

@rwestrel rwestrel commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

Profile data at an aaload contains a single array type whether it's
flat or not (or no array at all if the profile is polluted). The main
goal when that aaload profiling was added was to mitigate regressions
for non flat array accesses. Given how expensive it is to load from an
unknown array, to have flat array loads perform well, it makes sense
to collect more than one array type at an aaload a bit like the way
hotspot collects more than one receiver type at a virtual call.

This PR changes the layout of the profile data collected for aaloads,
the profile collection code in the interpreter and c1 and code
generation in c2 to leverage the new profile data.

I refactored the profile collection for virtual calls and extracted
the data layout and profile collection to reuse it for aaload. At this
point, this implies that aaload and virtual/interface call have the
same limitation on the number of type entries (2 by default). That
limitation could likely be removed with a bit more work.

For a non flat access, the array type in profile data at an aaload is
unlikely to be leveraged by c2. So instead of collecting array types
whether the access is flat or not, with this patch, array types are
only collected for flat arrays. This, I believe, makes better use of
the limited number of array type slots that are available.

I also refactored the aaload code in c2 in its own class to try to
keep things clearer.
/cc hotspot-compiler



Progress

  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue
  • Change must be properly reviewed (2 reviews required, with at least 1 Reviewer, 1 Author)

Issue

  • JDK-8390866: [Valhalla] revisit array load profiling (Enhancement - P3)

Contributors

  • Galder Zamarreño <galder@openjdk.org>

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/32483/head:pull/32483
$ git checkout pull/32483

Update a local copy of the PR:
$ git checkout pull/32483
$ git pull https://git.openjdk.org/jdk.git pull/32483/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 32483

View PR using the GUI difftool:
$ git pr show -t 32483

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/32483.diff

Using Webrev

Link to Webrev Comment

@bridgekeeper

bridgekeeper Bot commented Aug 21, 2026

Copy link
Copy Markdown

👋 Welcome back roland! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

@openjdk

openjdk Bot commented Aug 21, 2026

Copy link
Copy Markdown

❗ This change is not yet ready to be integrated.
See the Progress checklist in the description for automated requirements.

@rwestrel

Copy link
Copy Markdown
Contributor Author

/contributor add @galderz

@rwestrel

Copy link
Copy Markdown
Contributor Author

/template append

@openjdk openjdk Bot added the hotspot-compiler hotspot-compiler-dev@openjdk.org label Aug 21, 2026
@openjdk

openjdk Bot commented Aug 21, 2026

Copy link
Copy Markdown

@rwestrel
The hotspot-compiler label was successfully added.

@openjdk

openjdk Bot commented Aug 21, 2026

Copy link
Copy Markdown

The total number of required reviews for this PR has been set to 2 based on the presence of this label: hotspot-compiler. This can be overridden with the /reviewers command.

@openjdk

openjdk Bot commented Aug 21, 2026

Copy link
Copy Markdown

@rwestrel
Contributor Galder Zamarreño <galder@openjdk.org> successfully added.

@openjdk

openjdk Bot commented Aug 21, 2026

Copy link
Copy Markdown

@rwestrel The pull request template has been appended to the pull request body

@openjdk openjdk Bot added the hotspot hotspot-dev@openjdk.org label Aug 21, 2026
@openjdk

openjdk Bot commented Aug 21, 2026

Copy link
Copy Markdown

@rwestrel The following label will be automatically applied to this pull request:

  • hotspot

When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing list. If you would like to change these labels, use the /label pull request command.

@openjdk openjdk Bot added the rfr Pull request is ready for review label Aug 21, 2026
@mlbridge

mlbridge Bot commented Aug 21, 2026

Copy link
Copy Markdown

Webrevs

@offamitkumar

Copy link
Copy Markdown
Member

hi @rwestrel , could you pull s390x-port changes from here : offamitkumar@3181a1b

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

Labels

hotspot hotspot-dev@openjdk.org hotspot-compiler hotspot-compiler-dev@openjdk.org rfr Pull request is ready for review

Development

Successfully merging this pull request may close these issues.

3 participants