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

Unified Diff: src/heap/heap.cc

Issue 1058253003: Adding V8 api to get memory statistics of spaces in V8::Heap. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fixing jochen's comments. Created 5 years, 8 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
« no previous file with comments | « src/heap/heap.h ('k') | src/heap/spaces.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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());
« no previous file with comments | « src/heap/heap.h ('k') | src/heap/spaces.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698