equal
deleted
inserted
replaced
333 |
333 |
334 static jint get_compilation_activity_mode() { return _should_compile_new_jobs; } |
334 static jint get_compilation_activity_mode() { return _should_compile_new_jobs; } |
335 static bool should_compile_new_jobs() { return UseCompiler && (_should_compile_new_jobs == run_compilation); } |
335 static bool should_compile_new_jobs() { return UseCompiler && (_should_compile_new_jobs == run_compilation); } |
336 static bool set_should_compile_new_jobs(jint new_state) { |
336 static bool set_should_compile_new_jobs(jint new_state) { |
337 // Return success if the current caller set it |
337 // Return success if the current caller set it |
338 jint old = Atomic::cmpxchg(new_state, &_should_compile_new_jobs, 1-new_state); |
338 jint old = Atomic::cmpxchg(&_should_compile_new_jobs, 1-new_state, new_state); |
339 bool success = (old == (1-new_state)); |
339 bool success = (old == (1-new_state)); |
340 if (success) { |
340 if (success) { |
341 if (new_state == run_compilation) { |
341 if (new_state == run_compilation) { |
342 _total_compiler_restarted_count++; |
342 _total_compiler_restarted_count++; |
343 } else { |
343 } else { |
357 return _should_compile_new_jobs == shutdown_compilation; |
357 return _should_compile_new_jobs == shutdown_compilation; |
358 } |
358 } |
359 static void handle_full_code_cache(int code_blob_type); |
359 static void handle_full_code_cache(int code_blob_type); |
360 // Ensures that warning is only printed once. |
360 // Ensures that warning is only printed once. |
361 static bool should_print_compiler_warning() { |
361 static bool should_print_compiler_warning() { |
362 jint old = Atomic::cmpxchg(1, &_print_compilation_warning, 0); |
362 jint old = Atomic::cmpxchg(&_print_compilation_warning, 0, 1); |
363 return old == 0; |
363 return old == 0; |
364 } |
364 } |
365 // Return total compilation ticks |
365 // Return total compilation ticks |
366 static jlong total_compilation_ticks() { |
366 static jlong total_compilation_ticks() { |
367 return _perf_total_compilation != NULL ? _perf_total_compilation->get_value() : 0; |
367 return _perf_total_compilation != NULL ? _perf_total_compilation->get_value() : 0; |