OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 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 616 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
627 json->endDictionary(); \ | 627 json->endDictionary(); \ |
628 } | 628 } |
629 json->beginArray("heaps"); | 629 json->beginArray("heaps"); |
630 SNAPSHOT_HEAP(General); | 630 SNAPSHOT_HEAP(General); |
631 FOR_EACH_TYPED_HEAP(SNAPSHOT_HEAP); | 631 FOR_EACH_TYPED_HEAP(SNAPSHOT_HEAP); |
632 json->endArray(); | 632 json->endArray(); |
633 #undef SNAPSHOT_HEAP | 633 #undef SNAPSHOT_HEAP |
634 | 634 |
635 json->setInteger("allocatedSpace", m_stats.totalAllocatedSpace()); | 635 json->setInteger("allocatedSpace", m_stats.totalAllocatedSpace()); |
636 json->setInteger("objectSpace", m_stats.totalObjectSpace()); | 636 json->setInteger("objectSpace", m_stats.totalObjectSpace()); |
637 json->setInteger("pageCount", info.freeSize); | 637 json->setInteger("pageCount", info.pageCount); |
638 json->setInteger("freeSize", info.freeSize); | 638 json->setInteger("freeSize", info.freeSize); |
639 | 639 |
640 Vector<String> classNameVector(info.classTags.size()); | 640 Vector<String> classNameVector(info.classTags.size()); |
641 for (HashMap<const GCInfo*, size_t>::iterator it = info.classTags.begin(); i
t != info.classTags.end(); ++it) | 641 for (HashMap<const GCInfo*, size_t>::iterator it = info.classTags.begin(); i
t != info.classTags.end(); ++it) |
642 classNameVector[it->value] = it->key->m_className; | 642 classNameVector[it->value] = it->key->m_className; |
643 | 643 |
644 size_t liveSize = 0; | 644 size_t liveSize = 0; |
645 size_t deadSize = 0; | 645 size_t deadSize = 0; |
646 json->beginArray("classes"); | 646 json->beginArray("classes"); |
647 for (size_t i = 0; i < classNameVector.size(); ++i) { | 647 for (size_t i = 0; i < classNameVector.size(); ++i) { |
(...skipping 545 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1193 return gcInfo; | 1193 return gcInfo; |
1194 } | 1194 } |
1195 } | 1195 } |
1196 if (needLockForIteration) | 1196 if (needLockForIteration) |
1197 threadAttachMutex().unlock(); | 1197 threadAttachMutex().unlock(); |
1198 return 0; | 1198 return 0; |
1199 } | 1199 } |
1200 #endif | 1200 #endif |
1201 | 1201 |
1202 } | 1202 } |
OLD | NEW |