comparison src/share/vm/runtime/compilationPolicy.cpp @ 7154:5d0bb7d52783

changes to support Graal co-existing with the other HotSpot compiler(s) and being used for explicit compilation requests and code installation via the Graal API
author Doug Simon <doug.simon@oracle.com>
date Wed, 12 Dec 2012 21:36:40 +0100
parents 1baf7f1e3f23
children 8a3efb8c831d
comparison
equal deleted inserted replaced
7153:c421c19b7bf8 7154:5d0bb7d52783
58 case 0: 58 case 0:
59 CompilationPolicy::set_policy(new SimpleCompPolicy()); 59 CompilationPolicy::set_policy(new SimpleCompPolicy());
60 break; 60 break;
61 61
62 case 1: 62 case 1:
63 #if defined(COMPILER2) || defined(GRAAL) 63 #if defined(COMPILER2)
64 CompilationPolicy::set_policy(new StackWalkCompPolicy()); 64 CompilationPolicy::set_policy(new StackWalkCompPolicy());
65 #else 65 #else
66 Unimplemented(); 66 Unimplemented();
67 #endif 67 #endif
68 break; 68 break;
79 #else 79 #else
80 Unimplemented(); 80 Unimplemented();
81 #endif 81 #endif
82 break; 82 break;
83 case 4: 83 case 4:
84 #if defined(GRAAL) 84 #if defined(GRAALVM)
85 CompilationPolicy::set_policy(new GraalCompPolicy()); 85 CompilationPolicy::set_policy(new GraalCompPolicy());
86 #else 86 #else
87 Unimplemented(); 87 Unimplemented();
88 #endif 88 #endif
89 break; 89 break;
186 return 0; 186 return 0;
187 } 187 }
188 #endif 188 #endif
189 189
190 #ifdef COMPILER1 190 #ifdef COMPILER1
191 GRAAL_ONLY(ShouldNotReachHere();) 191 GRAALVM_ONLY(ShouldNotReachHere();)
192 if (is_c1_compile(comp_level)) { 192 if (is_c1_compile(comp_level)) {
193 return _compiler_count; 193 return _compiler_count;
194 } else { 194 } else {
195 return 0; 195 return 0;
196 } 196 }
440 } 440 }
441 } 441 }
442 442
443 // GraalCompPolicy - compile current method 443 // GraalCompPolicy - compile current method
444 444
445 #ifdef GRAAL 445 #ifdef GRAALVM
446 446
447 void GraalCompPolicy::method_invocation_event(methodHandle m, JavaThread* thread) { 447 void GraalCompPolicy::method_invocation_event(methodHandle m, JavaThread* thread) {
448 int hot_count = m->invocation_count(); 448 int hot_count = m->invocation_count();
449 jlong hot_time = m->graal_invocation_time(); 449 jlong hot_time = m->graal_invocation_time();
450 reset_counter_for_invocation_event(m); 450 reset_counter_for_invocation_event(m);
497 m, hot_count, comment, thread); 497 m, hot_count, comment, thread);
498 NOT_PRODUCT(trace_osr_completion(m->lookup_osr_nmethod_for(bci, CompLevel_highest_tier, true));) 498 NOT_PRODUCT(trace_osr_completion(m->lookup_osr_nmethod_for(bci, CompLevel_highest_tier, true));)
499 } 499 }
500 } 500 }
501 501
502 #endif // GRAAL 502 #endif // GRAALVM
503 503
504 504
505 // StackWalkCompPolicy - walk up stack to find a suitable method to compile 505 // StackWalkCompPolicy - walk up stack to find a suitable method to compile
506 506
507 #if defined(COMPILER2) || defined(GRAAL) 507 #if defined(COMPILER2)
508 const char* StackWalkCompPolicy::_msg = NULL; 508 const char* StackWalkCompPolicy::_msg = NULL;
509 509
510 510
511 // Consider m for compilation 511 // Consider m for compilation
512 void StackWalkCompPolicy::method_invocation_event(methodHandle m, JavaThread* thread) { 512 void StackWalkCompPolicy::method_invocation_event(methodHandle m, JavaThread* thread) {
729 return NULL; 729 return NULL;
730 } 730 }
731 731
732 732
733 733
734 #endif // COMPILER2 || GRAAL 734 #endif // COMPILER2