OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "base/trace_event/heap_profiler_heap_dump_writer.h" | 5 #include "base/trace_event/heap_profiler_heap_dump_writer.h" |
6 | 6 |
7 #include <stdint.h> | 7 #include <stdint.h> |
8 | 8 |
9 #include <algorithm> | 9 #include <algorithm> |
10 #include <iterator> | 10 #include <iterator> |
(...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
307 } | 307 } |
308 | 308 |
309 } // namespace internal | 309 } // namespace internal |
310 | 310 |
311 std::unique_ptr<TracedValue> ExportHeapDump( | 311 std::unique_ptr<TracedValue> ExportHeapDump( |
312 const hash_map<AllocationContext, AllocationMetrics>& metrics_by_context, | 312 const hash_map<AllocationContext, AllocationMetrics>& metrics_by_context, |
313 const MemoryDumpSessionState& session_state) { | 313 const MemoryDumpSessionState& session_state) { |
314 internal::HeapDumpWriter writer( | 314 internal::HeapDumpWriter writer( |
315 session_state.stack_frame_deduplicator(), | 315 session_state.stack_frame_deduplicator(), |
316 session_state.type_name_deduplicator(), | 316 session_state.type_name_deduplicator(), |
317 session_state.memory_dump_config().heap_profiler_options | 317 session_state.heap_profiler_breakdown_threshold_bytes()); |
318 .breakdown_threshold_bytes); | |
319 return Serialize(writer.Summarize(metrics_by_context)); | 318 return Serialize(writer.Summarize(metrics_by_context)); |
320 } | 319 } |
321 | 320 |
322 } // namespace trace_event | 321 } // namespace trace_event |
323 } // namespace base | 322 } // namespace base |
OLD | NEW |