| 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/process_memory_dump.h" | 5 #include "base/trace_event/process_memory_dump.h" |
| 6 | 6 |
| 7 #include <errno.h> | 7 #include <errno.h> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/process/process_metrics.h" | 10 #include "base/process/process_metrics.h" |
| 11 #include "base/trace_event/process_memory_totals.h" | 11 #include "base/trace_event/process_memory_totals.h" |
| 12 #include "base/trace_event/trace_event_argument.h" | 12 #include "base/trace_event/trace_event_argument.h" |
| 13 #include "build/build_config.h" |
| 13 | 14 |
| 14 #if defined(OS_POSIX) | 15 #if defined(OS_POSIX) |
| 15 #include <sys/mman.h> | 16 #include <sys/mman.h> |
| 16 #endif | 17 #endif |
| 17 | 18 |
| 18 namespace base { | 19 namespace base { |
| 19 namespace trace_event { | 20 namespace trace_event { |
| 20 | 21 |
| 21 namespace { | 22 namespace { |
| 22 | 23 |
| (...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 246 | 247 |
| 247 void ProcessMemoryDump::AddSuballocation(const MemoryAllocatorDumpGuid& source, | 248 void ProcessMemoryDump::AddSuballocation(const MemoryAllocatorDumpGuid& source, |
| 248 const std::string& target_node_name) { | 249 const std::string& target_node_name) { |
| 249 std::string child_mad_name = target_node_name + "/__" + source.ToString(); | 250 std::string child_mad_name = target_node_name + "/__" + source.ToString(); |
| 250 MemoryAllocatorDump* target_child_mad = CreateAllocatorDump(child_mad_name); | 251 MemoryAllocatorDump* target_child_mad = CreateAllocatorDump(child_mad_name); |
| 251 AddOwnershipEdge(source, target_child_mad->guid()); | 252 AddOwnershipEdge(source, target_child_mad->guid()); |
| 252 } | 253 } |
| 253 | 254 |
| 254 } // namespace trace_event | 255 } // namespace trace_event |
| 255 } // namespace base | 256 } // namespace base |
| OLD | NEW |