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

Unified Diff: runtime/vm/heap.cc

Issue 2955493002: Allocate the profiler sample buffer and zone segments with virtual memory instead of malloc. (Closed)
Patch Set: . 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 | « no previous file | runtime/vm/profiler.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 94d702fe3b7d11e77e89d343ac896edd8cefd065..282272cc9f57504640381e4674456be9a9666eaa 100644
--- a/runtime/vm/heap.cc
+++ b/runtime/vm/heap.cc
@@ -525,9 +525,21 @@ void Heap::RegionName(Heap* heap, Space space, char* name, intptr_t name_size) {
(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);
+ const char* space_name = NULL;
+ switch (space) {
+ case kNew:
+ space_name = "newspace";
+ break;
+ case kOld:
+ space_name = "oldspace";
+ break;
+ case kCode:
+ space_name = "codespace";
+ break;
+ default:
+ UNREACHABLE();
+ }
+ OS::SNPrint(name, name_size, "dart-%s %s", space_name, isolate_name);
}
« no previous file with comments | « no previous file | runtime/vm/profiler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698