Java Code Examples for sun.jvm.hotspot.runtime.JavaThread#getStackSize()

The following examples show how to use sun.jvm.hotspot.runtime.JavaThread#getStackSize() . 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: BsdDebuggerLocal.java    From TencentKona-8 with GNU General Public License v2.0 6 votes vote down vote up
/** this functions used for core file reading and called from native attach0,
    it returns an array of long integers as
    [thread_id, stack_start, stack_end, thread_id, stack_start, stack_end, ....] for
    all java threads recorded in Threads. Also adds the ThreadProxy to threadList */
public long[] getJavaThreadsInfo() {
    requireAttach();
    Threads threads = VM.getVM().getThreads();
    int len = threads.getNumberOfThreads();
    long[] result = new long[len * 3];    // triple
    JavaThread t = threads.first();
    long beg, end;
    int i = 0;
    while (t != null) {
        end = t.getStackBaseValue();
        beg = end - t.getStackSize();
        BsdThread bsdt = (BsdThread)t.getThreadProxy();
        long uid = bsdt.getUniqueThreadId();
        if (threadList != null) threadList.add(bsdt);
        result[i] = uid;
        result[i + 1] = beg;
        result[i + 2] = end;
        t = t.next();
        i += 3;
    }
    return result;
}
 
Example 2
Source File: BsdDebuggerLocal.java    From jdk8u60 with GNU General Public License v2.0 6 votes vote down vote up
/** this functions used for core file reading and called from native attach0,
    it returns an array of long integers as
    [thread_id, stack_start, stack_end, thread_id, stack_start, stack_end, ....] for
    all java threads recorded in Threads. Also adds the ThreadProxy to threadList */
public long[] getJavaThreadsInfo() {
    requireAttach();
    Threads threads = VM.getVM().getThreads();
    int len = threads.getNumberOfThreads();
    long[] result = new long[len * 3];    // triple
    JavaThread t = threads.first();
    long beg, end;
    int i = 0;
    while (t != null) {
        end = t.getStackBaseValue();
        beg = end - t.getStackSize();
        BsdThread bsdt = (BsdThread)t.getThreadProxy();
        long uid = bsdt.getUniqueThreadId();
        if (threadList != null) threadList.add(bsdt);
        result[i] = uid;
        result[i + 1] = beg;
        result[i + 2] = end;
        t = t.next();
        i += 3;
    }
    return result;
}
 
Example 3
Source File: BsdDebuggerLocal.java    From openjdk-jdk8u with GNU General Public License v2.0 6 votes vote down vote up
/** this functions used for core file reading and called from native attach0,
    it returns an array of long integers as
    [thread_id, stack_start, stack_end, thread_id, stack_start, stack_end, ....] for
    all java threads recorded in Threads. Also adds the ThreadProxy to threadList */
public long[] getJavaThreadsInfo() {
    requireAttach();
    Threads threads = VM.getVM().getThreads();
    int len = threads.getNumberOfThreads();
    long[] result = new long[len * 3];    // triple
    JavaThread t = threads.first();
    long beg, end;
    int i = 0;
    while (t != null) {
        end = t.getStackBaseValue();
        beg = end - t.getStackSize();
        BsdThread bsdt = (BsdThread)t.getThreadProxy();
        long uid = bsdt.getUniqueThreadId();
        if (threadList != null) threadList.add(bsdt);
        result[i] = uid;
        result[i + 1] = beg;
        result[i + 2] = end;
        t = t.next();
        i += 3;
    }
    return result;
}
 
Example 4
Source File: BsdDebuggerLocal.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 6 votes vote down vote up
/** this functions used for core file reading and called from native attach0,
    it returns an array of long integers as
    [thread_id, stack_start, stack_end, thread_id, stack_start, stack_end, ....] for
    all java threads recorded in Threads. Also adds the ThreadProxy to threadList */
public long[] getJavaThreadsInfo() {
    requireAttach();
    Threads threads = VM.getVM().getThreads();
    int len = threads.getNumberOfThreads();
    long[] result = new long[len * 3];    // triple
    JavaThread t = threads.first();
    long beg, end;
    int i = 0;
    while (t != null) {
        end = t.getStackBaseValue();
        beg = end - t.getStackSize();
        BsdThread bsdt = (BsdThread)t.getThreadProxy();
        long uid = bsdt.getUniqueThreadId();
        if (threadList != null) threadList.add(bsdt);
        result[i] = uid;
        result[i + 1] = beg;
        result[i + 2] = end;
        t = t.next();
        i += 3;
    }
    return result;
}
 
