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

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

Issue 2830093003: Replace uses of hash_map in //base (Closed)
Patch Set: WebKit callers 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 unified diff | Download patch
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_TRACE_EVENT_MEMORY_OVERHEAD_H_ 5 #ifndef BASE_TRACE_EVENT_TRACE_EVENT_MEMORY_OVERHEAD_H_
6 #define BASE_TRACE_EVENT_TRACE_EVENT_MEMORY_OVERHEAD_H_ 6 #define BASE_TRACE_EVENT_TRACE_EVENT_MEMORY_OVERHEAD_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include "base/base_export.h" 10 #include "base/base_export.h"
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 void Update(const TraceEventMemoryOverhead& other); 53 void Update(const TraceEventMemoryOverhead& other);
54 54
55 void DumpInto(const char* base_name, ProcessMemoryDump* pmd) const; 55 void DumpInto(const char* base_name, ProcessMemoryDump* pmd) const;
56 56
57 private: 57 private:
58 struct ObjectCountAndSize { 58 struct ObjectCountAndSize {
59 size_t count; 59 size_t count;
60 size_t allocated_size_in_bytes; 60 size_t allocated_size_in_bytes;
61 size_t resident_size_in_bytes; 61 size_t resident_size_in_bytes;
62 }; 62 };
63 using map_type = small_map<hash_map<const char*, ObjectCountAndSize>, 16>; 63 using map_type =
64 small_map<std::unordered_map<const char*, ObjectCountAndSize>, 16>;
Łukasz Anforowicz 2017/04/24 18:46:10 IWYU: #include <unordered_map>?
64 map_type allocated_objects_; 65 map_type allocated_objects_;
65 66
66 void AddOrCreateInternal(const char* object_type, 67 void AddOrCreateInternal(const char* object_type,
67 size_t count, 68 size_t count,
68 size_t allocated_size_in_bytes, 69 size_t allocated_size_in_bytes,
69 size_t resident_size_in_bytes); 70 size_t resident_size_in_bytes);
70 71
71 DISALLOW_COPY_AND_ASSIGN(TraceEventMemoryOverhead); 72 DISALLOW_COPY_AND_ASSIGN(TraceEventMemoryOverhead);
72 }; 73 };
73 74
74 } // namespace trace_event 75 } // namespace trace_event
75 } // namespace base 76 } // namespace base
76 77
77 #endif // BASE_TRACE_EVENT_TRACE_EVENT_MEMORY_OVERHEAD_H_ 78 #endif // BASE_TRACE_EVENT_TRACE_EVENT_MEMORY_OVERHEAD_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698