Skip to content

Commit

Permalink
Enable VirtualThread JVMTI natives by default
Browse files Browse the repository at this point in the history
The VirtualThread natives are needed to keep a list of every live virtual
thread for JVMTI. Since JVMTI agents can be attached at any time, enable
these natives by default.

Issue: eclipse-openj9/openj9#15183

Co-authored-by: Babneet Singh <sbabneet@ca.ibm.com>
Signed-off-by: Eric Yang <eric.yang@ibm.com>
  • Loading branch information
babsingh authored and EricYangIBM committed Aug 22, 2022
1 parent a32b00d commit f712548
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/java.base/share/classes/java/lang/VirtualThread.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/*
* ===========================================================================
* (c) Copyright IBM Corp. 2022, 2022 All Rights Reserved
* ===========================================================================
*/
package java.lang;

import java.security.AccessController;
Expand Down Expand Up @@ -1008,6 +1013,7 @@ private void setCarrierThread(Thread carrier) {
private static native void registerNatives();
static {
registerNatives();
notifyJvmtiEvents = true;
}

/**
Expand Down

0 comments on commit f712548

Please sign in to comment.