8390866: [Valhalla] revisit array load profiling - #32483
Conversation
|
👋 Welcome back roland! A progress list of the required criteria for merging this PR into |
|
❗ This change is not yet ready to be integrated. |
|
/contributor add @galderz |
|
/template append |
|
@rwestrel |
|
The total number of required reviews for this PR has been set to 2 based on the presence of this label: |
|
@rwestrel |
|
@rwestrel The pull request template has been appended to the pull request body |
|
hi @rwestrel , could you pull s390x-port changes from here : offamitkumar@3181a1b |
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
Issue
Contributors
<galder@openjdk.org>Reviewing
Using
gitCheckout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/32483/head:pull/32483$ git checkout pull/32483Update a local copy of the PR:
$ git checkout pull/32483$ git pull https://git.openjdk.org/jdk.git pull/32483/headUsing Skara CLI tools
Checkout this PR locally:
$ git pr checkout 32483View PR using the GUI difftool:
$ git pr show -t 32483Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/32483.diff
Using Webrev
Link to Webrev Comment