| Index: runtime/vm/heap.cc
|
| diff --git a/runtime/vm/heap.cc b/runtime/vm/heap.cc
|
| index 6897af855dca5ad0601c1bf042e8735316386458..cf53c7b196840d96b24e86ec78fc4ae837d27477 100644
|
| --- a/runtime/vm/heap.cc
|
| +++ b/runtime/vm/heap.cc
|
| @@ -312,11 +312,12 @@ RawObject* Heap::FindObject(FindObjectVisitor* visitor) const {
|
| void Heap::CollectGarbage(Space space,
|
| ApiCallbacks api_callbacks,
|
| GCReason reason) {
|
| + Thread* thread = Thread::Current();
|
| TIMERSCOPE(isolate(), time_gc);
|
| bool invoke_api_callbacks = (api_callbacks == kInvokeApiCallbacks);
|
| switch (space) {
|
| case kNew: {
|
| - VMTagScope tagScope(isolate(), VMTag::kGCNewSpaceTagId);
|
| + VMTagScope tagScope(thread, VMTag::kGCNewSpaceTagId);
|
| TimelineDurationScope tds(isolate(),
|
| isolate()->GetGCStream(),
|
| "CollectNewGeneration");
|
| @@ -335,7 +336,7 @@ void Heap::CollectGarbage(Space space,
|
| }
|
| case kOld:
|
| case kCode: {
|
| - VMTagScope tagScope(isolate(), VMTag::kGCOldSpaceTagId);
|
| + VMTagScope tagScope(thread, VMTag::kGCOldSpaceTagId);
|
| TimelineDurationScope tds(isolate(),
|
| isolate()->GetGCStream(),
|
| "CollectOldGeneration");
|
| @@ -373,9 +374,10 @@ void Heap::CollectGarbage(Space space) {
|
|
|
|
|
| void Heap::CollectAllGarbage() {
|
| + Thread* thread = Thread::Current();
|
| TIMERSCOPE(isolate(), time_gc);
|
| {
|
| - VMTagScope tagScope(isolate(), VMTag::kGCNewSpaceTagId);
|
| + VMTagScope tagScope(thread, VMTag::kGCNewSpaceTagId);
|
| TimelineDurationScope tds(isolate(),
|
| isolate()->GetGCStream(),
|
| "CollectNewGeneration");
|
| @@ -388,7 +390,7 @@ void Heap::CollectAllGarbage() {
|
| PrintStats();
|
| }
|
| {
|
| - VMTagScope tagScope(isolate(), VMTag::kGCOldSpaceTagId);
|
| + VMTagScope tagScope(thread, VMTag::kGCOldSpaceTagId);
|
| TimelineDurationScope tds(isolate(),
|
| isolate()->GetGCStream(),
|
| "CollectOldGeneration");
|
|
|