| 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..ea67309868c27bc3df925c543483988ef52af5a8 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,10 @@ 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.
|
| - HeapDumpWriter(StackFrameDeduplicator* stack_frame_deduplicator,
|
| - TypeNameDeduplicator* type_name_deduplicator);
|
| + // The |session_state| is used to retrieve |stack_frame_deduplicator_| and
|
| + // |type_name_deduplicator_|, which are not owned. The heap dump writer
|
| + // assumes exclusive access to them during the lifetime of the dump writer.
|
| + HeapDumpWriter(const MemoryDumpSessionState& session_state);
|
|
|
| ~HeapDumpWriter();
|
|
|
| @@ -97,6 +96,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);
|
| };
|
|
|
|
|