419 run_compilation = 1,
420 shutdown_compilaton = 2
421 };
422
423 static bool should_compile_new_jobs() { return UseCompiler && (_should_compile_new_jobs == run_compilation); }
424 static bool set_should_compile_new_jobs(jint new_state) {
425 // Return success if the current caller set it
426 jint old = Atomic::cmpxchg(new_state, &_should_compile_new_jobs, 1-new_state);
427 return (old == (1-new_state));
428 }
429
430 static void disable_compilation_forever() {
431 UseCompiler = false;
432 AlwaysCompileLoopMethods = false;
433 Atomic::xchg(shutdown_compilaton, &_should_compile_new_jobs);
434 }
435
436 static bool is_compilation_disabled_forever() {
437 return _should_compile_new_jobs == shutdown_compilaton;
438 }
439 static void handle_full_code_cache();
440 // Ensures that warning is only printed once.
441 static bool should_print_compiler_warning() {
442 jint old = Atomic::cmpxchg(1, &_print_compilation_warning, 0);
443 return old == 0;
444 }
445 // Return total compilation ticks
446 static jlong total_compilation_ticks() {
447 return _perf_total_compilation != NULL ? _perf_total_compilation->get_value() : 0;
448 }
449
450 // Redefine Classes support
451 static void mark_on_stack();
452
453 // Print a detailed accounting of compilation time
454 static void print_times();
455
456 // Debugging output for failure
457 static void print_last_compile();
458
459 static void print_compiler_threads_on(outputStream* st);
|
419 run_compilation = 1,
420 shutdown_compilaton = 2
421 };
422
423 static bool should_compile_new_jobs() { return UseCompiler && (_should_compile_new_jobs == run_compilation); }
424 static bool set_should_compile_new_jobs(jint new_state) {
425 // Return success if the current caller set it
426 jint old = Atomic::cmpxchg(new_state, &_should_compile_new_jobs, 1-new_state);
427 return (old == (1-new_state));
428 }
429
430 static void disable_compilation_forever() {
431 UseCompiler = false;
432 AlwaysCompileLoopMethods = false;
433 Atomic::xchg(shutdown_compilaton, &_should_compile_new_jobs);
434 }
435
436 static bool is_compilation_disabled_forever() {
437 return _should_compile_new_jobs == shutdown_compilaton;
438 }
439 static void handle_full_code_cache(int code_blob_type);
440 // Ensures that warning is only printed once.
441 static bool should_print_compiler_warning() {
442 jint old = Atomic::cmpxchg(1, &_print_compilation_warning, 0);
443 return old == 0;
444 }
445 // Return total compilation ticks
446 static jlong total_compilation_ticks() {
447 return _perf_total_compilation != NULL ? _perf_total_compilation->get_value() : 0;
448 }
449
450 // Redefine Classes support
451 static void mark_on_stack();
452
453 // Print a detailed accounting of compilation time
454 static void print_times();
455
456 // Debugging output for failure
457 static void print_last_compile();
458
459 static void print_compiler_threads_on(outputStream* st);
|