Index: src/heap/heap.cc |
diff --git a/src/heap/heap.cc b/src/heap/heap.cc |
index 6ee6c094bd05ebefb228697f0ca778e3b94ff906..76902fa0dde2d8857ade85faf6d3c6bb5724a83c 100644 |
--- a/src/heap/heap.cc |
+++ b/src/heap/heap.cc |
@@ -452,6 +452,25 @@ intptr_t Heap::SizeOfObjects() { |
} |
+const char* Heap::GetSpaceName(int idx) { |
+ switch (idx) { |
+ case NEW_SPACE: |
+ return "new_space"; |
+ case OLD_SPACE: |
+ return "old_space"; |
+ case MAP_SPACE: |
+ return "map_space"; |
+ case CODE_SPACE: |
+ return "code_space"; |
+ case LO_SPACE: |
+ return "large_object_space"; |
+ default: |
+ UNREACHABLE(); |
+ } |
+ return nullptr; |
+} |
+ |
+ |
void Heap::ClearAllICsByKind(Code::Kind kind) { |
HeapObjectIterator it(code_space()); |