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

Unified Diff: runtime/vm/pages.cc

Issue 2771013002: Add more safe points in compiler (Closed)
Patch Set: Add a safe point in the zone allocator Created 3 years, 9 months 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
Index: runtime/vm/pages.cc
diff --git a/runtime/vm/pages.cc b/runtime/vm/pages.cc
index 9768bc5f2510fad9045046e9a9564144c5968753..40c9c06883141fed0ae6aac3fa608a51e4f81a3b 100644
--- a/runtime/vm/pages.cc
+++ b/runtime/vm/pages.cc
@@ -849,6 +849,8 @@ void PageSpace::MarkSweep(bool invoke_api_callbacks) {
Isolate* isolate = heap_->isolate();
ASSERT(isolate == Isolate::Current());
+ const int64_t pre_safe_point = OS::GetCurrentMonotonicMicros();
+
// Wait for pending tasks to complete and then account for the driver task.
{
MonitorLocker locker(tasks_lock());
@@ -991,6 +993,7 @@ void PageSpace::MarkSweep(bool invoke_api_callbacks) {
page_space_controller_.EvaluateGarbageCollection(
usage_before, GetCurrentUsage(), start, end);
+ heap_->RecordTime(kSafePoint, start - pre_safe_point);
heap_->RecordTime(kMarkObjects, mid1 - start);
heap_->RecordTime(kResetFreeLists, mid2 - mid1);
heap_->RecordTime(kSweepPages, mid3 - mid2);

Powered by Google App Engine
This is Rietveld 408576698