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

Unified Diff: runtime/vm/malloc_hooks.h

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
Index: runtime/vm/malloc_hooks.h
diff --git a/runtime/vm/malloc_hooks.h b/runtime/vm/malloc_hooks.h
index 852c7992ec80c696b37a8d35ea0a0afa256fe3b4..f1e82a0771f4b1eddbfae10fa60c411082bb8464 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;
zra 2017/02/15 05:50:46 is this from vm/profiler.h? I'd prefer doing the #
bkonyi 2017/02/16 00:28:28 Seems to be that there's a cycle created when incl
+
+class MallocHooks : public AllStatic {
public:
static void InitOnce();
static void TearDown();
+ static bool ProfilingEnabled();
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