Example 5
Source File: BsdDebuggerLocal.java    From openjdk-jdk9 with GNU General Public License v2.0 6 votes vote down vote up
/** this functions used for core file reading and called from native attach0,
    it returns an array of long integers as
    [thread_id, stack_start, stack_end, thread_id, stack_start, stack_end, ....] for
    all java threads recorded in Threads. Also adds the ThreadProxy to threadList */
public long[] getJavaThreadsInfo() {
    requireAttach();
    Threads threads = VM.getVM().getThreads();
    int len = threads.getNumberOfThreads();
    long[] result = new long[len * 3];    // triple
    JavaThread t = threads.first();
    long beg, end;
    int i = 0;
    while (t != null) {
        end = t.getStackBaseValue();
        beg = end - t.getStackSize();
        BsdThread bsdt = (BsdThread)t.getThreadProxy();
        long uid = bsdt.getUniqueThreadId();
        if (threadList != null) threadList.add(bsdt);
        result[i] = uid;
        result[i + 1] = beg;
        result[i + 2] = end;
        t = t.next();
        i += 3;
    }
    return result;
}
 
Example 6
Source File: BsdDebuggerLocal.java    From hottub with GNU General Public License v2.0 6 votes vote down vote up
/** this functions used for core file reading and called from native attach0,
    it returns an array of long integers as
    [thread_id, stack_start, stack_end, thread_id, stack_start, stack_end, ....] for
    all java threads recorded in Threads. Also adds the ThreadProxy to threadList */
public long[] getJavaThreadsInfo() {
    requireAttach();
    Threads threads = VM.getVM().getThreads();
    int len = threads.getNumberOfThreads();
    long[] result = new long[len * 3];    // triple
    JavaThread t = threads.first();
    long beg, end;
    int i = 0;
    while (t != null) {
        end = t.getStackBaseValue();
        beg = end - t.getStackSize();
        BsdThread bsdt = (BsdThread)t.getThreadProxy();
        long uid = bsdt.getUniqueThreadId();
        if (threadList != null) threadList.add(bsdt);
        result[i] = uid;
        result[i + 1] = beg;
        result[i + 2] = end;
        t = t.next();
        i += 3;
    }
    return result;
}
 
Example 7
Source File: BsdDebuggerLocal.java    From openjdk-8-source with GNU General Public License v2.0 6 votes vote down vote up
/** this functions used for core file reading and called from native attach0,
    it returns an array of long integers as
    [thread_id, stack_start, stack_end, thread_id, stack_start, stack_end, ....] for
    all java threads recorded in Threads. Also adds the ThreadProxy to threadList */
public long[] getJavaThreadsInfo() {
    requireAttach();
    Threads threads = VM.getVM().getThreads();
    int len = threads.getNumberOfThreads();
    long[] result = new long[len * 3];    // triple
    JavaThread t = threads.first();
    long beg, end;
    int i = 0;
    while (t != null) {
        end = t.getStackBaseValue();
        beg = end - t.getStackSize();
        BsdThread bsdt = (BsdThread)t.getThreadProxy();
        long uid = bsdt.getUniqueThreadId();
        if (threadList != null) threadList.add(bsdt);
        result[i] = uid;
        result[i + 1] = beg;
        result[i + 2] = end;
        t = t.next();
        i += 3;
    }
    return result;
}
 
Example 8
Source File: BsdDebuggerLocal.java    From openjdk-8 with GNU General Public License v2.0 6 votes vote down vote up
/** this functions used for core file reading and called from native attach0,
    it returns an array of long integers as
    [thread_id, stack_start, stack_end, thread_id, stack_start, stack_end, ....] for
    all java threads recorded in Threads. Also adds the ThreadProxy to threadList */
public long[] getJavaThreadsInfo() {
    requireAttach();
    Threads threads = VM.getVM().getThreads();
    int len = threads.getNumberOfThreads();
    long[] result = new long[len * 3];    // triple
    JavaThread t = threads.first();
    long beg, end;
    int i = 0;
    while (t != null) {
        end = t.getStackBaseValue();
        beg = end - t.getStackSize();
        BsdThread bsdt = (BsdThread)t.getThreadProxy();
        long uid = bsdt.getUniqueThreadId();
        if (threadList != null) threadList.add(bsdt);
        result[i] = uid;
        result[i + 1] = beg;
        result[i + 2] = end;
        t = t.next();
        i += 3;
    }
    return result;
}