1 /*
2 * Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation. Oracle designates this
8 * particular file as subject to the "Classpath" exception as provided
9 * by Oracle in the LICENSE file that accompanied this code.
10 *
11 * This code is distributed in the hope that it will be useful, but WITHOUT
12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 * version 2 for more details (a copy is included in the LICENSE file that
15 * accompanied this code).
16 *
17 * You should have received a copy of the GNU General Public License version
18 * 2 along with this work; if not, write to the Free Software Foundation,
19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20 *
21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 * or visit www.oracle.com if you need additional information or have any
77 {
78 jmm_interface->GetThreadCpuTimesWithKind(env, ids, timeArray,
79 JNI_TRUE /* user+sys */);
80 }
81
82 JNIEXPORT jlong JNICALL
83 Java_sun_management_ThreadImpl_getThreadUserCpuTime0
84 (JNIEnv *env, jclass cls, jlong tid)
85 {
86 return jmm_interface->GetThreadCpuTimeWithKind(env, tid, JNI_FALSE /* user */);
87 }
88
89 JNIEXPORT void JNICALL
90 Java_sun_management_ThreadImpl_getThreadUserCpuTime1
91 (JNIEnv *env, jclass cls, jlongArray ids, jlongArray timeArray)
92 {
93 jmm_interface->GetThreadCpuTimesWithKind(env, ids, timeArray,
94 JNI_FALSE /* user */);
95 }
96
97 JNIEXPORT void JNICALL
98 Java_sun_management_ThreadImpl_getThreadAllocatedMemory1
99 (JNIEnv *env, jclass cls, jlongArray ids, jlongArray sizeArray)
100 {
101 jmm_interface->GetThreadAllocatedMemory(env, ids, sizeArray);
102 }
103
104 JNIEXPORT jobjectArray JNICALL
105 Java_sun_management_ThreadImpl_findMonitorDeadlockedThreads0
106 (JNIEnv *env, jclass cls)
107 {
108 return jmm_interface->FindCircularBlockedThreads(env);
109 }
110
111 JNIEXPORT jobjectArray JNICALL
112 Java_sun_management_ThreadImpl_findDeadlockedThreads0
113 (JNIEnv *env, jclass cls)
114 {
115 return jmm_interface->FindDeadlocks(env, JNI_FALSE /* !object_monitors_only */);
116 }
|
1 /*
2 * Copyright (c) 2003, 2019, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation. Oracle designates this
8 * particular file as subject to the "Classpath" exception as provided
9 * by Oracle in the LICENSE file that accompanied this code.
10 *
11 * This code is distributed in the hope that it will be useful, but WITHOUT
12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 * version 2 for more details (a copy is included in the LICENSE file that
15 * accompanied this code).
16 *
17 * You should have received a copy of the GNU General Public License version
18 * 2 along with this work; if not, write to the Free Software Foundation,
19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20 *
21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 * or visit www.oracle.com if you need additional information or have any
77 {
78 jmm_interface->GetThreadCpuTimesWithKind(env, ids, timeArray,
79 JNI_TRUE /* user+sys */);
80 }
81
82 JNIEXPORT jlong JNICALL
83 Java_sun_management_ThreadImpl_getThreadUserCpuTime0
84 (JNIEnv *env, jclass cls, jlong tid)
85 {
86 return jmm_interface->GetThreadCpuTimeWithKind(env, tid, JNI_FALSE /* user */);
87 }
88
89 JNIEXPORT void JNICALL
90 Java_sun_management_ThreadImpl_getThreadUserCpuTime1
91 (JNIEnv *env, jclass cls, jlongArray ids, jlongArray timeArray)
92 {
93 jmm_interface->GetThreadCpuTimesWithKind(env, ids, timeArray,
94 JNI_FALSE /* user */);
95 }
96
97 JNIEXPORT jlong JNICALL
98 Java_sun_management_ThreadImpl_getThreadAllocatedMemory0
99 (JNIEnv *env, jclass cls, jlong tid)
100 {
101 return jmm_interface->GetOneThreadAllocatedMemory(env, tid);
102 }
103
104 JNIEXPORT void JNICALL
105 Java_sun_management_ThreadImpl_getThreadAllocatedMemory1
106 (JNIEnv *env, jclass cls, jlongArray ids, jlongArray sizeArray)
107 {
108 jmm_interface->GetThreadAllocatedMemory(env, ids, sizeArray);
109 }
110
111 JNIEXPORT jobjectArray JNICALL
112 Java_sun_management_ThreadImpl_findMonitorDeadlockedThreads0
113 (JNIEnv *env, jclass cls)
114 {
115 return jmm_interface->FindCircularBlockedThreads(env);
116 }
117
118 JNIEXPORT jobjectArray JNICALL
119 Java_sun_management_ThreadImpl_findDeadlockedThreads0
120 (JNIEnv *env, jclass cls)
121 {
122 return jmm_interface->FindDeadlocks(env, JNI_FALSE /* !object_monitors_only */);
123 }
|