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

Unified Diff: runtime/vm/malloc_hooks.h

Issue 2680213002: Updated MallocHooks to collect stack traces when memory is allocated. (Closed)
Patch Set: Rough patch: addressed initial comments + converted sample filters from using Isolates to Dart_Port… 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
Index: runtime/vm/malloc_hooks.h
diff --git a/runtime/vm/malloc_hooks.h b/runtime/vm/malloc_hooks.h
index 852c7992ec80c696b37a8d35ea0a0afa256fe3b4..4c2419c74f0e30b88105087939bbf6372c7a441d 100644
--- a/runtime/vm/malloc_hooks.h
+++ b/runtime/vm/malloc_hooks.h
@@ -7,21 +7,23 @@
#include "vm/globals.h"
+#include "vm/allocation.h"
+
namespace dart {
-class MallocHooks {
+class Sample;
+
+class MallocHooks : public AllStatic {
public:
static void InitOnce();
static void TearDown();
+ static bool stack_trace_collection_enabled();
static void ResetStats();
static bool Initialized();
+ static Sample* GetSample(const void* ptr);
static intptr_t allocation_count();
static intptr_t heap_allocated_memory_in_bytes();
-
- private:
- DISALLOW_ALLOCATION();
- DISALLOW_IMPLICIT_CONSTRUCTORS(MallocHooks);
};
} // namespace dart
« no previous file with comments | « runtime/vm/dart.cc ('k') | runtime/vm/malloc_hooks.cc » ('j') | runtime/vm/malloc_hooks.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698