< prev index next >

src/hotspot/share/compiler/compileBroker.hpp

Print this page




 333 
 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); }
 336   static bool set_should_compile_new_jobs(jint new_state) {
 337     // Return success if the current caller set it
 338     jint old = Atomic::cmpxchg(new_state, &_should_compile_new_jobs, 1-new_state);
 339     bool success = (old == (1-new_state));
 340     if (success) {
 341       if (new_state == run_compilation) {
 342         _total_compiler_restarted_count++;
 343       } else {
 344         _total_compiler_stopped_count++;
 345       }
 346     }
 347     return success;
 348   }
 349 
 350   static void disable_compilation_forever() {
 351     UseCompiler               = false;
 352     AlwaysCompileLoopMethods  = false;
 353     Atomic::xchg(jint(shutdown_compilation), &_should_compile_new_jobs);
 354   }
 355 
 356   static bool is_compilation_disabled_forever() {
 357     return _should_compile_new_jobs == shutdown_compilation;
 358   }
 359   static void handle_full_code_cache(int code_blob_type);
 360   // Ensures that warning is only printed once.
 361   static bool should_print_compiler_warning() {
 362     jint old = Atomic::cmpxchg(1, &_print_compilation_warning, 0);
 363     return old == 0;
 364   }
 365   // Return total compilation ticks
 366   static jlong total_compilation_ticks() {
 367     return _perf_total_compilation != NULL ? _perf_total_compilation->get_value() : 0;
 368   }
 369 
 370   // Redefine Classes support
 371   static void mark_on_stack();
 372 
 373 #if INCLUDE_JVMCI




 333 
 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); }
 336   static bool set_should_compile_new_jobs(jint new_state) {
 337     // Return success if the current caller set it
 338     jint old = Atomic::cmpxchg(new_state, &_should_compile_new_jobs, 1-new_state);
 339     bool success = (old == (1-new_state));
 340     if (success) {
 341       if (new_state == run_compilation) {
 342         _total_compiler_restarted_count++;
 343       } else {
 344         _total_compiler_stopped_count++;
 345       }
 346     }
 347     return success;
 348   }
 349 
 350   static void disable_compilation_forever() {
 351     UseCompiler               = false;
 352     AlwaysCompileLoopMethods  = false;
 353     Atomic::xchg(&_should_compile_new_jobs, jint(shutdown_compilation));
 354   }
 355 
 356   static bool is_compilation_disabled_forever() {
 357     return _should_compile_new_jobs == shutdown_compilation;
 358   }
 359   static void handle_full_code_cache(int code_blob_type);
 360   // Ensures that warning is only printed once.
 361   static bool should_print_compiler_warning() {
 362     jint old = Atomic::cmpxchg(1, &_print_compilation_warning, 0);
 363     return old == 0;
 364   }
 365   // Return total compilation ticks
 366   static jlong total_compilation_ticks() {
 367     return _perf_total_compilation != NULL ? _perf_total_compilation->get_value() : 0;
 368   }
 369 
 370   // Redefine Classes support
 371   static void mark_on_stack();
 372 
 373 #if INCLUDE_JVMCI


< prev index next >