sun.jvm.hotspot.oops.OopUtilities Java Examples

The following examples show how to use sun.jvm.hotspot.oops.OopUtilities. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: ThreadReferenceImpl.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 6 votes vote down vote up
private int jvmtiGetThreadState() {
    // get most state bits
    int state = OopUtilities.threadOopGetThreadStatus(ref());
    // add more state bits
    if (myJavaThread != null) {
        JavaThreadState jts = myJavaThread.getThreadState();
        if (myJavaThread.isBeingExtSuspended()) {
            state |= JVMTI_THREAD_STATE_SUSPENDED;
        }
        if (jts == JavaThreadState.IN_NATIVE) {
            state |= JVMTI_THREAD_STATE_IN_NATIVE;
        }
        OSThread osThread = myJavaThread.getOSThread();
        if (osThread != null && osThread.interrupted()) {
            state |= JVMTI_THREAD_STATE_INTERRUPTED;
        }
    }
    return state;
}
 
Example #2
Source File: ThreadGroupReferenceImpl.java    From openjdk-8-source with GNU General Public License v2.0 6 votes vote down vote up
public List threads() {
    // Each element of this array is the Oop for a thread;
    // NOTE it is not the JavaThread that we need to create
    // a ThreadReferenceImpl.
    Oop[] myThreads = OopUtilities.threadGroupOopGetThreads(ref());

    ArrayList myList = new ArrayList(myThreads.length);
    for (int ii = 0; ii < myThreads.length; ii++) {
        JavaThread jt = OopUtilities.threadOopGetJavaThread(myThreads[ii]);
        if (jt != null) {
            ThreadReferenceImpl xx = (ThreadReferenceImpl)vm.threadMirror(jt);
            myList.add(xx);
        }
    }
    return myList;
}
 
Example #3
Source File: ThreadReferenceImpl.java    From openjdk-jdk8u with GNU General Public License v2.0 6 votes vote down vote up
private int jvmtiGetThreadState() {
    // get most state bits
    int state = OopUtilities.threadOopGetThreadStatus(ref());
    // add more state bits
    if (myJavaThread != null) {
        JavaThreadState jts = myJavaThread.getThreadState();
        if (myJavaThread.isBeingExtSuspended()) {
            state |= JVMTI_THREAD_STATE_SUSPENDED;
        }
        if (jts == JavaThreadState.IN_NATIVE) {
            state |= JVMTI_THREAD_STATE_IN_NATIVE;
        }
        OSThread osThread = myJavaThread.getOSThread();
        if (osThread != null && osThread.interrupted()) {
            state |= JVMTI_THREAD_STATE_INTERRUPTED;
        }
    }
    return state;
}
 
Example #4
Source File: ThreadGroupReferenceImpl.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 6 votes vote down vote up
public List threads() {
    // Each element of this array is the Oop for a thread;
    // NOTE it is not the JavaThread that we need to create
    // a ThreadReferenceImpl.
    Oop[] myThreads = OopUtilities.threadGroupOopGetThreads(ref());

    ArrayList myList = new ArrayList(myThreads.length);
    for (int ii = 0; ii < myThreads.length; ii++) {
        JavaThread jt = OopUtilities.threadOopGetJavaThread(myThreads[ii]);
        if (jt != null) {
            ThreadReferenceImpl xx = (ThreadReferenceImpl)vm.threadMirror(jt);
            myList.add(xx);
        }
    }
    return myList;
}
 
Example #5
Source File: ThreadGroupReferenceImpl.java    From jdk8u60 with GNU General Public License v2.0 6 votes vote down vote up
public List threads() {
    // Each element of this array is the Oop for a thread;
    // NOTE it is not the JavaThread that we need to create
    // a ThreadReferenceImpl.
    Oop[] myThreads = OopUtilities.threadGroupOopGetThreads(ref());

    ArrayList myList = new ArrayList(myThreads.length);
    for (int ii = 0; ii < myThreads.length; ii++) {
        JavaThread jt = OopUtilities.threadOopGetJavaThread(myThreads[ii]);
        if (jt != null) {
            ThreadReferenceImpl xx = (ThreadReferenceImpl)vm.threadMirror(jt);
            myList.add(xx);
        }
    }
    return myList;
}
 
