mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-17 17:44:40 +02:00
8223332: Update JVMCI
Reviewed-by: never, dnsimon
This commit is contained in:
parent
29a4ad9a87
commit
72f082e925
30 changed files with 1038 additions and 345 deletions
|
@ -1575,18 +1575,15 @@ 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]);
|
||||
}
|
||||
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];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue