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

Unified Diff: runtime/vm/heap.cc

Issue 2929203002: [Fuchsia] Give VMOs names (Closed)
Patch Set: Fix tests Created 3 years, 6 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 | « runtime/vm/heap.h ('k') | runtime/vm/pages.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/heap.cc
diff --git a/runtime/vm/heap.cc b/runtime/vm/heap.cc
index 4998b881cfdc1c4876e1cbf79b991a4853aaa9c1..a713a8cf8821ecc6a2134a2b7c624f1acec72bc8 100644
--- a/runtime/vm/heap.cc
+++ b/runtime/vm/heap.cc
@@ -520,6 +520,17 @@ void Heap::Init(Isolate* isolate,
}
+void Heap::RegionName(Heap* heap, Space space, char* name, intptr_t name_size) {
+ const bool no_isolate_name = (heap == NULL) || (heap->isolate() == NULL) ||
+ (heap->isolate()->debugger_name() == NULL);
+ const char* isolate_name =
+ no_isolate_name ? "<unknown>" : heap->isolate()->debugger_name();
+ const char* space_name = (space == kNew) ? "newspace" : "oldspace";
+ const char* type_name = (space == kCode) ? "code" : "data";
+ OS::SNPrint(name, name_size, "%s %s %s", isolate_name, space_name, type_name);
+}
+
+
void Heap::AddRegionsToObjectSet(ObjectSet* set) const {
new_space_.AddRegionsToObjectSet(set);
old_space_.AddRegionsToObjectSet(set);
« no previous file with comments | « runtime/vm/heap.h ('k') | runtime/vm/pages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698