-
Notifications
You must be signed in to change notification settings - Fork 6.1k
8329982: compiler/jvmci/jdk.vm.ci.code.test/src/jdk/vm/ci/code/test/SimpleDebugInfoTest.java failed assert(oopDesc::is_oop_or_null(val)) failed: bad oop found #19035
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 dnsimon! A progress list of the required criteria for merging this PR into |
|
@dougxc 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 59 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
|
| // We would like to be strict about the nmethod entry barrier but there are various test | ||
| // configurations which generate assembly without being a full compiler. So for now we enforce | ||
| // that JIT compiled methods must have an nmethod barrier. | ||
| bool install_default = JVMCIENV->get_HotSpotNmethod_isDefault(installed_code) != 0; |
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.
This line is no longer needed.
|
In the long term I'm not sure it's worth trying to maintain these assembler tests. The barrier verification code is very weak and on aarch64 it's slightly complicated so we're barely checking that it really matches. I guess this is good enough until we get further problems. I think you can simplify some other logic that deals with the optionality of the barrier. Start with removing JVMCINMethodData::has_entry_barrier and maybe update some of the comments to reflect that it's always emitted. And places that check _nmethod_entry_patch_offset for -1 can be removed or weakened. |
I agree. I had to push more changes now to remove tests that expect to be able to install 0 length code (which obviously fail the nmethod barrier verification). These tests provided stop gap coverage in the early days of JVMCI but now test functionality where breakage will clearly show up in higher layers (such as Graal). What's more, expanding the assembler support in JVMCI is redundant with the fully fledged assembler in Graal.
I've done that now. Please let me know if you can spot any other vestiges of the optional support. |
|
Wouldn't it be useful for the JVMCI implementation to provide the nmethod entry barrier code? I could be wrong, but I think all the JIT compiler needs to know is how big it is, so it can reserve the space (NOPs would do), then when the code is installed as an nmethod, memcpy it over (if it's static), or use the MacroAssembler if it's not. |
That's an interesting idea and would be great if possible. However, given that Graal puts the slow path out-of-line, we'd be stuck with the problem of patching in the jump target. Also, JVMCI would have to conservatively emit a long-form jump instruction to the slow path. |
|
It would be super nice if we could figure out a clean way to share canned snippets of assembly from HotSpot back through JVMCI. There are lots of potential complexities though: register usage, the jcc erratum, relocations, fast/slow splits. The emit function could be called from the Graal assembler so that the sizing and alignment can be properly handled. HotSpot relocations could be translated in some fashion and maybe labels could be handled as well. The nmethod entry barrier fast path emission could probably be handled fairly cleanly since it's mostly a straightline snippet with a conditional branch at the end. It's just unclear if building that machinery is more complicated than maintaining and checking a clone of a small piece of assembly. The TestAssembler is a dubious piece of code given the complexity of emitting real nmethods. It doesn't even support the complex return sequence being used these days. |
The next time there's a TestAssembler failure due to a change in nmethod invariants, I will remove it completely. There is sufficient coverage now in Graal tests that it no longer offers sufficient value. |
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.
Sounds and looks good.
|
Thanks for the feedback and reviews. /integrate |
|
Going to push as commit b20fa7b.
Your commit was automatically rebased without conflicts. |
Happened again: https://bugs.openjdk.org/browse/JDK-8336242 I'll put up a PR to remove the problematic test. |
This PR adds the missing nmethod entry barriers to JVMCI hand assembled tests.
It also closes the escape hatch in jvmciCodeInstaller.cpp that allowed JVMCI code to be installed without nmethod entry barriers.
Progress
Issue
Reviewers
Reviewing
Using
gitCheckout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/19035/head:pull/19035$ git checkout pull/19035Update a local copy of the PR:
$ git checkout pull/19035$ git pull https://git.openjdk.org/jdk.git pull/19035/headUsing Skara CLI tools
Checkout this PR locally:
$ git pr checkout 19035View PR using the GUI difftool:
$ git pr show -t 19035Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/19035.diff
Webrev
Link to Webrev Comment