comparison src/share/vm/runtime/compilationPolicy.cpp @ 14909:4ca6dc0799b6

Backout jdk9 merge
author Gilles Duboscq <duboscq@ssw.jku.at>
date Tue, 01 Apr 2014 13:57:07 +0200
parents 10c4df6767c4
children 0926a952ba55
comparison
equal deleted inserted replaced
14908:8db6e76cb658 14909:4ca6dc0799b6
235 235
236 assert(!m->was_never_executed(), "don't reset to 0 -- could be mistaken for never-executed"); 236 assert(!m->was_never_executed(), "don't reset to 0 -- could be mistaken for never-executed");
237 } 237 }
238 238
239 void NonTieredCompPolicy::reset_counter_for_back_branch_event(methodHandle m) { 239 void NonTieredCompPolicy::reset_counter_for_back_branch_event(methodHandle m) {
240 // Delay next back-branch event but pump up invocation counter to trigger 240 // Delay next back-branch event but pump up invocation counter to triger
241 // whole method compilation. 241 // whole method compilation.
242 MethodCounters* mcs = m->method_counters(); 242 MethodCounters* mcs = m->method_counters();
243 assert(mcs != NULL, "MethodCounters cannot be NULL for profiling"); 243 assert(mcs != NULL, "MethodCounters cannot be NULL for profiling");
244 InvocationCounter* i = mcs->invocation_counter(); 244 InvocationCounter* i = mcs->invocation_counter();
245 InvocationCounter* b = mcs->backedge_counter(); 245 InvocationCounter* b = mcs->backedge_counter();
253 } 253 }
254 254
255 // 255 //
256 // CounterDecay 256 // CounterDecay
257 // 257 //
258 // Iterates through invocation counters and decrements them. This 258 // Interates through invocation counters and decrements them. This
259 // is done at each safepoint. 259 // is done at each safepoint.
260 // 260 //
261 class CounterDecay : public AllStatic { 261 class CounterDecay : public AllStatic {
262 static jlong _last_timestamp; 262 static jlong _last_timestamp;
263 static void do_method(Method* m) { 263 static void do_method(Method* m) {
323 mcs->backedge_counter()->reset(); 323 mcs->backedge_counter()->reset();
324 } 324 }
325 } 325 }
326 326
327 // This method can be called by any component of the runtime to notify the policy 327 // This method can be called by any component of the runtime to notify the policy
328 // that it's recommended to delay the compilation of this method. 328 // that it's recommended to delay the complation of this method.
329 void NonTieredCompPolicy::delay_compilation(Method* method) { 329 void NonTieredCompPolicy::delay_compilation(Method* method) {
330 MethodCounters* mcs = method->method_counters(); 330 MethodCounters* mcs = method->method_counters();
331 if (mcs != NULL) { 331 if (mcs != NULL) {
332 mcs->invocation_counter()->decay(); 332 mcs->invocation_counter()->decay();
333 mcs->backedge_counter()->decay(); 333 mcs->backedge_counter()->decay();