8223332: Update JVMCI

Reviewed-by: never, dnsimon
This commit is contained in:
Vladimir Kozlov 2019-05-06 20:05:19 -07:00
parent 29a4ad9a87
commit 72f082e925
30 changed files with 1038 additions and 345 deletions

View file

@ -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];
}
}
}