8378531: [lworld] Remove obj_at(int) from objArrayOopDesc and flatArrayOopDesc#2157
8378531: [lworld] Remove obj_at(int) from objArrayOopDesc and flatArrayOopDesc#2157xmas92 wants to merge 25 commits intoopenjdk:lworldfrom
Conversation
|
👋 Welcome back aboldtch! A progress list of the required criteria for merging this PR into |
|
@xmas92 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 1 new commit pushed to the
Please see this link for an up-to-date comparison between the source branch of this pull request and the ➡️ To integrate this PR with the above commit message to the |
Webrevs
|
|
I went through but that's too much runtime-related for me to say much. Indeed, most of the changes seems very direct. And thanks for doing that, it will be less confusing. I've used I just wonder whether we should add a warning on |
can we add |
Added a deleted function on I also added a comment and deleted this function in And finally I added |
|
Very nice, I would have been happy with just delete or comment, but why not both! Isn't |
We also have that I cannot see that we currently use I was thinking of implementing |
|
I think where it was used was removed later. I think it was used for constant folding. In case we had a constant object, we could need to query its null marker and replace a load by a constant with with |
stefank
left a comment
There was a problem hiding this comment.
I looked through the C++ code (except JVMCI) and I think this looks good. I have one question below:
fparain
left a comment
There was a problem hiding this comment.
Looks much safer and cleaner with your changes.
However, this patch touches the code of the caches of the wrapper classes. Is this being done in coordination with with JDK-8379148 and JDK-8370724 ?
Co-authored-by: Stefan Karlsson <stefan.karlsson@oracle.com>
After the latest merge the all caches area disabled from the Java code (the interim re-enabling of the Character cache for JDK-8370724 has been reverted). So this patch should not change much for that issue. As for JDK-8379148, I had not observed its existence, but I would say that this patch resolves that issue. @Arraying as the assignee of that issue, do you agree, or are there more primitive cache accesses from the VM you are looking at that this patch does not address? |
So far I've only found VM usage of the primitive cache accesses during deoptimization which (after taking a quick look) seem to be addressed in your patch. I can make 8379148 blocked by this PR, take a step back for a bit until this change is in, and then if there's anything else integrate a followup and otherwise (and likely) close 8379148. Would that be okay with you? |
Sounds good! |
…e();" This reverts commit a3926ab.
|
I reverted the JDK primitive cache changes. (So the caches are still constructed, just never used with enable preview). There were some unforeseen interactions with AOT / CDS, causing a handful of serviceability tests to fail unless ran with |
|
Thanks for the reviews. /integrate |
obj_at(int)onflatArrayOopDescshould never be called as it may fail with an out of memory error and crash. SimilarlyobjArrayOopDescshould not provide a shared interface to this member function which is only valid to call on arefArrayOopDesc.This RFE cleans up the last potentially invalid uses by using and asserting stricter types at the call sites.
Most cleanup are straight forward, however there are a few parts where some extra feedback is appreciated.
First the primitive caches (ac32b67). JDK-8369921/#1685 conditioned the use of the caches behind the
!PreviewFeatures.isEnabled()such that they are not used when running with Valhalla. However it did not do this for Character, even though both the issue and the PR mentions this Class as well, and could not find any discussion in the PR.Update: @jsikstro pointed me to JDK-8372619, I am curious to where and how we access these caches (except for
valueOf), as this change which removes the caches in Valhalla seems to run through our testing.Second the caches were still created even if they were not used. In this PR I chose to not create these caches at all if we are in preview mode. Also I am not sure if it is the case that we always trust the internal final values and do fold them, but I changed it to use
@stablechecks vs a sentinel, which I know are trusted as final. However maybe this is unnecessary, and some core library / compiler person has some input.Second is all the JVMCI changes (fe98ae0). This patch changes it so that the internal JVMCI Classes that that hotspot knows about are required to be RefArrays (this was already the assumption, but this hardens this by changing their types). And for external arrays they either throw an exception if it is an unexpected type (the case for
executeHotSpotNmethod) or useobj_at(int, TRAP)and returns with an out of memory error.Testing:
Progress
Issue
Reviewers
Reviewing
Using
gitCheckout this PR locally:
$ git fetch https://git.openjdk.org/valhalla.git pull/2157/head:pull/2157$ git checkout pull/2157Update a local copy of the PR:
$ git checkout pull/2157$ git pull https://git.openjdk.org/valhalla.git pull/2157/headUsing Skara CLI tools
Checkout this PR locally:
$ git pr checkout 2157View PR using the GUI difftool:
$ git pr show -t 2157Using diff file
Download this PR as a diff file:
https://git.openjdk.org/valhalla/pull/2157.diff
Using Webrev
Link to Webrev Comment