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

Unified Diff: runtime/vm/malloc_hooks.h

Issue 2680213002: Updated MallocHooks to collect stack traces when memory is allocated. (Closed)
Patch Set: Rough first patch 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..597cc11d6c8baea5538b906eaea8f7b3793c0a05 100644
--- a/runtime/vm/malloc_hooks.h
+++ b/runtime/vm/malloc_hooks.h
@@ -7,21 +7,22 @@
#include "vm/globals.h"
zra 2017/02/08 17:42:55 #include "vm/allocation.h" for AllStatic
bkonyi 2017/02/09 21:22:46 Done.
+
namespace dart {
-class MallocHooks {
+class Sample;
+
+class MallocHooks : public AllStatic {
public:
static void InitOnce();
static void TearDown();
+ static bool stack_trace_collection_enabled();
zra 2017/02/08 17:42:55 Maybe ProfilingEnabled()
bkonyi 2017/02/09 21:22:46 Done.
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

Powered by Google App Engine
This is Rietveld 408576698