8377670: [lworld] RO adapter signature should not scalarize inline receiver in CompiledEntrySignature::initialize_from_fingerprint()#2185
Conversation
|
👋 Welcome back dfenacci! A progress list of the required criteria for merging this PR into |
|
@dafedafe This change now passes all automated pre-integration checks. ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details. After integration, the commit message for the final commit will be: You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed. At the time when this comment was updated there had been 113 new commits pushed to the
As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details. ➡️ To integrate this PR with the above commit message to the |
…_fingerprint() looks broken" This reverts commit 1297d87.
Webrevs
|
marc-chevalier
left a comment
There was a problem hiding this comment.
There is something I don't understand, but I'm not sure what, so I'll throw things, and you tell me when I stop making sense:
_sig_cchas all the value types exploded, each starting withT_METADATAand ending inT_VOID_sig_cc_rois basically the same, but if the receiver is a value type, it must beT_OBJECT, but the other argumentsvalue_object_countis the current nesting depth inside scalarized argumentsskipping_inline_recvis whether we are currently inside the receiver, it is set when we meet itsT_METADATAand cleared at theT_VOID, oncevalue_object_count == 0, that is we closed all the nested inline types.
Given this, I don't understand how the code under the case T_METADATA: ensures we are adding as T_OBJECT only the receiver, and not every scalarized argument when _has_inline_recv is true.
Should we rename the PR/issue to be more descriptive?
If I get your question right, I think the missing point is that the receiver is the first argument (for non‑static methods), and the fingerprint should preserve that order, so the first I hope this makes sense somehow...
Good idea! Renaming... |
|
if (!skipping_inline_recv) {
if (_has_inline_recv && value_object_count == 0) {so, at the beginning of the receiver scalarized type. At the end in if (!skipping_inline_recv) {
SigEntry::add_entry(_sig_cc_ro, T_VOID, nullptr, offset);
} else if (value_object_count == 0) {
skipping_inline_recv = false;
}We set it back to |
Of course! Well spotted @marc-chevalier! Thanks! (and I've checked it so many times 😆) |
|
It's interesting tests weren't failing with that. Maybe one can add asserts... But I don't see which wouldn't be quite expensive. We could check that after the first argument, if it's a receiver, both the But thanks for fixing anyway. And happy to see I'm not crazy. |
Maybe something like this could work but, as you say, it looks a bit specific (and relies on the just introduced flag as well). |
|
That's an idea. I'm not sure it's very useful. Also the |
|
Thanks for your reviews @marc-chevalier @TobiHartmann. |
|
/integrate |
|
Going to push as commit 357956b.
Your commit was automatically rebased without conflicts. |
CompiledEntrySignature::initialize_from_fingerprint()was building_sig_ccand_sig_cc_rothe same way, but for virtual methods with an inline‑type receiver they must differ:_sig_ccshould include the receiver’s scalarized fields, while_sig_cc_roshould represent the receiver as a singleT_OBJECT.This change fixes
_sig_cc_roconstruction so that when the receiver is an inline type, its fields are skipped and a single object entry is emitted instead.It also adds asserts for
_sig_cc_roas a regression test proved to be hard to isolate and the asserts trigger immediately with any test if the RO signature is wrong.Tests:
Progress
Issue
Reviewers
Reviewing
Using
gitCheckout this PR locally:
$ git fetch https://git.openjdk.org/valhalla.git pull/2185/head:pull/2185$ git checkout pull/2185Update a local copy of the PR:
$ git checkout pull/2185$ git pull https://git.openjdk.org/valhalla.git pull/2185/headUsing Skara CLI tools
Checkout this PR locally:
$ git pr checkout 2185View PR using the GUI difftool:
$ git pr show -t 2185Using diff file
Download this PR as a diff file:
https://git.openjdk.org/valhalla/pull/2185.diff
Using Webrev
Link to Webrev Comment