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

Unified Diff: runtime/vm/dart.cc

Issue 2680213002: Updated MallocHooks to collect stack traces when memory is allocated. (Closed)
Patch Set: Added tests and modified stack walker to allow for skipping an arbitrary number of frames before co… Created 3 years, 10 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/hash_map.h » ('j') | runtime/vm/malloc_hooks.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/dart.cc
diff --git a/runtime/vm/dart.cc b/runtime/vm/dart.cc
index 916e81bb14824779a26edcc42172197091448e00..94111a5f9ff67658b3511f0dd6ef67f3ab490f2c 100644
--- a/runtime/vm/dart.cc
+++ b/runtime/vm/dart.cc
@@ -152,7 +152,6 @@ char* Dart::InitOnce(const uint8_t* vm_isolate_snapshot,
start_time_micros_ = OS::GetCurrentMonotonicMicros();
VirtualMemory::InitOnce();
OSThread::InitOnce();
- MallocHooks::InitOnce();
if (FLAG_support_timeline) {
Timeline::InitOnce();
}
@@ -233,6 +232,8 @@ char* Dart::InitOnce(const uint8_t* vm_isolate_snapshot,
return strdup("Precompiled runtime requires a precompiled snapshot");
#else
StubCode::InitOnce();
+ // MallocHooks can't be initialized until StubCode has been.
Cutch 2017/02/15 08:21:00 maybe add why?
bkonyi 2017/02/16 00:28:28 Done.
+ MallocHooks::InitOnce();
#endif
} else {
return strdup("Invalid vm isolate snapshot seen");
@@ -271,6 +272,8 @@ char* Dart::InitOnce(const uint8_t* vm_isolate_snapshot,
#else
vm_snapshot_kind_ = Snapshot::kNone;
StubCode::InitOnce();
+ // Malloc hooks can't be initialized until StubCode has been.
+ MallocHooks::InitOnce();
zra 2017/02/15 05:50:45 Maybe add a TODO to separate initialization of the
bkonyi 2017/02/16 00:28:28 Done.
Symbols::InitOnce(vm_isolate_);
#endif
}
« no previous file with comments | « no previous file | runtime/vm/hash_map.h » ('j') | runtime/vm/malloc_hooks.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698