Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(152)

Unified Diff: runtime/vm/heap.cc

Issue 2582543003: Update GC stats, ThreadPool, Timer and ScopedTimer to use monotonic time. (Closed)
Patch Set: . Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | runtime/vm/pages.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/heap.cc
diff --git a/runtime/vm/heap.cc b/runtime/vm/heap.cc
index 66aed6005cb588cad5096539cb1d18247d2e3cdd..da9e6790dab711e48223c9b4c9528e6d4d02be9b 100644
--- a/runtime/vm/heap.cc
+++ b/runtime/vm/heap.cc
@@ -693,7 +693,7 @@ void Heap::RecordBeforeGC(Space space, GCReason reason) {
stats_.num_++;
stats_.space_ = space;
stats_.reason_ = reason;
- stats_.before_.micros_ = OS::GetCurrentTimeMicros();
+ stats_.before_.micros_ = OS::GetCurrentMonotonicMicros();
stats_.before_.new_ = new_space_.GetCurrentUsage();
stats_.before_.old_ = old_space_.GetCurrentUsage();
stats_.times_[0] = 0;
@@ -708,7 +708,7 @@ void Heap::RecordBeforeGC(Space space, GCReason reason) {
void Heap::RecordAfterGC(Space space) {
- stats_.after_.micros_ = OS::GetCurrentTimeMicros();
+ stats_.after_.micros_ = OS::GetCurrentMonotonicMicros();
int64_t delta = stats_.after_.micros_ - stats_.before_.micros_;
if (stats_.space_ == kNew) {
new_space_.AddGCTime(delta);
« no previous file with comments | « no previous file | runtime/vm/pages.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698