Chromium Code Reviews| Index: runtime/vm/heap.cc |
| diff --git a/runtime/vm/heap.cc b/runtime/vm/heap.cc |
| index 6c9a7d1d858613cd89848ffcb6d9fb2edb4d0101..08fd72acbd203360f36087b5d99f8c20d6a74564 100644 |
| --- a/runtime/vm/heap.cc |
| +++ b/runtime/vm/heap.cc |
| @@ -178,17 +178,17 @@ void Heap::CollectGarbage(Space space, ApiCallbacks api_callbacks) { |
| bool invoke_api_callbacks = (api_callbacks == kInvokeApiCallbacks); |
| switch (space) { |
| case kNew: |
| - new_space_->Scavenge(invoke_api_callbacks); |
| + new_space_->Scavenge(invoke_api_callbacks, "new space"); |
| if (new_space_->HadPromotionFailure()) { |
| - old_space_->MarkSweep(true); |
| + old_space_->MarkSweep(true, "promotion failure"); |
| } |
| break; |
| case kOld: |
| - old_space_->MarkSweep(invoke_api_callbacks); |
| + old_space_->MarkSweep(invoke_api_callbacks, "old space"); |
| break; |
| case kCode: |
| UNIMPLEMENTED(); |
| - code_space_->MarkSweep(invoke_api_callbacks); |
| + code_space_->MarkSweep(invoke_api_callbacks, "code space"); |
|
siva
2012/08/27 16:54:49
Can we list these reasons in heap.h as static cons
Ivan Posva
2012/08/27 22:04:23
I like the suggestion of having the different reas
|
| break; |
| default: |
| UNREACHABLE(); |
| @@ -211,10 +211,10 @@ void Heap::CollectGarbage(Space space) { |
| void Heap::CollectAllGarbage() { |
| - new_space_->Scavenge(kInvokeApiCallbacks); |
| - old_space_->MarkSweep(kInvokeApiCallbacks); |
| + new_space_->Scavenge(kInvokeApiCallbacks, "full"); |
| + old_space_->MarkSweep(kInvokeApiCallbacks, "full"); |
| // TODO(iposva): Merge old and code space. |
| - // code_space_->MarkSweep(kInvokeApiCallbacks); |
| + // code_space_->MarkSweep(kInvokeApiCallbacks, "full"); |
| if (FLAG_verbose_gc) { |
| PrintSizes(); |
| } |