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

Side by Side Diff: base/trace_event/heap_profiler_heap_dump_writer.cc

Issue 2582453002: [tracing] Implement polling in MemoryDumpManager (Closed)
Patch Set: doc link and fix test. 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 unified diff | Download patch
« no previous file with comments | « base/BUILD.gn ('k') | base/trace_event/memory_dump_manager.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
OLDNEW
« no previous file with comments | « base/BUILD.gn ('k') | base/trace_event/memory_dump_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698