Mercurial > hg > truffle
comparison src/share/vm/runtime/compilationPolicy.cpp @ 8151:b8f261ba79c6
Minimize diff to plain HotSpot version.
author | Thomas Wuerthinger <thomas.wuerthinger@oracle.com> |
---|---|
date | Thu, 07 Mar 2013 21:00:29 +0100 |
parents | bbf97d6688d3 |
children | 89e4d67fdd2a |
comparison
equal
deleted
inserted
replaced
8150:b66f831ac5ab | 8151:b8f261ba79c6 |
---|---|
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) | 63 #ifdef 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(GRAALVM) | 84 #ifdef 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 GRAALVM_ONLY(ShouldNotReachHere();) | |
192 if (is_c1_compile(comp_level)) { | 191 if (is_c1_compile(comp_level)) { |
193 return _compiler_count; | 192 return _compiler_count; |
194 } else { | 193 } else { |
195 return 0; | 194 return 0; |
196 } | 195 } |
210 | 209 |
211 assert(!m->was_never_executed(), "don't reset to 0 -- could be mistaken for never-executed"); | 210 assert(!m->was_never_executed(), "don't reset to 0 -- could be mistaken for never-executed"); |
212 } | 211 } |
213 | 212 |
214 void NonTieredCompPolicy::reset_counter_for_back_branch_event(methodHandle m) { | 213 void NonTieredCompPolicy::reset_counter_for_back_branch_event(methodHandle m) { |
215 // GRAAL_ONLY(assert(false, "unexpected")); | |
216 // Delay next back-branch event but pump up invocation counter to triger | 214 // Delay next back-branch event but pump up invocation counter to triger |
217 // whole method compilation. | 215 // whole method compilation. |
218 InvocationCounter* i = m->invocation_counter(); | 216 InvocationCounter* i = m->invocation_counter(); |
219 InvocationCounter* b = m->backedge_counter(); | 217 InvocationCounter* b = m->backedge_counter(); |
220 | 218 |
508 #endif // GRAALVM | 506 #endif // GRAALVM |
509 | 507 |
510 | 508 |
511 // StackWalkCompPolicy - walk up stack to find a suitable method to compile | 509 // StackWalkCompPolicy - walk up stack to find a suitable method to compile |
512 | 510 |
513 #if defined(COMPILER2) | 511 #ifdef COMPILER2 |
514 const char* StackWalkCompPolicy::_msg = NULL; | 512 const char* StackWalkCompPolicy::_msg = NULL; |
515 | 513 |
516 | 514 |
517 // Consider m for compilation | 515 // Consider m for compilation |
518 void StackWalkCompPolicy::method_invocation_event(methodHandle m, JavaThread* thread) { | 516 void StackWalkCompPolicy::method_invocation_event(methodHandle m, JavaThread* thread) { |