Mercurial > hg > graal-compiler
diff src/share/vm/runtime/thread.cpp @ 11893:ec267141f753
more javadoc and output tweaks for dynamic counters
author | Lukas Stadler <lukas.stadler@jku.at> |
---|---|
date | Fri, 04 Oct 2013 11:56:18 +0200 |
parents | d7964e96b0b0 |
children | cefad50507d8 |
line wrap: on
line diff
--- a/src/share/vm/runtime/thread.cpp Fri Oct 04 00:53:19 2013 +0200 +++ b/src/share/vm/runtime/thread.cpp Fri Oct 04 11:56:18 2013 +0200 @@ -1414,7 +1414,7 @@ #ifdef GRAAL #if GRAAL_COUNTERS_SIZE > 0 -jlong JavaThread::_graal_old_counters[GRAAL_COUNTERS_SIZE]; +jlong JavaThread::_graal_old_thread_counters[GRAAL_COUNTERS_SIZE]; bool graal_counters_include(oop threadObj) { return !GRAAL_COUNTERS_EXCLUDE_COMPILER_THREADS || threadObj == NULL || threadObj->klass() != SystemDictionary::CompilerThread_klass(); @@ -1423,7 +1423,7 @@ void JavaThread::collect_counters(typeArrayOop array) { MutexLocker tl(Threads_lock); for (int i = 0; i < array->length(); i++) { - array->long_at_put(i, _graal_old_counters[i]); + array->long_at_put(i, _graal_old_thread_counters[i]); } for (JavaThread* tp = Threads::first(); tp != NULL; tp = tp->next()) { if (graal_counters_include(tp->threadObj())) { @@ -1479,10 +1479,12 @@ _stack_guard_state = stack_guard_unused; #ifdef GRAAL _graal_alternate_call_target = NULL; +#if GRAAL_COUNTERS_SIZE > 0 for (int i = 0; i < GRAAL_COUNTERS_SIZE; i++) { _graal_counters[i] = 0; } -#endif +#endif // GRAAL_COUNTER_SIZE > 0 +#endif // GRAAL _exception_oop = NULL; _exception_pc = 0; _exception_handler_pc = 0; @@ -1675,7 +1677,7 @@ #if defined(GRAAL) && (GRAAL_COUNTERS_SIZE > 0) if (graal_counters_include(threadObj())) { for (int i = 0; i < GRAAL_COUNTERS_SIZE; i++) { - _graal_old_counters[i] += _graal_counters[i]; + _graal_old_thread_counters[i] += _graal_counters[i]; } } #endif