| 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 428 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 439 json->endArray(); | 439 json->endArray(); |
| 440 #undef SNAPSHOT_HEAP | 440 #undef SNAPSHOT_HEAP |
| 441 | 441 |
| 442 json->setInteger("allocatedSpace", Heap::allocatedSpace()); | 442 json->setInteger("allocatedSpace", Heap::allocatedSpace()); |
| 443 json->setInteger("objectSpace", Heap::allocatedObjectSize()); | 443 json->setInteger("objectSpace", Heap::allocatedObjectSize()); |
| 444 json->setInteger("pageCount", info.pageCount); | 444 json->setInteger("pageCount", info.pageCount); |
| 445 json->setInteger("freeSize", info.freeSize); | 445 json->setInteger("freeSize", info.freeSize); |
| 446 | 446 |
| 447 Vector<String> classNameVector(info.classTags.size()); | 447 Vector<String> classNameVector(info.classTags.size()); |
| 448 for (SnapshotInfo::ClassTagMap::iterator it = info.classTags.begin(); it !=
info.classTags.end(); ++it) | 448 for (SnapshotInfo::ClassTagMap::iterator it = info.classTags.begin(); it !=
info.classTags.end(); ++it) |
| 449 classNameVector[it->value] = it->key->m_className; | 449 classNameVector[it->value] = it->key->className(); |
| 450 | 450 |
| 451 size_t liveSize = 0; | 451 size_t liveSize = 0; |
| 452 size_t deadSize = 0; | 452 size_t deadSize = 0; |
| 453 json->beginArray("classes"); | 453 json->beginArray("classes"); |
| 454 for (size_t i = 0; i < classNameVector.size(); ++i) { | 454 for (size_t i = 0; i < classNameVector.size(); ++i) { |
| 455 json->beginDictionary(); | 455 json->beginDictionary(); |
| 456 json->setString("name", classNameVector[i]); | 456 json->setString("name", classNameVector[i]); |
| 457 json->setInteger("liveCount", info.liveCount[i]); | 457 json->setInteger("liveCount", info.liveCount[i]); |
| 458 json->setInteger("deadCount", info.deadCount[i]); | 458 json->setInteger("deadCount", info.deadCount[i]); |
| 459 json->setInteger("liveSize", info.liveSize[i]); | 459 json->setInteger("liveSize", info.liveSize[i]); |
| (...skipping 1147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1607 json->beginArray(it->key.ascii().data()); | 1607 json->beginArray(it->key.ascii().data()); |
| 1608 for (size_t age = 0; age <= maxHeapObjectAge; ++age) | 1608 for (size_t age = 0; age <= maxHeapObjectAge; ++age) |
| 1609 json->pushInteger(it->value.ages[age]); | 1609 json->pushInteger(it->value.ages[age]); |
| 1610 json->endArray(); | 1610 json->endArray(); |
| 1611 } | 1611 } |
| 1612 TRACE_EVENT_OBJECT_SNAPSHOT_WITH_ID(TRACE_DISABLED_BY_DEFAULT("blink_gc"), s
tatsName, this, json.release()); | 1612 TRACE_EVENT_OBJECT_SNAPSHOT_WITH_ID(TRACE_DISABLED_BY_DEFAULT("blink_gc"), s
tatsName, this, json.release()); |
| 1613 } | 1613 } |
| 1614 #endif | 1614 #endif |
| 1615 | 1615 |
| 1616 } // namespace blink | 1616 } // namespace blink |
| OLD | NEW |