Example #6
Source File: ThreadGroupReferenceImpl.java    From hottub with GNU General Public License v2.0 6 votes vote down vote up
public List threads() {
    // Each element of this array is the Oop for a thread;
    // NOTE it is not the JavaThread that we need to create
    // a ThreadReferenceImpl.
    Oop[] myThreads = OopUtilities.threadGroupOopGetThreads(ref());

    ArrayList myList = new ArrayList(myThreads.length);
    for (int ii = 0; ii < myThreads.length; ii++) {
        JavaThread jt = OopUtilities.threadOopGetJavaThread(myThreads[ii]);
        if (jt != null) {
            ThreadReferenceImpl xx = (ThreadReferenceImpl)vm.threadMirror(jt);
            myList.add(xx);
        }
    }
    return myList;
}
 
Example #7
Source File: ThreadReferenceImpl.java    From openjdk-8 with GNU General Public License v2.0 6 votes vote down vote up
private int jvmtiGetThreadState() {
    // get most state bits
    int state = OopUtilities.threadOopGetThreadStatus(ref());
    // add more state bits
    if (myJavaThread != null) {
        JavaThreadState jts = myJavaThread.getThreadState();
        if (myJavaThread.isBeingExtSuspended()) {
            state |= JVMTI_THREAD_STATE_SUSPENDED;
        }
        if (jts == JavaThreadState.IN_NATIVE) {
            state |= JVMTI_THREAD_STATE_IN_NATIVE;
        }
        OSThread osThread = myJavaThread.getOSThread();
        if (osThread != null && osThread.interrupted()) {
            state |= JVMTI_THREAD_STATE_INTERRUPTED;
        }
    }
    return state;
}
 
Example #8
Source File: ThreadReferenceImpl.java    From jdk8u60 with GNU General Public License v2.0 6 votes vote down vote up
private int jvmtiGetThreadState() {
    // get most state bits
    int state = OopUtilities.threadOopGetThreadStatus(ref());
    // add more state bits
    if (myJavaThread != null) {
        JavaThreadState jts = myJavaThread.getThreadState();
        if (myJavaThread.isBeingExtSuspended()) {
            state |= JVMTI_THREAD_STATE_SUSPENDED;
        }
        if (jts == JavaThreadState.IN_NATIVE) {
            state |= JVMTI_THREAD_STATE_IN_NATIVE;
        }
        OSThread osThread = myJavaThread.getOSThread();
        if (osThread != null && osThread.interrupted()) {
            state |= JVMTI_THREAD_STATE_INTERRUPTED;
        }
    }
    return state;
}
 
Example #9
Source File: ThreadGroupReferenceImpl.java    From openjdk-jdk8u with GNU General Public License v2.0 6 votes vote down vote up
public List threads() {
    // Each element of this array is the Oop for a thread;
    // NOTE it is not the JavaThread that we need to create
    // a ThreadReferenceImpl.
    Oop[] myThreads = OopUtilities.threadGroupOopGetThreads(ref());

    ArrayList myList = new ArrayList(myThreads.length);
    for (int ii = 0; ii < myThreads.length; ii++) {
        JavaThread jt = OopUtilities.threadOopGetJavaThread(myThreads[ii]);
        if (jt != null) {
            ThreadReferenceImpl xx = (ThreadReferenceImpl)vm.threadMirror(jt);
            myList.add(xx);
        }
    }
    return myList;
}
 
