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/heap_profiler_type_name_deduplicator.h" | 5 #include "base/trace_event/heap_profiler_type_name_deduplicator.h" |
6 | 6 |
| 7 #include <stddef.h> |
7 #include <stdlib.h> | 8 #include <stdlib.h> |
8 #include <string> | 9 #include <string> |
9 #include <utility> | 10 #include <utility> |
10 | 11 |
11 #include "base/json/string_escape.h" | 12 #include "base/json/string_escape.h" |
12 #include "base/strings/stringprintf.h" | 13 #include "base/strings/stringprintf.h" |
13 #include "base/trace_event/trace_event_memory_overhead.h" | 14 #include "base/trace_event/trace_event_memory_overhead.h" |
14 | 15 |
15 namespace base { | 16 namespace base { |
16 namespace trace_event { | 17 namespace trace_event { |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
66 // The size here is only an estimate; it fails to take into account the size | 67 // The size here is only an estimate; it fails to take into account the size |
67 // of the tree nodes for the map, but as an estimate this should be fine. | 68 // of the tree nodes for the map, but as an estimate this should be fine. |
68 size_t map_size = type_ids_.size() * sizeof(std::pair<const char*, int>); | 69 size_t map_size = type_ids_.size() * sizeof(std::pair<const char*, int>); |
69 | 70 |
70 overhead->Add("TypeNameDeduplicator", | 71 overhead->Add("TypeNameDeduplicator", |
71 sizeof(TypeNameDeduplicator) + map_size); | 72 sizeof(TypeNameDeduplicator) + map_size); |
72 } | 73 } |
73 | 74 |
74 } // namespace trace_event | 75 } // namespace trace_event |
75 } // namespace base | 76 } // namespace base |
OLD | NEW |