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

Unified Diff: base/trace_event/heap_profiler_heap_dump_writer.cc

Issue 2830093003: Replace uses of hash_map in //base (Closed)
Patch Set: iOS Created 3 years, 8 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 side-by-side diff with in-line comments
Download patch
Index: base/trace_event/heap_profiler_heap_dump_writer.cc
diff --git a/base/trace_event/heap_profiler_heap_dump_writer.cc b/base/trace_event/heap_profiler_heap_dump_writer.cc
index 8043fff995458bb61981967a4c151c1268605453..70bd87a44aae07a808ffcc2913f75a20bf0c9ef6 100644
--- a/base/trace_event/heap_profiler_heap_dump_writer.cc
+++ b/base/trace_event/heap_profiler_heap_dump_writer.cc
@@ -78,8 +78,7 @@ bool operator<(const Bucket& lhs, const Bucket& rhs) {
// |is_broken_down_by_type_name| set depending on the property to group by.
std::vector<Bucket> GetSubbuckets(const Bucket& bucket,
BreakDownMode break_by) {
- base::hash_map<const void*, Bucket> breakdown;
-
+ std::unordered_map<const void*, Bucket> breakdown;
if (break_by == BreakDownMode::kByBacktrace) {
for (const auto& context_and_metrics : bucket.metrics_by_context) {
@@ -241,7 +240,8 @@ void HeapDumpWriter::BreakDown(const Bucket& bucket) {
}
const std::set<Entry>& HeapDumpWriter::Summarize(
- const hash_map<AllocationContext, AllocationMetrics>& metrics_by_context) {
+ const std::unordered_map<AllocationContext, AllocationMetrics>&
+ metrics_by_context) {
// Start with one bucket that represents the entire heap. Iterate by
// reference, because the allocation contexts are going to point to allocation
// contexts stored in |metrics_by_context|.
@@ -309,7 +309,8 @@ std::unique_ptr<TracedValue> Serialize(const std::set<Entry>& entries) {
} // namespace internal
std::unique_ptr<TracedValue> ExportHeapDump(
- const hash_map<AllocationContext, AllocationMetrics>& metrics_by_context,
+ const std::unordered_map<AllocationContext, AllocationMetrics>&
+ metrics_by_context,
const MemoryDumpSessionState& session_state) {
internal::HeapDumpWriter writer(
session_state.stack_frame_deduplicator(),
« no previous file with comments | « base/trace_event/heap_profiler_heap_dump_writer.h ('k') | base/trace_event/heap_profiler_heap_dump_writer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698