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

Unified Diff: runtime/vm/scavenger.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 | « runtime/vm/pages.cc ('k') | runtime/vm/scope_timer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/scavenger.cc
diff --git a/runtime/vm/scavenger.cc b/runtime/vm/scavenger.cc
index 740f0b79362c888575ca27278bd112a6b81d561a..1ca9e3f04ba05d237a8cca5f9d478aa093eec635 100644
--- a/runtime/vm/scavenger.cc
+++ b/runtime/vm/scavenger.cc
@@ -504,13 +504,13 @@ void Scavenger::IterateObjectIdTable(Isolate* isolate,
void Scavenger::IterateRoots(Isolate* isolate, ScavengerVisitor* visitor) {
- int64_t start = OS::GetCurrentTimeMicros();
+ int64_t start = OS::GetCurrentMonotonicMicros();
isolate->VisitObjectPointers(visitor,
StackFrameIterator::kDontValidateFrames);
- int64_t middle = OS::GetCurrentTimeMicros();
+ int64_t middle = OS::GetCurrentMonotonicMicros();
IterateStoreBuffers(isolate, visitor);
IterateObjectIdTable(isolate, visitor);
- int64_t end = OS::GetCurrentTimeMicros();
+ int64_t end = OS::GetCurrentMonotonicMicros();
heap_->RecordData(kToKBAfterStoreBuffer, RoundWordsToKB(UsedInWords()));
heap_->RecordTime(kVisitIsolateRoots, middle - start);
heap_->RecordTime(kIterateStoreBuffers, end - middle);
@@ -808,9 +808,9 @@ void Scavenger::Scavenge(bool invoke_api_callbacks) {
ScavengerVisitor visitor(isolate, this, from);
page_space->AcquireDataLock();
IterateRoots(isolate, &visitor);
- int64_t start = OS::GetCurrentTimeMicros();
+ int64_t start = OS::GetCurrentMonotonicMicros();
ProcessToSpace(&visitor);
- int64_t middle = OS::GetCurrentTimeMicros();
+ int64_t middle = OS::GetCurrentMonotonicMicros();
{
TIMELINE_FUNCTION_GC_DURATION(thread, "WeakHandleProcessing");
if (FLAG_background_finalization) {
@@ -831,7 +831,7 @@ void Scavenger::Scavenge(bool invoke_api_callbacks) {
page_space->ReleaseDataLock();
// Scavenge finished. Run accounting.
- int64_t end = OS::GetCurrentTimeMicros();
+ int64_t end = OS::GetCurrentMonotonicMicros();
heap_->RecordTime(kProcessToSpace, middle - start);
heap_->RecordTime(kIterateWeaks, end - middle);
stats_history_.Add(ScavengeStats(
« no previous file with comments | « runtime/vm/pages.cc ('k') | runtime/vm/scope_timer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698