Example #10
Source File: ThreadReferenceImpl.java    From openjdk-8-source with GNU General Public License v2.0 6 votes vote down vote up
private int jvmtiGetThreadState() {
    // get most state bits
    int state = OopUtilities.threadOopGetThreadStatus(ref());
    // add more state bits
    if (myJavaThread != null) {
        JavaThreadState jts = myJavaThread.getThreadState();
        if (myJavaThread.isBeingExtSuspended()) {
            state |= JVMTI_THREAD_STATE_SUSPENDED;
        }
        if (jts == JavaThreadState.IN_NATIVE) {
            state |= JVMTI_THREAD_STATE_IN_NATIVE;
        }
        OSThread osThread = myJavaThread.getOSThread();
        if (osThread != null && osThread.interrupted()) {
            state |= JVMTI_THREAD_STATE_INTERRUPTED;
        }
    }
    return state;
}
 
Example #11
Source File: ThreadGroupReferenceImpl.java    From TencentKona-8 with GNU General Public License v2.0 6 votes vote down vote up
public List threads() {
    // Each element of this array is the Oop for a thread;
    // NOTE it is not the JavaThread that we need to create
    // a ThreadReferenceImpl.
    Oop[] myThreads = OopUtilities.threadGroupOopGetThreads(ref());

    ArrayList myList = new ArrayList(myThreads.length);
    for (int ii = 0; ii < myThreads.length; ii++) {
        JavaThread jt = OopUtilities.threadOopGetJavaThread(myThreads[ii]);
        if (jt != null) {
            ThreadReferenceImpl xx = (ThreadReferenceImpl)vm.threadMirror(jt);
            myList.add(xx);
        }
    }
    return myList;
}
 
Example #12
Source File: ThreadReferenceImpl.java    From hottub with GNU General Public License v2.0 6 votes vote down vote up
private int jvmtiGetThreadState() {
    // get most state bits
    int state = OopUtilities.threadOopGetThreadStatus(ref());
    // add more state bits
    if (myJavaThread != null) {
        JavaThreadState jts = myJavaThread.getThreadState();
        if (myJavaThread.isBeingExtSuspended()) {
            state |= JVMTI_THREAD_STATE_SUSPENDED;
        }
        if (jts == JavaThreadState.IN_NATIVE) {
            state |= JVMTI_THREAD_STATE_IN_NATIVE;
        }
        OSThread osThread = myJavaThread.getOSThread();
        if (osThread != null && osThread.interrupted()) {
            state |= JVMTI_THREAD_STATE_INTERRUPTED;
        }
    }
    return state;
}
 
Example #13
Source File: ThreadGroupReferenceImpl.java    From openjdk-8 with GNU General Public License v2.0 6 votes vote down vote up
public List threads() {
    // Each element of this array is the Oop for a thread;
    // NOTE it is not the JavaThread that we need to create
    // a ThreadReferenceImpl.
    Oop[] myThreads = OopUtilities.threadGroupOopGetThreads(ref());

    ArrayList myList = new ArrayList(myThreads.length);
    for (int ii = 0; ii < myThreads.length; ii++) {
        JavaThread jt = OopUtilities.threadOopGetJavaThread(myThreads[ii]);
        if (jt != null) {
            ThreadReferenceImpl xx = (ThreadReferenceImpl)vm.threadMirror(jt);
            myList.add(xx);
        }
    }
    return myList;
}
 
Example #14
Source File: ThreadReferenceImpl.java    From TencentKona-8 with GNU General Public License v2.0 6 votes vote down vote up
private int jvmtiGetThreadState() {
    // get most state bits
    int state = OopUtilities.threadOopGetThreadStatus(ref());
    // add more state bits
    if (myJavaThread != null) {
        JavaThreadState jts = myJavaThread.getThreadState();
        if (myJavaThread.isBeingExtSuspended()) {
            state |= JVMTI_THREAD_STATE_SUSPENDED;
        }
        if (jts == JavaThreadState.IN_NATIVE) {
            state |= JVMTI_THREAD_STATE_IN_NATIVE;
        }
        OSThread osThread = myJavaThread.getOSThread();
        if (osThread != null && osThread.interrupted()) {
            state |= JVMTI_THREAD_STATE_INTERRUPTED;
        }
    }
    return state;
}
 
