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

Unified Diff: base/trace_event/heap_profiler_heap_dump_writer.h

Issue 1911643002: Add configurable limit to allocations in heap profiler. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Whitespace change Created 4 years, 7 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 | base/trace_event/heap_profiler_heap_dump_writer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/trace_event/heap_profiler_heap_dump_writer.h
diff --git a/base/trace_event/heap_profiler_heap_dump_writer.h b/base/trace_event/heap_profiler_heap_dump_writer.h
index 88fb86f523ba0275afbf4839bde3dc46e64581b2..6e9d29de8782a1258ab70f01b61c106c7eb63661 100644
--- a/base/trace_event/heap_profiler_heap_dump_writer.h
+++ b/base/trace_event/heap_profiler_heap_dump_writer.h
@@ -18,6 +18,7 @@
namespace base {
namespace trace_event {
+class MemoryDumpSessionState;
class StackFrameDeduplicator;
class TracedValue;
class TypeNameDeduplicator;
@@ -28,8 +29,7 @@ class TypeNameDeduplicator;
// number of entries is kept reasonable because long tails are not included.
BASE_EXPORT std::unique_ptr<TracedValue> ExportHeapDump(
const hash_map<AllocationContext, AllocationMetrics>& metrics_by_context,
- StackFrameDeduplicator* stack_frame_deduplicator,
- TypeNameDeduplicator* type_name_deduplicator);
+ const MemoryDumpSessionState& session_state);
namespace internal {
@@ -62,11 +62,13 @@ BASE_EXPORT std::unique_ptr<TracedValue> Serialize(const std::set<Entry>& dump);
// used as a one-shot local instance on the stack.
class BASE_EXPORT HeapDumpWriter {
public:
- // The |StackFrameDeduplicator| and |TypeNameDeduplicator| are not owned. The
- // heap dump writer assumes exclusive access to them during the lifetime of
- // the dump writer.
+ // The |stack_frame_deduplicator| and |type_name_deduplicator| are not owned.
+ // The heap dump writer assumes exclusive access to them during the lifetime
+ // of the dump writer. The heap dumps are broken down for allocations bigger
+ // than |breakdown_threshold_bytes|.
HeapDumpWriter(StackFrameDeduplicator* stack_frame_deduplicator,
- TypeNameDeduplicator* type_name_deduplicator);
+ TypeNameDeduplicator* type_name_deduplicator,
+ uint32_t breakdown_threshold_bytes);
~HeapDumpWriter();
@@ -97,6 +99,10 @@ class BASE_EXPORT HeapDumpWriter {
// dump writer instance.
TypeNameDeduplicator* const type_name_deduplicator_;
+ // Minimum size of an allocation for which an allocation bucket will be
+ // broken down with children.
+ uint32_t breakdown_threshold_bytes_;
+
DISALLOW_COPY_AND_ASSIGN(HeapDumpWriter);
};
« no previous file with comments | « no previous file | base/trace_event/heap_profiler_heap_dump_writer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698