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 1475 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1486 #undef SNAPSHOT_HEAP | 1486 #undef SNAPSHOT_HEAP |
1487 | 1487 |
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("/%zu_", gcInfoIndex) + Heap::gcInfo(gcInfoIndex)->className(); | 1496 String dumpName = classesDumpName + String::format("/%lu_", static_cast< unsigned long>(gcInfoIndex)); |
1497 #if ENABLE(GC_PROFILING) | |
1498 dumpName += Heap::gcInfo(gcInfoIndex)->className(); | |
sof
2015/09/03 07:14:20
Did this compile? We don't provide += over String,
| |
1499 #endif | |
1497 WebMemoryAllocatorDump* classDump = BlinkGCMemoryDumpProvider::instance( )->createMemoryAllocatorDumpForCurrentGC(dumpName); | 1500 WebMemoryAllocatorDump* classDump = BlinkGCMemoryDumpProvider::instance( )->createMemoryAllocatorDumpForCurrentGC(dumpName); |
1498 classDump->AddScalar("live_count", "objects", info.liveCount[gcInfoIndex ]); | 1501 classDump->AddScalar("live_count", "objects", info.liveCount[gcInfoIndex ]); |
1499 classDump->AddScalar("dead_count", "objects", info.deadCount[gcInfoIndex ]); | 1502 classDump->AddScalar("dead_count", "objects", info.deadCount[gcInfoIndex ]); |
1500 classDump->AddScalar("live_size", "bytes", info.liveSize[gcInfoIndex]); | 1503 classDump->AddScalar("live_size", "bytes", info.liveSize[gcInfoIndex]); |
1501 classDump->AddScalar("dead_size", "bytes", info.deadSize[gcInfoIndex]); | 1504 classDump->AddScalar("dead_size", "bytes", info.deadSize[gcInfoIndex]); |
1502 | 1505 |
1503 totalLiveCount += info.liveCount[gcInfoIndex]; | 1506 totalLiveCount += info.liveCount[gcInfoIndex]; |
1504 totalDeadCount += info.deadCount[gcInfoIndex]; | 1507 totalDeadCount += info.deadCount[gcInfoIndex]; |
1505 totalLiveSize += info.liveSize[gcInfoIndex]; | 1508 totalLiveSize += info.liveSize[gcInfoIndex]; |
1506 totalDeadSize += info.deadSize[gcInfoIndex]; | 1509 totalDeadSize += info.deadSize[gcInfoIndex]; |
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1607 json->beginArray(it->key.ascii().data()); | 1610 json->beginArray(it->key.ascii().data()); |
1608 for (size_t age = 0; age <= maxHeapObjectAge; ++age) | 1611 for (size_t age = 0; age <= maxHeapObjectAge; ++age) |
1609 json->pushInteger(it->value.ages[age]); | 1612 json->pushInteger(it->value.ages[age]); |
1610 json->endArray(); | 1613 json->endArray(); |
1611 } | 1614 } |
1612 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()); |
1613 } | 1616 } |
1614 #endif | 1617 #endif |
1615 | 1618 |
1616 } // namespace blink | 1619 } // namespace blink |
OLD | NEW |