# HG changeset patch # User Lukas Stadler # Date 1416776298 28800 # Node ID fa981f5bb53a4fc3e4691c592fee0ade20c85ad7 # Parent 25a21e1794ec9f8a592ba26ed1b814d1b5cec969 reenable -XX:+GraalCountersExcludeCompiler option diff -r 25a21e1794ec -r fa981f5bb53a graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/ProfileCompiledMethodsPhase.java --- a/graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/ProfileCompiledMethodsPhase.java Wed Nov 26 17:14:49 2014 +0100 +++ b/graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/ProfileCompiledMethodsPhase.java Sun Nov 23 12:58:18 2014 -0800 @@ -57,7 +57,7 @@ private static final String GROUP_NAME_WITHOUT = "~profiled weight (invoke-free sections)"; private static final String GROUP_NAME_INVOKES = "~profiled invokes"; - private static final boolean WITH_SECTION_HEADER = false; + private static final boolean WITH_SECTION_HEADER = Boolean.parseBoolean(System.getProperty("ProfileCompiledMethodsPhase.WITH_SECTION_HEADER", "false")); private static final boolean WITH_INVOKE_FREE_SECTIONS = Boolean.parseBoolean(System.getProperty("ProfileCompiledMethodsPhase.WITH_FREE_SECTIONS", "false")); private static final boolean WITH_INVOKES = Boolean.parseBoolean(System.getProperty("ProfileCompiledMethodsPhase.WITH_INVOKES", "true")); diff -r 25a21e1794ec -r fa981f5bb53a src/share/vm/runtime/thread.cpp --- a/src/share/vm/runtime/thread.cpp Wed Nov 26 17:14:49 2014 +0100 +++ b/src/share/vm/runtime/thread.cpp Sun Nov 23 12:58:18 2014 -0800 @@ -1431,8 +1431,9 @@ jlong* JavaThread::_graal_old_thread_counters; -bool graal_counters_include(oop threadObj) { - return !GraalCountersExcludeCompiler || threadObj == NULL || threadObj->klass() != SystemDictionary::CompilerThread_klass(); +bool graal_counters_include(JavaThread* thread) { + oop threadObj = thread->threadObj(); + return !GraalCountersExcludeCompiler || (!thread->is_Compiler_thread() && (threadObj == NULL || threadObj->klass() != SystemDictionary::CompilerThread_klass())); } void JavaThread::collect_counters(typeArrayOop array) { @@ -1442,7 +1443,7 @@ 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())) { + if (graal_counters_include(tp)) { for (int i = 0; i < array->length(); i++) { array->long_at_put(i, array->long_at(i) + tp->_graal_counters[i]); } @@ -1696,7 +1697,7 @@ #ifdef GRAAL if (GraalCounterSize > 0) { - if (graal_counters_include(threadObj())) { + if (graal_counters_include(this)) { for (int i = 0; i < GraalCounterSize; i++) { _graal_old_thread_counters[i] += _graal_counters[i]; }