Mercurial > hg > graal-jvmci-8
diff src/share/vm/compiler/compileBroker.hpp @ 13074:78da3894b86f
8027593: performance drop with constrained codecache starting with hs25 b111
Summary: Fixed proper sweeping of small code cache sizes
Reviewed-by: kvn, iveresov
author | anoll |
---|---|
date | Tue, 12 Nov 2013 09:32:50 +0100 |
parents | 469216acdb28 |
children | 096c224171c4 7c0122ed05fb |
line wrap: on
line diff
--- a/src/share/vm/compiler/compileBroker.hpp Mon Nov 11 11:53:33 2013 -0800 +++ b/src/share/vm/compiler/compileBroker.hpp Tue Nov 12 09:32:50 2013 +0100 @@ -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;