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

Side by Side Diff: base/trace_event/process_memory_dump.h

Issue 2830093003: Replace uses of hash_map in //base (Closed)
Patch Set: iOS Created 3 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 unified diff | Download patch
« no previous file with comments | « base/trace_event/malloc_dump_provider.cc ('k') | base/trace_event/process_memory_dump.cc » ('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 #ifndef BASE_TRACE_EVENT_PROCESS_MEMORY_DUMP_H_ 5 #ifndef BASE_TRACE_EVENT_PROCESS_MEMORY_DUMP_H_
6 #define BASE_TRACE_EVENT_PROCESS_MEMORY_DUMP_H_ 6 #define BASE_TRACE_EVENT_PROCESS_MEMORY_DUMP_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include <unordered_map> 10 #include <unordered_map>
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 const MemoryAllocatorDumpGuid& guid); 111 const MemoryAllocatorDumpGuid& guid);
112 112
113 // Looks up a shared MemoryAllocatorDump given its guid. 113 // Looks up a shared MemoryAllocatorDump given its guid.
114 MemoryAllocatorDump* GetSharedGlobalAllocatorDump( 114 MemoryAllocatorDump* GetSharedGlobalAllocatorDump(
115 const MemoryAllocatorDumpGuid& guid) const; 115 const MemoryAllocatorDumpGuid& guid) const;
116 116
117 // Returns the map of the MemoryAllocatorDumps added to this dump. 117 // Returns the map of the MemoryAllocatorDumps added to this dump.
118 const AllocatorDumpsMap& allocator_dumps() const { return allocator_dumps_; } 118 const AllocatorDumpsMap& allocator_dumps() const { return allocator_dumps_; }
119 119
120 // Dumps heap usage with |allocator_name|. 120 // Dumps heap usage with |allocator_name|.
121 void DumpHeapUsage(const base::hash_map<base::trace_event::AllocationContext, 121 void DumpHeapUsage(
122 base::trace_event::AllocationMetrics>& 122 const std::unordered_map<base::trace_event::AllocationContext,
123 metrics_by_context, 123 base::trace_event::AllocationMetrics>&
124 base::trace_event::TraceEventMemoryOverhead& overhead, 124 metrics_by_context,
125 const char* allocator_name); 125 base::trace_event::TraceEventMemoryOverhead& overhead,
126 const char* allocator_name);
126 127
127 // Adds an ownership relationship between two MemoryAllocatorDump(s) with the 128 // Adds an ownership relationship between two MemoryAllocatorDump(s) with the
128 // semantics: |source| owns |target|, and has the effect of attributing 129 // semantics: |source| owns |target|, and has the effect of attributing
129 // the memory usage of |target| to |source|. |importance| is optional and 130 // the memory usage of |target| to |source|. |importance| is optional and
130 // relevant only for the cases of co-ownership, where it acts as a z-index: 131 // relevant only for the cases of co-ownership, where it acts as a z-index:
131 // the owner with the highest importance will be attributed |target|'s memory. 132 // the owner with the highest importance will be attributed |target|'s memory.
132 void AddOwnershipEdge(const MemoryAllocatorDumpGuid& source, 133 void AddOwnershipEdge(const MemoryAllocatorDumpGuid& source,
133 const MemoryAllocatorDumpGuid& target, 134 const MemoryAllocatorDumpGuid& target,
134 int importance); 135 int importance);
135 void AddOwnershipEdge(const MemoryAllocatorDumpGuid& source, 136 void AddOwnershipEdge(const MemoryAllocatorDumpGuid& source,
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
214 // background mode are disabled for testing. 215 // background mode are disabled for testing.
215 static bool is_black_hole_non_fatal_for_testing_; 216 static bool is_black_hole_non_fatal_for_testing_;
216 217
217 DISALLOW_COPY_AND_ASSIGN(ProcessMemoryDump); 218 DISALLOW_COPY_AND_ASSIGN(ProcessMemoryDump);
218 }; 219 };
219 220
220 } // namespace trace_event 221 } // namespace trace_event
221 } // namespace base 222 } // namespace base
222 223
223 #endif // BASE_TRACE_EVENT_PROCESS_MEMORY_DUMP_H_ 224 #endif // BASE_TRACE_EVENT_PROCESS_MEMORY_DUMP_H_
OLDNEW
« no previous file with comments | « base/trace_event/malloc_dump_provider.cc ('k') | base/trace_event/process_memory_dump.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698