Skip to content

Commit

Permalink
Merge pull request #7058 from kangyining/monotonic_time
Browse files Browse the repository at this point in the history
Use omrtime_hires_clock() for monotonic time when necessary in gc
  • Loading branch information
babsingh authored Jul 12, 2023
2 parents fa11eca + 76772b3 commit b1af0b4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions gc/base/standard/Scavenger.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3288,7 +3288,7 @@ MM_Scavenger::getFreeCache(MM_EnvironmentStandard *env)
if (NULL == cache) {
env->_scavengerStats._scanCacheOverflow = 1;
OMRPORT_ACCESS_FROM_OMRPORT(env->getPortLibrary());
uint64_t duration = omrtime_current_time_millis();
uint64_t duration = omrtime_hires_clock();

bool resizePerformed = false;
omrthread_monitor_enter(_freeCacheMonitor);
Expand All @@ -3305,8 +3305,8 @@ MM_Scavenger::getFreeCache(MM_EnvironmentStandard *env)
/* Still need a new cache and nothing left reserved - create it in Heap */
cache = createCacheInHeap(env);
}
duration = omrtime_current_time_millis() - duration;
env->_scavengerStats._scanCacheAllocationDurationDuringSavenger += duration;
duration = omrtime_hires_clock() - duration;
env->_scavengerStats._scanCacheAllocationDurationDuringSavenger += omrtime_hires_delta(0, duration, OMRPORT_TIME_DELTA_IN_MILLISECONDS);

}

Expand Down

0 comments on commit b1af0b4

Please sign in to comment.