equal
deleted
inserted
replaced
1573 |
1573 |
1574 bool jvmci_counters_include(JavaThread* thread) { |
1574 bool jvmci_counters_include(JavaThread* thread) { |
1575 return !JVMCICountersExcludeCompiler || !thread->is_Compiler_thread(); |
1575 return !JVMCICountersExcludeCompiler || !thread->is_Compiler_thread(); |
1576 } |
1576 } |
1577 |
1577 |
1578 void JavaThread::collect_counters(JVMCIEnv* jvmci_env, JVMCIPrimitiveArray array) { |
1578 void JavaThread::collect_counters(jlong* array, int length) { |
1579 if (JVMCICounterSize > 0) { |
1579 assert(length == JVMCICounterSize, "wrong value"); |
1580 JavaThreadIteratorWithHandle jtiwh; |
1580 for (int i = 0; i < length; i++) { |
1581 int len = jvmci_env->get_length(array); |
1581 array[i] = _jvmci_old_thread_counters[i]; |
1582 for (int i = 0; i < len; i++) { |
1582 } |
1583 jvmci_env->put_long_at(array, i, _jvmci_old_thread_counters[i]); |
1583 for (JavaThreadIteratorWithHandle jtiwh; JavaThread *tp = jtiwh.next(); ) { |
1584 } |
1584 if (jvmci_counters_include(tp)) { |
1585 for (; JavaThread *tp = jtiwh.next(); ) { |
1585 for (int i = 0; i < length; i++) { |
1586 if (jvmci_counters_include(tp)) { |
1586 array[i] += tp->_jvmci_counters[i]; |
1587 for (int i = 0; i < len; i++) { |
|
1588 jvmci_env->put_long_at(array, i, jvmci_env->get_long_at(array, i) + tp->_jvmci_counters[i]); |
|
1589 } |
|
1590 } |
1587 } |
1591 } |
1588 } |
1592 } |
1589 } |
1593 } |
1590 } |
1594 |
1591 |