OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 15 matching lines...) Expand all Loading... | |
26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
29 */ | 29 */ |
30 | 30 |
31 #include "config.h" | 31 #include "config.h" |
32 #include "core/inspector/MemoryInstrumentationImpl.h" | 32 #include "core/inspector/MemoryInstrumentationImpl.h" |
33 | 33 |
34 #include "core/dom/WebCoreMemoryInstrumentation.h" | 34 #include "core/dom/WebCoreMemoryInstrumentation.h" |
35 #include "core/inspector/HeapGraphSerializer.h" | 35 #include "core/inspector/HeapGraphSerializer.h" |
36 #include <wtf/Assertions.h> | 36 #include "wtf/Assertions.h" |
37 #include <wtf/MemoryInstrumentationHashMap.h> | 37 #include "wtf/MemoryInstrumentationHashMap.h" |
38 #include <wtf/MemoryInstrumentationHashSet.h> | 38 #include "wtf/MemoryInstrumentationVector.h" |
yurys
2013/06/24 15:00:44
ditto. It used to estimate size of m_allocatedObje
| |
39 #include <wtf/MemoryInstrumentationVector.h> | 39 #include "wtf/text/StringHash.h" |
40 #include <wtf/text/StringHash.h> | |
41 | 40 |
42 namespace WebCore { | 41 namespace WebCore { |
43 | 42 |
44 TypeNameToSizeMap MemoryInstrumentationClientImpl::sizesMap() const | 43 TypeNameToSizeMap MemoryInstrumentationClientImpl::sizesMap() const |
45 { | 44 { |
46 // TypeToSizeMap uses const char* as the key. | 45 // TypeToSizeMap uses const char* as the key. |
47 // Thus it could happen that we have two different keys with equal string. | 46 // Thus it could happen that we have two different keys with equal string. |
48 TypeNameToSizeMap sizesMap; | 47 TypeNameToSizeMap sizesMap; |
49 for (TypeToSizeMap::const_iterator i = m_totalSizes.begin(); i != m_totalSiz es.end(); ++i) { | 48 for (TypeToSizeMap::const_iterator i = m_totalSizes.begin(); i != m_totalSiz es.end(); ++i) { |
50 String objectType(i->key); | 49 String objectType(i->key); |
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
145 | 144 |
146 void MemoryInstrumentationImpl::reportMemoryUsage(MemoryObjectInfo* memoryObject Info) const | 145 void MemoryInstrumentationImpl::reportMemoryUsage(MemoryObjectInfo* memoryObject Info) const |
147 { | 146 { |
148 MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::InspectorMe moryAgent); | 147 MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::InspectorMe moryAgent); |
149 info.addMember(m_deferredObjects, "deferredObjects"); | 148 info.addMember(m_deferredObjects, "deferredObjects"); |
150 } | 149 } |
151 | 150 |
152 | 151 |
153 } // namespace WebCore | 152 } // namespace WebCore |
154 | 153 |
OLD | NEW |