-
Notifications
You must be signed in to change notification settings - Fork 6.1k
8360707: Globally enumerate all blobs, stubs and entries #26004
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
Conversation
👋 Welcome back adinn! A progress list of the required criteria for merging this PR into |
@adinn 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 35 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 |
Webrevs
|
@adinn I got one test failure on s390:
I didn't hs_err even in full verbose. But attaching overall run in txt file: |
@offamitkumar Thanks for testing. I'm looking into the issue and will get back to you. @TheRealMDoerr @offamitkumar @RealFYang Would you be able to check this on ppc/riscv to ensure it builds (cross-compile is ok) and passes (at least) tier1? Thanks for whatever help you can provide. |
hotspot tier1 has passed on PPC64. Thanks for the ping! |
@vnkozlov My fastdebug build has passed the following test suites on Linux/aarch64 and Linux/x86: tier1 Could you review the PR and maybe run it through internal testing? |
@TheRealMDoerr Thanks for testing! |
src/hotspot/share/opto/compile.cpp
Outdated
@@ -973,7 +973,9 @@ Compile::Compile(ciEnv* ci_env, | |||
|
|||
// try to reuse an existing stub | |||
{ | |||
CodeBlob* blob = AOTCodeCache::load_code_blob(AOTCodeEntry::C2Blob, _stub_id, stub_name); | |||
StubId stub_id = static_cast<StubId>(_stub_id); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
static_cast
can be avoided if _stub_id
type is changed from int
to StubId
. And there is a similar static_cast
in output.cpp as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this conversion to int was done to avoid a problem with include dependencies. It is certainly not an issue now that StubId is statically generated in a header already included in all affected files. I have pushed a fix to remove the int casts and use StubId instead.
Looks good to me. I have just a minor comment. Thanks for these changes. This should help in simplifying the AOTCodeAddressTable. |
This looks fine. Please merge latest jdk so I can do additional testing with |
Done. |
Hi @adinn, could you add these changes fixing test failure on s390: diff --git a/src/hotspot/cpu/s390/stubGenerator_s390.cpp b/src/hotspot/cpu/s390/stubGenerator_s390.cpp
index 10e5abe9ce8..687fb764bd8 100644
--- a/src/hotspot/cpu/s390/stubGenerator_s390.cpp
+++ b/src/hotspot/cpu/s390/stubGenerator_s390.cpp
@@ -164,15 +164,16 @@ class StubGenerator: public StubCodeGenerator {
// Save non-volatile registers to ABI of caller frame.
BLOCK_COMMENT("save registers, push frame {");
- __ z_stmg(Z_R6, Z_R14, 16, Z_SP);
- __ z_std(Z_F8, 96, Z_SP);
- __ z_std(Z_F9, 104, Z_SP);
- __ z_std(Z_F10, 112, Z_SP);
- __ z_std(Z_F11, 120, Z_SP);
- __ z_std(Z_F12, 128, Z_SP);
- __ z_std(Z_F13, 136, Z_SP);
- __ z_std(Z_F14, 144, Z_SP);
- __ z_std(Z_F15, 152, Z_SP);
+ __ save_return_pc();
+ __ z_stmg(Z_R6, Z_R13, 16, Z_SP);
+ __ z_std(Z_F8, 88, Z_SP);
+ __ z_std(Z_F9, 96, Z_SP);
+ __ z_std(Z_F10, 104, Z_SP);
+ __ z_std(Z_F11, 112, Z_SP);
+ __ z_std(Z_F12, 120, Z_SP);
+ __ z_std(Z_F13, 128, Z_SP);
+ __ z_std(Z_F14, 136, Z_SP);
+ __ z_std(Z_F15, 144, Z_SP);
//
// Push ENTRY_FRAME including arguments:
@@ -337,15 +338,16 @@ class StubGenerator: public StubCodeGenerator {
__ z_lg(r_arg_result_type, result_type_offset, r_entryframe_fp);
// Restore non-volatiles.
- __ z_lmg(Z_R6, Z_R14, 16, Z_SP);
- __ z_ld(Z_F8, 96, Z_SP);
- __ z_ld(Z_F9, 104, Z_SP);
- __ z_ld(Z_F10, 112, Z_SP);
- __ z_ld(Z_F11, 120, Z_SP);
- __ z_ld(Z_F12, 128, Z_SP);
- __ z_ld(Z_F13, 136, Z_SP);
- __ z_ld(Z_F14, 144, Z_SP);
- __ z_ld(Z_F15, 152, Z_SP);
+ __ restore_return_pc();
+ __ z_lmg(Z_R6, Z_R13, 16, Z_SP);
+ __ z_ld(Z_F8, 88, Z_SP);
+ __ z_ld(Z_F9, 96, Z_SP);
+ __ z_ld(Z_F10, 104, Z_SP);
+ __ z_ld(Z_F11, 112, Z_SP);
+ __ z_ld(Z_F12, 120, Z_SP);
+ __ z_ld(Z_F13, 128, Z_SP);
+ __ z_ld(Z_F14, 136, Z_SP);
+ __ z_ld(Z_F15, 144, Z_SP);
BLOCK_COMMENT("} restore");
// |
I think these need to be included in a separate PR. Your patch fixes a problem that is independent from the current change (it was already there but only manifested after this change). Separating these issues is important because we may decide to backport your patch (say, to jdk25) and the changes in this PR definitely should not be backported. It also matters because it avoids confusing maintainers over the purpose and scope of these two sets of changes -- this one is meant to be a removal of technical debt with no visible changes to functionality, whereas your patch is remedying a functional defect. So, please raise a new JIRA indicating what problem the above patch fixes and then create a new PR for the patch. |
Thank you @adinn for merge. Unfortunately I was not able to enable Stubs caching for testing. I submitted testing with AOTStubCaching disabled as in current code. |
I found the cause of my local testing failure. I built with ubsan and hit JDK-8360942 which I am working on. After applying the fix the test passed. Here other changes you may consider to include because they fix stack overflow stub generation:
|
So far testing is fine. I see only failures caused by known AOT stubs caching bug: JDK-8357593 |
…ial stubs to use
@vnkozlov I've pushed the two changes you provided (on the assumption that we are not going to need to backport them to jdk25). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My testing passed without new failures
/integrate |
@erikj79 This PR seems to be stuck at the integrate stage -- any ideas why? |
Going to push as commit b1fa1ec.
Your commit was automatically rebased without conflicts. |
@erikj79 Dunno what you did but that was quick ;-) |
After this integration we are seeing crashes on Linux x64 and Aarch64: assert(idx2 >= 0 && idx2 >= idx1) failed: bad blob ids first -1 and second -1 |
@dholmes-ora Can you provide more detail as to what is failing? Is this a specific build? |
@dholmes-ora It's ok I have identified what is going wrong. The problem appears to occur when either C1 or C2 is omitted from the build. I have raised JDK-8361844 and have a PR ready which I am checking against tier1 (with a build that omits C1). |
Use the blob, stub and entry declarations to generate a single global enumeration for all blobs, likewise for all stubs and all entries. Modify stub generators in shared runtime, c1 runtime, c2 runtime and stub generator subsystems and their clients to use those enumerations consistently.
Progress
Issue
Reviewers
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/26004/head:pull/26004
$ git checkout pull/26004
Update a local copy of the PR:
$ git checkout pull/26004
$ git pull https://git.openjdk.org/jdk.git pull/26004/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 26004
View PR using the GUI difftool:
$ git pr show -t 26004
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/26004.diff
Using Webrev
Link to Webrev Comment