| Index: runtime/vm/scavenger.cc
|
| diff --git a/runtime/vm/scavenger.cc b/runtime/vm/scavenger.cc
|
| index f728f6b967aba3b50bd1975f3de77c8f7516cd3b..7887d4f27a01dc1dde130dbdbc6f6319672baad9 100644
|
| --- a/runtime/vm/scavenger.cc
|
| +++ b/runtime/vm/scavenger.cc
|
| @@ -781,6 +781,9 @@ void Scavenger::Scavenge(bool invoke_api_callbacks) {
|
| // will continue with its scavenge after waiting for the winner to complete.
|
| // TODO(koda): Consider moving SafepointThreads into allocation failure/retry
|
| // logic to avoid needless collections.
|
| +
|
| + int64_t pre_safe_point = OS::GetCurrentMonotonicMicros();
|
| +
|
| Thread* thread = Thread::Current();
|
| SafepointOperationScope safepoint_scope(thread);
|
|
|
| @@ -791,6 +794,9 @@ void Scavenger::Scavenge(bool invoke_api_callbacks) {
|
| PageSpace* page_space = heap_->old_space();
|
| NoSafepointScope no_safepoints;
|
|
|
| + int64_t post_safe_point = OS::GetCurrentMonotonicMicros();
|
| + heap_->RecordTime(kSafePoint, post_safe_point - pre_safe_point);
|
| +
|
| // TODO(koda): Make verification more compatible with concurrent sweep.
|
| if (FLAG_verify_before_gc && !FLAG_concurrent_sweep) {
|
| OS::PrintErr("Verifying before Scavenge...");
|
|
|