src/hotspot/share/runtime/thread.cpp
Index
Unified diffs
Context diffs
Sdiffs
Wdiffs
Patch
New
Old
Previous File
Next File
open Cdiff src/hotspot/share/runtime/thread.cpp
src/hotspot/share/runtime/thread.cpp
Print this page
*** 1573,1594 ****
bool jvmci_counters_include(JavaThread* thread) {
return !JVMCICountersExcludeCompiler || !thread->is_Compiler_thread();
}
! void JavaThread::collect_counters(JVMCIEnv* jvmci_env, JVMCIPrimitiveArray array) {
! if (JVMCICounterSize > 0) {
! JavaThreadIteratorWithHandle jtiwh;
! int len = jvmci_env->get_length(array);
! for (int i = 0; i < len; i++) {
! jvmci_env->put_long_at(array, i, _jvmci_old_thread_counters[i]);
}
! for (; JavaThread *tp = jtiwh.next(); ) {
if (jvmci_counters_include(tp)) {
! for (int i = 0; i < len; i++) {
! jvmci_env->put_long_at(array, i, jvmci_env->get_long_at(array, i) + tp->_jvmci_counters[i]);
! }
}
}
}
}
--- 1573,1591 ----
bool jvmci_counters_include(JavaThread* thread) {
return !JVMCICountersExcludeCompiler || !thread->is_Compiler_thread();
}
! void JavaThread::collect_counters(jlong* array, int length) {
! assert(length == JVMCICounterSize, "wrong value");
! for (int i = 0; i < length; i++) {
! array[i] = _jvmci_old_thread_counters[i];
}
! for (JavaThreadIteratorWithHandle jtiwh; JavaThread *tp = jtiwh.next(); ) {
if (jvmci_counters_include(tp)) {
! for (int i = 0; i < length; i++) {
! array[i] += tp->_jvmci_counters[i];
}
}
}
}
src/hotspot/share/runtime/thread.cpp
Index
Unified diffs
Context diffs
Sdiffs
Wdiffs
Patch
New
Old
Previous File
Next File