| 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 1691 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1702 dumpName.append(String::format("/pages/page_%lu", static_cast<unsigned long>
(pageIndex))); | 1702 dumpName.append(String::format("/pages/page_%lu", static_cast<unsigned long>
(pageIndex))); |
| 1703 WebMemoryAllocatorDump* pageDump = BlinkGCMemoryDumpProvider::instance()->cr
eateMemoryAllocatorDumpForCurrentGC(dumpName); | 1703 WebMemoryAllocatorDump* pageDump = BlinkGCMemoryDumpProvider::instance()->cr
eateMemoryAllocatorDumpForCurrentGC(dumpName); |
| 1704 | 1704 |
| 1705 size_t liveSize = 0; | 1705 size_t liveSize = 0; |
| 1706 size_t deadSize = 0; | 1706 size_t deadSize = 0; |
| 1707 size_t liveCount = 0; | 1707 size_t liveCount = 0; |
| 1708 size_t deadCount = 0; | 1708 size_t deadCount = 0; |
| 1709 HeapObjectHeader* header = heapObjectHeader(); | 1709 HeapObjectHeader* header = heapObjectHeader(); |
| 1710 if (header->isMarked()) { | 1710 if (header->isMarked()) { |
| 1711 liveCount = 1; | 1711 liveCount = 1; |
| 1712 liveSize += header->size(); | 1712 liveSize += header->payloadSize(); |
| 1713 } else { | 1713 } else { |
| 1714 deadCount = 1; | 1714 deadCount = 1; |
| 1715 deadSize += header->size(); | 1715 deadSize += header->payloadSize(); |
| 1716 } | 1716 } |
| 1717 | 1717 |
| 1718 pageDump->AddScalar("live_count", "objects", liveCount); | 1718 pageDump->AddScalar("live_count", "objects", liveCount); |
| 1719 pageDump->AddScalar("dead_count", "objects", deadCount); | 1719 pageDump->AddScalar("dead_count", "objects", deadCount); |
| 1720 pageDump->AddScalar("live_size", "bytes", liveSize); | 1720 pageDump->AddScalar("live_size", "bytes", liveSize); |
| 1721 pageDump->AddScalar("dead_size", "bytes", deadSize); | 1721 pageDump->AddScalar("dead_size", "bytes", deadSize); |
| 1722 } | 1722 } |
| 1723 | 1723 |
| 1724 #if ENABLE(GC_PROFILING) | 1724 #if ENABLE(GC_PROFILING) |
| 1725 const GCInfo* LargeObjectPage::findGCInfo(Address address) | 1725 const GCInfo* LargeObjectPage::findGCInfo(Address address) |
| (...skipping 718 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2444 size_t Heap::s_allocatedObjectSize = 0; | 2444 size_t Heap::s_allocatedObjectSize = 0; |
| 2445 size_t Heap::s_allocatedSpace = 0; | 2445 size_t Heap::s_allocatedSpace = 0; |
| 2446 size_t Heap::s_markedObjectSize = 0; | 2446 size_t Heap::s_markedObjectSize = 0; |
| 2447 // We don't want to use 0 KB for the initial value because it may end up | 2447 // We don't want to use 0 KB for the initial value because it may end up |
| 2448 // triggering the first GC of some thread too prematurely. | 2448 // triggering the first GC of some thread too prematurely. |
| 2449 size_t Heap::s_estimatedLiveObjectSize = 512 * 1024; | 2449 size_t Heap::s_estimatedLiveObjectSize = 512 * 1024; |
| 2450 size_t Heap::s_externalObjectSizeAtLastGC = 0; | 2450 size_t Heap::s_externalObjectSizeAtLastGC = 0; |
| 2451 double Heap::s_estimatedMarkingTimePerByte = 0.0; | 2451 double Heap::s_estimatedMarkingTimePerByte = 0.0; |
| 2452 | 2452 |
| 2453 } // namespace blink | 2453 } // namespace blink |
| OLD | NEW |