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 1477 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1488 if (type == SnapshotType::FreelistSnapshot) | 1488 if (type == SnapshotType::FreelistSnapshot) |
1489 return; | 1489 return; |
1490 | 1490 |
1491 size_t totalLiveCount = 0; | 1491 size_t totalLiveCount = 0; |
1492 size_t totalDeadCount = 0; | 1492 size_t totalDeadCount = 0; |
1493 size_t totalLiveSize = 0; | 1493 size_t totalLiveSize = 0; |
1494 size_t totalDeadSize = 0; | 1494 size_t totalDeadSize = 0; |
1495 for (size_t gcInfoIndex = 1; gcInfoIndex <= GCInfoTable::gcInfoIndex(); ++gc
InfoIndex) { | 1495 for (size_t gcInfoIndex = 1; gcInfoIndex <= GCInfoTable::gcInfoIndex(); ++gc
InfoIndex) { |
1496 String dumpName = classesDumpName + String::format("/%lu_", static_cast<
unsigned long>(gcInfoIndex)); | 1496 String dumpName = classesDumpName + String::format("/%lu_", static_cast<
unsigned long>(gcInfoIndex)); |
1497 #if ENABLE(GC_PROFILING) | 1497 #if ENABLE(GC_PROFILING) |
1498 dumpName += Heap::gcInfo(gcInfoIndex)->className(); | 1498 dumpName.append(Heap::gcInfo(gcInfoIndex)->className()); |
1499 #endif | 1499 #endif |
1500 WebMemoryAllocatorDump* classDump = BlinkGCMemoryDumpProvider::instance(
)->createMemoryAllocatorDumpForCurrentGC(dumpName); | 1500 WebMemoryAllocatorDump* classDump = BlinkGCMemoryDumpProvider::instance(
)->createMemoryAllocatorDumpForCurrentGC(dumpName); |
1501 classDump->AddScalar("live_count", "objects", info.liveCount[gcInfoIndex
]); | 1501 classDump->AddScalar("live_count", "objects", info.liveCount[gcInfoIndex
]); |
1502 classDump->AddScalar("dead_count", "objects", info.deadCount[gcInfoIndex
]); | 1502 classDump->AddScalar("dead_count", "objects", info.deadCount[gcInfoIndex
]); |
1503 classDump->AddScalar("live_size", "bytes", info.liveSize[gcInfoIndex]); | 1503 classDump->AddScalar("live_size", "bytes", info.liveSize[gcInfoIndex]); |
1504 classDump->AddScalar("dead_size", "bytes", info.deadSize[gcInfoIndex]); | 1504 classDump->AddScalar("dead_size", "bytes", info.deadSize[gcInfoIndex]); |
1505 | 1505 |
1506 totalLiveCount += info.liveCount[gcInfoIndex]; | 1506 totalLiveCount += info.liveCount[gcInfoIndex]; |
1507 totalDeadCount += info.deadCount[gcInfoIndex]; | 1507 totalDeadCount += info.deadCount[gcInfoIndex]; |
1508 totalLiveSize += info.liveSize[gcInfoIndex]; | 1508 totalLiveSize += info.liveSize[gcInfoIndex]; |
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1610 json->beginArray(it->key.ascii().data()); | 1610 json->beginArray(it->key.ascii().data()); |
1611 for (size_t age = 0; age <= maxHeapObjectAge; ++age) | 1611 for (size_t age = 0; age <= maxHeapObjectAge; ++age) |
1612 json->pushInteger(it->value.ages[age]); | 1612 json->pushInteger(it->value.ages[age]); |
1613 json->endArray(); | 1613 json->endArray(); |
1614 } | 1614 } |
1615 TRACE_EVENT_OBJECT_SNAPSHOT_WITH_ID(TRACE_DISABLED_BY_DEFAULT("blink_gc"), s
tatsName, this, json.release()); | 1615 TRACE_EVENT_OBJECT_SNAPSHOT_WITH_ID(TRACE_DISABLED_BY_DEFAULT("blink_gc"), s
tatsName, this, json.release()); |
1616 } | 1616 } |
1617 #endif | 1617 #endif |
1618 | 1618 |
1619 } // namespace blink | 1619 } // namespace blink |
OLD | NEW |