diff options
Diffstat (limited to 'libjava/gnu/java/lang/management/VMThreadMXBeanImpl.java')
-rw-r--r-- | libjava/gnu/java/lang/management/VMThreadMXBeanImpl.java | 44 |
1 files changed, 9 insertions, 35 deletions
diff --git a/libjava/gnu/java/lang/management/VMThreadMXBeanImpl.java b/libjava/gnu/java/lang/management/VMThreadMXBeanImpl.java index 3478372c6c5..c5bcb631055 100644 --- a/libjava/gnu/java/lang/management/VMThreadMXBeanImpl.java +++ b/libjava/gnu/java/lang/management/VMThreadMXBeanImpl.java @@ -64,10 +64,7 @@ final class VMThreadMXBeanImpl * * @return the ids of the deadlocked threads. */ - static long[] findMonitorDeadlockedThreads() - { - return new long[0]; - } + static native long[] findMonitorDeadlockedThreads(); /* This is the same as in Thread.getAllStackTraces() */ static Thread[] getAllThreads() @@ -110,10 +107,7 @@ final class VMThreadMXBeanImpl * @return the nanoseconds of CPU time used by * the current thread. */ - static long getCurrentThreadCpuTime() - { - return -1; - } + static native long getCurrentThreadCpuTime(); /** * Returns the number of nanoseconds of user time @@ -124,10 +118,7 @@ final class VMThreadMXBeanImpl * @return the nanoseconds of user time used by * the current thread. */ - static long getCurrentThreadUserTime() - { - return -1; - } + static native long getCurrentThreadUserTime(); /** * Returns the number of live daemon threads. @@ -151,10 +142,7 @@ final class VMThreadMXBeanImpl * * @return the peak number of live threads. */ - static int getPeakThreadCount() - { - return -1; - } + static native int getPeakThreadCount(); /** * Returns the number of live threads. @@ -177,10 +165,7 @@ final class VMThreadMXBeanImpl * @return the nanoseconds of CPU time used by * the thread. */ - static long getThreadCpuTime(long id) - { - return -1; - } + static native long getThreadCpuTime(long id); /** * Returns the {@link java.lang.management.ThreadInfo} @@ -190,10 +175,7 @@ final class VMThreadMXBeanImpl * @param maxDepth the depth of the stack trace. * @return the corresponding <code>ThreadInfo</code>. */ - static ThreadInfo getThreadInfoForId(long id, int maxDepth) - { - return null; - } + static native ThreadInfo getThreadInfoForId(long id, int maxDepth); /** * Returns the number of nanoseconds of user time @@ -205,10 +187,7 @@ final class VMThreadMXBeanImpl * @return the nanoseconds of user time used by * the thread. */ - static long getThreadUserTime(long id) - { - return -1; - } + static native long getThreadUserTime(long id); /** * Returns the total number of threads that have @@ -217,17 +196,12 @@ final class VMThreadMXBeanImpl * * @return the total number of threads started. */ - static long getTotalStartedThreadCount() - { - return -1; - } + static native long getTotalStartedThreadCount(); /** * Resets the peak thread count to the current * number of live threads. */ - static void resetPeakThreadCount() - { - } + static native void resetPeakThreadCount(); } |