Example #15
Source File: ThreadReferenceImpl.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
ThreadReferenceImpl(VirtualMachine vm, Instance oRef) {
    // Instance must be of type java.lang.Thread
    super(vm, oRef);

    // JavaThread retrieved from java.lang.Thread instance may be null.
    // This is the case for threads not-started and for zombies. Wherever
    // appropriate, check for null instead of resulting in NullPointerException.
    myJavaThread = OopUtilities.threadOopGetJavaThread(oRef);
}
 
Example #16
Source File: ThreadReferenceImpl.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
ThreadReferenceImpl(VirtualMachine vm, Instance oRef) {
    // Instance must be of type java.lang.Thread
    super(vm, oRef);

    // JavaThread retrieved from java.lang.Thread instance may be null.
    // This is the case for threads not-started and for zombies. Wherever
    // appropriate, check for null instead of resulting in NullPointerException.
    myJavaThread = OopUtilities.threadOopGetJavaThread(oRef);
}
 
Example #17
Source File: ThreadGroupReferenceImpl.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
public List threadGroups() {
    Oop[] myGroups = OopUtilities.threadGroupOopGetGroups(ref());
    ArrayList myList = new ArrayList(myGroups.length);
    for (int ii = 0; ii < myGroups.length; ii++) {
        ThreadGroupReferenceImpl xx = (ThreadGroupReferenceImpl)vm.threadGroupMirror(
                                      (Instance)myGroups[ii]);
        myList.add(xx);

    }
    return myList;
}
 
Example #18
Source File: ThreadReferenceImpl.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
ThreadReferenceImpl(VirtualMachine vm, Instance oRef) {
    // Instance must be of type java.lang.Thread
    super(vm, oRef);

    // JavaThread retrieved from java.lang.Thread instance may be null.
    // This is the case for threads not-started and for zombies. Wherever
    // appropriate, check for null instead of resulting in NullPointerException.
    myJavaThread = OopUtilities.threadOopGetJavaThread(oRef);
}
 
Example #19
Source File: ThreadReferenceImpl.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
ThreadReferenceImpl(VirtualMachine vm, Instance oRef) {
    // Instance must be of type java.lang.Thread
    super(vm, oRef);

    // JavaThread retrieved from java.lang.Thread instance may be null.
    // This is the case for threads not-started and for zombies. Wherever
    // appropriate, check for null instead of resulting in NullPointerException.
    myJavaThread = OopUtilities.threadOopGetJavaThread(oRef);
}
 
Example #20
Source File: ThreadReferenceImpl.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
ThreadReferenceImpl(VirtualMachine vm, Instance oRef) {
    // Instance must be of type java.lang.Thread
    super(vm, oRef);

    // JavaThread retrieved from java.lang.Thread instance may be null.
    // This is the case for threads not-started and for zombies. Wherever
    // appropriate, check for null instead of resulting in NullPointerException.
    myJavaThread = OopUtilities.threadOopGetJavaThread(oRef);
}
 
Example #21
Source File: ThreadGroupReferenceImpl.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
public List threadGroups() {
    Oop[] myGroups = OopUtilities.threadGroupOopGetGroups(ref());
    ArrayList myList = new ArrayList(myGroups.length);
    for (int ii = 0; ii < myGroups.length; ii++) {
        ThreadGroupReferenceImpl xx = (ThreadGroupReferenceImpl)vm.threadGroupMirror(
                                      (Instance)myGroups[ii]);
        myList.add(xx);

    }
    return myList;
}
 
