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

Side by Side Diff: components/metrics/leak_detector/call_stack_table.h

Issue 1615713003: Allow std::unordered_*. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: leak_detector fixes and git cl format Created 4 years, 11 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 COMPONENTS_METRICS_LEAK_DETECTOR_CALL_STACK_TABLE_H_ 5 #ifndef COMPONENTS_METRICS_LEAK_DETECTOR_CALL_STACK_TABLE_H_
6 #define COMPONENTS_METRICS_LEAK_DETECTOR_CALL_STACK_TABLE_H_ 6 #define COMPONENTS_METRICS_LEAK_DETECTOR_CALL_STACK_TABLE_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 uint32_t net_num_allocs; 57 uint32_t net_num_allocs;
58 }; 58 };
59 59
60 // Total number of allocs and frees in this table. 60 // Total number of allocs and frees in this table.
61 uint32_t num_allocs_; 61 uint32_t num_allocs_;
62 uint32_t num_frees_; 62 uint32_t num_frees_;
63 63
64 // Hash table containing entries. Uses CustomAllocator to avoid recursive 64 // Hash table containing entries. Uses CustomAllocator to avoid recursive
65 // malloc hook invocation when analyzing allocs and frees. 65 // malloc hook invocation when analyzing allocs and frees.
66 using TableEntryAllocator = 66 using TableEntryAllocator =
67 STLAllocator<std::pair<const CallStack*, Entry>, CustomAllocator>; 67 STLAllocator<std::pair<const CallStack* const, Entry>, CustomAllocator>;
68 base::hash_map<const CallStack*, 68 base::hash_map<const CallStack*,
69 Entry, 69 Entry,
70 StoredHash, 70 StoredHash,
71 std::equal_to<const CallStack*>, 71 std::equal_to<const CallStack*>,
72 TableEntryAllocator> entry_map_; 72 TableEntryAllocator> entry_map_;
73 73
74 // For detecting leak patterns in incoming allocations. 74 // For detecting leak patterns in incoming allocations.
75 LeakAnalyzer leak_analyzer_; 75 LeakAnalyzer leak_analyzer_;
76 76
77 DISALLOW_COPY_AND_ASSIGN(CallStackTable); 77 DISALLOW_COPY_AND_ASSIGN(CallStackTable);
78 }; 78 };
79 79
80 } // namespace leak_detector 80 } // namespace leak_detector
81 } // namespace metrics 81 } // namespace metrics
82 82
83 #endif // COMPONENTS_METRICS_LEAK_DETECTOR_CALL_STACK_TABLE_H_ 83 #endif // COMPONENTS_METRICS_LEAK_DETECTOR_CALL_STACK_TABLE_H_
OLDNEW
« no previous file with comments | « components/favicon_base/favicon_util.cc ('k') | components/metrics/leak_detector/leak_detector_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698