diff src/share/vm/compiler/compileBroker.hpp @ 14435:da862781b584

Merge
author kvn
date Thu, 21 Nov 2013 12:30:35 -0800
parents 78da3894b86f
children 096c224171c4 7c0122ed05fb
line wrap: on
line diff
--- a/src/share/vm/compiler/compileBroker.hpp	Wed Nov 20 11:08:09 2013 -0800
+++ b/src/share/vm/compiler/compileBroker.hpp	Thu Nov 21 12:30:35 2013 -0800
@@ -315,6 +315,8 @@
   static int _sum_nmethod_code_size;
   static long _peak_compilation_time;
 
+  static volatile jint _print_compilation_warning;
+
   static CompilerThread* make_compiler_thread(const char* name, CompileQueue* queue, CompilerCounters* counters, AbstractCompiler* comp, TRAPS);
   static void init_compiler_threads(int c1_compiler_count, int c2_compiler_count);
   static bool compilation_is_complete  (methodHandle method, int osr_bci, int comp_level);
@@ -418,7 +420,11 @@
     return _should_compile_new_jobs == shutdown_compilaton;
   }
   static void handle_full_code_cache();
-
+  // Ensures that warning is only printed once.
+  static bool should_print_compiler_warning() {
+    jint old = Atomic::cmpxchg(1, &_print_compilation_warning, 0);
+    return old == 0;
+  }
   // Return total compilation ticks
   static jlong total_compilation_ticks() {
     return _perf_total_compilation != NULL ? _perf_total_compilation->get_value() : 0;