Example #22
Source File: ThreadGroupReferenceImpl.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
public List threadGroups() {
    Oop[] myGroups = OopUtilities.threadGroupOopGetGroups(ref());
    ArrayList myList = new ArrayList(myGroups.length);
    for (int ii = 0; ii < myGroups.length; ii++) {
        ThreadGroupReferenceImpl xx = (ThreadGroupReferenceImpl)vm.threadGroupMirror(
                                      (Instance)myGroups[ii]);
        myList.add(xx);

    }
    return myList;
}
 
Example #23
Source File: ThreadGroupReferenceImpl.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
public List threadGroups() {
    Oop[] myGroups = OopUtilities.threadGroupOopGetGroups(ref());
    ArrayList myList = new ArrayList(myGroups.length);
    for (int ii = 0; ii < myGroups.length; ii++) {
        ThreadGroupReferenceImpl xx = (ThreadGroupReferenceImpl)vm.threadGroupMirror(
                                      (Instance)myGroups[ii]);
        myList.add(xx);

    }
    return myList;
}
 
Example #24
Source File: ThreadGroupReferenceImpl.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
public List threadGroups() {
    Oop[] myGroups = OopUtilities.threadGroupOopGetGroups(ref());
    ArrayList myList = new ArrayList(myGroups.length);
    for (int ii = 0; ii < myGroups.length; ii++) {
        ThreadGroupReferenceImpl xx = (ThreadGroupReferenceImpl)vm.threadGroupMirror(
                                      (Instance)myGroups[ii]);
        myList.add(xx);

    }
    return myList;
}
 
Example #25
Source File: ThreadGroupReferenceImpl.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
public List threadGroups() {
    Oop[] myGroups = OopUtilities.threadGroupOopGetGroups(ref());
    ArrayList myList = new ArrayList(myGroups.length);
    for (int ii = 0; ii < myGroups.length; ii++) {
        ThreadGroupReferenceImpl xx = (ThreadGroupReferenceImpl)vm.threadGroupMirror(
                                      (Instance)myGroups[ii]);
        myList.add(xx);

    }
    return myList;
}
 
Example #26
Source File: ThreadReferenceImpl.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
ThreadReferenceImpl(VirtualMachine vm, Instance oRef) {
    // Instance must be of type java.lang.Thread
    super(vm, oRef);

    // JavaThread retrieved from java.lang.Thread instance may be null.
    // This is the case for threads not-started and for zombies. Wherever
    // appropriate, check for null instead of resulting in NullPointerException.
    myJavaThread = OopUtilities.threadOopGetJavaThread(oRef);
}
 
Example #27
Source File: ThreadGroupReferenceImpl.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
public List threadGroups() {
    Oop[] myGroups = OopUtilities.threadGroupOopGetGroups(ref());
    ArrayList myList = new ArrayList(myGroups.length);
    for (int ii = 0; ii < myGroups.length; ii++) {
        ThreadGroupReferenceImpl xx = (ThreadGroupReferenceImpl)vm.threadGroupMirror(
                                      (Instance)myGroups[ii]);
        myList.add(xx);

    }
    return myList;
}
 
Example #28
Source File: ThreadReferenceImpl.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
ThreadReferenceImpl(VirtualMachine vm, Instance oRef) {
    // Instance must be of type java.lang.Thread
    super(vm, oRef);

    // JavaThread retrieved from java.lang.Thread instance may be null.
    // This is the case for threads not-started and for zombies. Wherever
    // appropriate, check for null instead of resulting in NullPointerException.
    myJavaThread = OopUtilities.threadOopGetJavaThread(oRef);
}
 
Example #29
Source File: ThreadGroupReferenceImpl.java    From hottub with GNU General Public License v2.0 4 votes vote down vote up
public String name() {
    return OopUtilities.threadGroupOopGetName(ref());
}
 
Example #30
Source File: ThreadGroupReferenceImpl.java    From hottub with GNU General Public License v2.0 4 votes vote down vote up
public ThreadGroupReference parent() {
    return (ThreadGroupReferenceImpl)vm.threadGroupMirror(
           (Instance)OopUtilities.threadGroupOopGetParent(ref()));
}