| 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 1461 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 1472 #undef SNAPSHOT_HEAP | 1472 #undef SNAPSHOT_HEAP | 
| 1473 | 1473 | 
| 1474     if (type == SnapshotType::FreelistSnapshot) | 1474     if (type == SnapshotType::FreelistSnapshot) | 
| 1475         return; | 1475         return; | 
| 1476 | 1476 | 
| 1477     size_t totalLiveCount = 0; | 1477     size_t totalLiveCount = 0; | 
| 1478     size_t totalDeadCount = 0; | 1478     size_t totalDeadCount = 0; | 
| 1479     size_t totalLiveSize = 0; | 1479     size_t totalLiveSize = 0; | 
| 1480     size_t totalDeadSize = 0; | 1480     size_t totalDeadSize = 0; | 
| 1481     for (size_t gcInfoIndex = 1; gcInfoIndex <= GCInfoTable::gcInfoIndex(); ++gc
      InfoIndex) { | 1481     for (size_t gcInfoIndex = 1; gcInfoIndex <= GCInfoTable::gcInfoIndex(); ++gc
      InfoIndex) { | 
| 1482         String dumpName = classesDumpName + String::format("/%lu_", static_cast<
      unsigned long>(gcInfoIndex)); |  | 
| 1483 #if ENABLE(DETAILED_MEMORY_INFRA) |  | 
| 1484         dumpName.append(Heap::gcInfo(gcInfoIndex)->className()); |  | 
| 1485 #endif |  | 
| 1486         WebMemoryAllocatorDump* classDump = BlinkGCMemoryDumpProvider::instance(
      )->createMemoryAllocatorDumpForCurrentGC(dumpName); |  | 
| 1487         classDump->addScalar("live_count", "objects", info.liveCount[gcInfoIndex
      ]); |  | 
| 1488         classDump->addScalar("dead_count", "objects", info.deadCount[gcInfoIndex
      ]); |  | 
| 1489         classDump->addScalar("live_size", "bytes", info.liveSize[gcInfoIndex]); |  | 
| 1490         classDump->addScalar("dead_size", "bytes", info.deadSize[gcInfoIndex]); |  | 
| 1491 |  | 
| 1492         totalLiveCount += info.liveCount[gcInfoIndex]; | 1482         totalLiveCount += info.liveCount[gcInfoIndex]; | 
| 1493         totalDeadCount += info.deadCount[gcInfoIndex]; | 1483         totalDeadCount += info.deadCount[gcInfoIndex]; | 
| 1494         totalLiveSize += info.liveSize[gcInfoIndex]; | 1484         totalLiveSize += info.liveSize[gcInfoIndex]; | 
| 1495         totalDeadSize += info.deadSize[gcInfoIndex]; | 1485         totalDeadSize += info.deadSize[gcInfoIndex]; | 
| 1496     } | 1486     } | 
| 1497 | 1487 | 
| 1498     WebMemoryAllocatorDump* threadDump = BlinkGCMemoryDumpProvider::instance()->
      createMemoryAllocatorDumpForCurrentGC(threadDumpName); | 1488     WebMemoryAllocatorDump* threadDump = BlinkGCMemoryDumpProvider::instance()->
      createMemoryAllocatorDumpForCurrentGC(threadDumpName); | 
| 1499     threadDump->addScalar("live_count", "objects", totalLiveCount); | 1489     threadDump->addScalar("live_count", "objects", totalLiveCount); | 
| 1500     threadDump->addScalar("dead_count", "objects", totalDeadCount); | 1490     threadDump->addScalar("dead_count", "objects", totalDeadCount); | 
| 1501     threadDump->addScalar("live_size", "bytes", totalLiveSize); | 1491     threadDump->addScalar("live_size", "bytes", totalLiveSize); | 
| 1502     threadDump->addScalar("dead_size", "bytes", totalDeadSize); | 1492     threadDump->addScalar("dead_size", "bytes", totalDeadSize); | 
| 1503 | 1493 | 
| 1504     WebMemoryAllocatorDump* heapsDump = BlinkGCMemoryDumpProvider::instance()->c
      reateMemoryAllocatorDumpForCurrentGC(heapsDumpName); | 1494     WebMemoryAllocatorDump* heapsDump = BlinkGCMemoryDumpProvider::instance()->c
      reateMemoryAllocatorDumpForCurrentGC(heapsDumpName); | 
| 1505     WebMemoryAllocatorDump* classesDump = BlinkGCMemoryDumpProvider::instance()-
      >createMemoryAllocatorDumpForCurrentGC(classesDumpName); | 1495     WebMemoryAllocatorDump* classesDump = BlinkGCMemoryDumpProvider::instance()-
      >createMemoryAllocatorDumpForCurrentGC(classesDumpName); | 
| 1506     BlinkGCMemoryDumpProvider::instance()->currentProcessMemoryDump()->addOwners
      hipEdge(classesDump->guid(), heapsDump->guid()); | 1496     BlinkGCMemoryDumpProvider::instance()->currentProcessMemoryDump()->addOwners
      hipEdge(classesDump->guid(), heapsDump->guid()); | 
| 1507 } | 1497 } | 
| 1508 | 1498 | 
| 1509 } // namespace blink | 1499 } // namespace blink | 
| OLD | NEW | 
|---|