- 
                Notifications
    
You must be signed in to change notification settings  - Fork 6.1k
 
8348203: [JVMCI] Make eager JVMCI initialization observable in the debugger #23219
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
8348203: [JVMCI] Make eager JVMCI initialization observable in the debugger #23219
Conversation
| 
          
 👋 Welcome back simonis! A progress list of the required criteria for merging this PR into   | 
    
| 
           @simonis 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 111 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   | 
    
| 
           /label compiler  | 
    
| 
          
 @simonis   | 
    
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.
It is not at all obvious what other impacts moving this could have. Is it really appropriate to enter the live phase and claim the VM is initialized if we may error out if JVMCI initialization fails after that point.
What prevents you from doing the debugging you want to do? And why are you "debugging" Graal compiler initialization anyway?
          
 Yes, because that's the normal case. Usually, JVMCI gets initialized lazily, before its first usage which is much after VMInit was posted. We are looking at a special case here because this patch only moves eager JVMCI initialization (which happens with  
 Very simple - the debugger is not starting before it gets the VMInit event. 
 Is this a serious question? Because I'm hunting a bug in eager JVMCI initialization.  | 
    
          
 Okay that alleviates my concern. I will leave it for JVMCI folk to approve. 
 Yes a serious question but perhaps poorly framed. I was trying to gauge whether it makes sense to change the way the VM is doing this to address the debugging problem that you ran into i.e was this a general issue to be solved, or a one-of special case that should be handled by a local change instead.  | 
    
| 
           Since this is the non-default mode of execution (JVMCI initialization is normally lazy as Volker pointed out), I think this change is fine.  | 
    
          
 Got it. I obviously handled this by a local change first. But I think the JVMCI compiler initialization executes quite some Java code and I think it is beneficial if this code executions is observable by Java agents (which don't include only the debugger).  | 
    
| 
           /integrate  | 
    
| 
          
 Going to push as commit 76f792b. 
 Your commit was automatically rebased without conflicts.  | 
    
I realized that I can't debug (i.e. with a Java debugger) the Graal compiler initialization if it happens eagerly (e.g. with
EagerJVMCI,JVMCIPrintProperties,JVMCILibDumpJNIConfig). Not that this is something I need every day, but I think it can easily be fixed by moving the early initializing a little further down, right afterJvmtiExport::post_vm_initialized():Progress
Issue
Reviewers
Reviewing
Using
gitCheckout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/23219/head:pull/23219$ git checkout pull/23219Update a local copy of the PR:
$ git checkout pull/23219$ git pull https://git.openjdk.org/jdk.git pull/23219/headUsing Skara CLI tools
Checkout this PR locally:
$ git pr checkout 23219View PR using the GUI difftool:
$ git pr show -t 23219Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/23219.diff
Using Webrev
Link to Webrev Comment