src/hotspot/share/runtime/tieredThresholdPolicy.cpp
changeset 53895 b22d8ae270a2
parent 53628 213a2377b792
child 54009 13acb4339895
equal deleted inserted replaced
53894:bf1133e7dfba 53895:b22d8ae270a2
   477     return;
   477     return;
   478   }
   478   }
   479 
   479 
   480   // We don't update the rate if we've just came out of a safepoint.
   480   // We don't update the rate if we've just came out of a safepoint.
   481   // delta_s is the time since last safepoint in milliseconds.
   481   // delta_s is the time since last safepoint in milliseconds.
   482   jlong delta_s = t - SafepointSynchronize::end_of_last_safepoint();
   482   jlong delta_s = t - SafepointTracing::end_of_last_safepoint_ms();
   483   jlong delta_t = t - (m->prev_time() != 0 ? m->prev_time() : start_time()); // milliseconds since the last measurement
   483   jlong delta_t = t - (m->prev_time() != 0 ? m->prev_time() : start_time()); // milliseconds since the last measurement
   484   // How many events were there since the last time?
   484   // How many events were there since the last time?
   485   int event_count = m->invocation_count() + m->backedge_count();
   485   int event_count = m->invocation_count() + m->backedge_count();
   486   int delta_e = event_count - m->prev_event_count();
   486   int delta_e = event_count - m->prev_event_count();
   487 
   487 
   502 }
   502 }
   503 
   503 
   504 // Check if this method has been stale from a given number of milliseconds.
   504 // Check if this method has been stale from a given number of milliseconds.
   505 // See select_task().
   505 // See select_task().
   506 bool TieredThresholdPolicy::is_stale(jlong t, jlong timeout, Method* m) {
   506 bool TieredThresholdPolicy::is_stale(jlong t, jlong timeout, Method* m) {
   507   jlong delta_s = t - SafepointSynchronize::end_of_last_safepoint();
   507   jlong delta_s = t - SafepointTracing::end_of_last_safepoint_ms();
   508   jlong delta_t = t - m->prev_time();
   508   jlong delta_t = t - m->prev_time();
   509   if (delta_t > timeout && delta_s > timeout) {
   509   if (delta_t > timeout && delta_s > timeout) {
   510     int event_count = m->invocation_count() + m->backedge_count();
   510     int event_count = m->invocation_count() + m->backedge_count();
   511     int delta_e = event_count - m->prev_event_count();
   511     int delta_e = event_count - m->prev_event_count();
   512     // Return true if there were no events.
   512     // Return true if there were no events.