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

Unified Diff: runtime/vm/dart.cc

Issue 2713803003: Revert "Updated MallocHooks to collect stack traces when memory is allocated." (Closed)
Patch Set: 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 | « runtime/vm/benchmark_test.h ('k') | runtime/vm/hash_map.h » ('j') | no next file with comments »
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 83b1055b308621580006287e09e58a33d60212dd..07cdcdc1fd4d5662ec39a65224617601e2f64bcf 100644
--- a/runtime/vm/dart.cc
+++ b/runtime/vm/dart.cc
@@ -152,6 +152,7 @@ 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();
}
@@ -232,13 +233,6 @@ 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 since stack
- // trace generation relies on stub methods that are generated in
- // StubCode::InitOnce().
- // TODO(bkonyi) Split initialization for stack trace collection from the
- // initialization for the actual malloc hooks to increase accuracy of
- // memory consumption statistics.
- MallocHooks::InitOnce();
#endif
} else {
return strdup("Invalid vm isolate snapshot seen");
@@ -277,13 +271,6 @@ char* Dart::InitOnce(const uint8_t* vm_isolate_snapshot,
#else
vm_snapshot_kind_ = Snapshot::kNone;
StubCode::InitOnce();
- // MallocHooks can't be initialized until StubCode has been since stack
- // trace generation relies on stub methods that are generated in
- // StubCode::InitOnce().
- // TODO(bkonyi) Split initialization for stack trace collection from the
- // initialization for the actual malloc hooks to increase accuracy of
- // memory consumption statistics.
- MallocHooks::InitOnce();
Symbols::InitOnce(vm_isolate_);
#endif
}
« no previous file with comments | « runtime/vm/benchmark_test.h ('k') | runtime/vm/hash_map.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698