| 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/MemoryInstrumentationHashSet.h" |
| 39 #include <wtf/MemoryInstrumentationVector.h> | 39 #include "wtf/MemoryInstrumentationVector.h" |
| 40 #include <wtf/text/StringHash.h> | 40 #include "wtf/text/StringHash.h" |
| 41 | 41 |
| 42 namespace WebCore { | 42 namespace WebCore { |
| 43 | 43 |
| 44 TypeNameToSizeMap MemoryInstrumentationClientImpl::sizesMap() const | 44 TypeNameToSizeMap MemoryInstrumentationClientImpl::sizesMap() const |
| 45 { | 45 { |
| 46 // TypeToSizeMap uses const char* as the key. | 46 // TypeToSizeMap uses const char* as the key. |
| 47 // Thus it could happen that we have two different keys with equal string. | 47 // Thus it could happen that we have two different keys with equal string. |
| 48 TypeNameToSizeMap sizesMap; | 48 TypeNameToSizeMap sizesMap; |
| 49 for (TypeToSizeMap::const_iterator i = m_totalSizes.begin(); i != m_totalSiz
es.end(); ++i) { | 49 for (TypeToSizeMap::const_iterator i = m_totalSizes.begin(); i != m_totalSiz
es.end(); ++i) { |
| 50 String objectType(i->key); | 50 String objectType(i->key); |
| (...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 145 | 145 |
| 146 void MemoryInstrumentationImpl::reportMemoryUsage(MemoryObjectInfo* memoryObject
Info) const | 146 void MemoryInstrumentationImpl::reportMemoryUsage(MemoryObjectInfo* memoryObject
Info) const |
| 147 { | 147 { |
| 148 MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::InspectorMe
moryAgent); | 148 MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::InspectorMe
moryAgent); |
| 149 info.addMember(m_deferredObjects, "deferredObjects"); | 149 info.addMember(m_deferredObjects, "deferredObjects"); |
| 150 } | 150 } |
| 151 | 151 |
| 152 | 152 |
| 153 } // namespace WebCore | 153 } // namespace WebCore |
| 154 | 154 |
| OLD | NEW |