# HG changeset patch # User Gilles Duboscq # Date 1383819443 -3600 # Node ID 0e998f0daddf8596d7c3ea3ea819686df6933764 # Parent b6f66fb9f1063135c6b190aba25afe501af0e948 Code cache: make sure we collect statistics even if the compiler is not recognized diff -r b6f66fb9f106 -r 0e998f0daddf src/share/vm/code/nmethod.cpp --- a/src/share/vm/code/nmethod.cpp Thu Nov 07 10:45:56 2013 +0100 +++ b/src/share/vm/code/nmethod.cpp Thu Nov 07 11:17:23 2013 +0100 @@ -229,6 +229,7 @@ #ifdef GRAAL static java_nmethod_stats_struct graal_java_nmethod_stats; #endif +static java_nmethod_stats_struct unknwon_java_nmethod_stats; static native_nmethod_stats_struct native_nmethod_stats; static pc_nmethod_stats_struct pc_nmethod_stats; @@ -237,18 +238,21 @@ #ifdef COMPILER1 if (nm->is_compiled_by_c1()) { c1_java_nmethod_stats.note_nmethod(nm); - } + } else #endif #ifdef COMPILER2 if (nm->is_compiled_by_c2()) { c2_java_nmethod_stats.note_nmethod(nm); - } + } else #endif #ifdef GRAAL if (nm->is_compiled_by_graal()) { graal_java_nmethod_stats.note_nmethod(nm); + } else +#endif + { + unknwon_java_nmethod_stats.note_nmethod(nm); } -#endif } @@ -3087,6 +3091,7 @@ #ifdef GRAAL graal_java_nmethod_stats.print_nmethod_stats("Graal"); #endif + unknwon_java_nmethod_stats.print_nmethod_stats("Unknown"); DebugInformationRecorder::print_statistics(); pc_nmethod_stats.print_pc_stats(); Dependencies::print_statistics();