Chromium Code Reviews| 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 1494 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1505 WebMemoryAllocatorDump* pageDump = BlinkGCMemoryDumpProvider::instance()->cr eateMemoryAllocatorDumpForCurrentGC(dumpName); | 1505 WebMemoryAllocatorDump* pageDump = BlinkGCMemoryDumpProvider::instance()->cr eateMemoryAllocatorDumpForCurrentGC(dumpName); |
| 1506 | 1506 |
| 1507 size_t liveSize = 0; | 1507 size_t liveSize = 0; |
| 1508 size_t deadSize = 0; | 1508 size_t deadSize = 0; |
| 1509 size_t liveCount = 0; | 1509 size_t liveCount = 0; |
| 1510 size_t deadCount = 0; | 1510 size_t deadCount = 0; |
| 1511 HeapObjectHeader* header = heapObjectHeader(); | 1511 HeapObjectHeader* header = heapObjectHeader(); |
| 1512 size_t gcInfoIndex = header->gcInfoIndex(); | 1512 size_t gcInfoIndex = header->gcInfoIndex(); |
| 1513 if (header->isMarked()) { | 1513 if (header->isMarked()) { |
| 1514 liveCount = 1; | 1514 liveCount = 1; |
| 1515 liveSize += header->payloadSize(); | 1515 liveSize += header->payloadSize(); |
|
sof
2016/01/26 06:31:49
Add a single binding size_t headerSize = header->p
| |
| 1516 info.liveCount[gcInfoIndex]++; | 1516 info.liveCount[gcInfoIndex]++; |
| 1517 info.liveSize[gcInfoIndex] += header->size(); | 1517 info.liveSize[gcInfoIndex] += header->payloadSize(); |
| 1518 } else { | 1518 } else { |
| 1519 deadCount = 1; | 1519 deadCount = 1; |
| 1520 deadSize += header->payloadSize(); | 1520 deadSize += header->payloadSize(); |
| 1521 info.deadCount[gcInfoIndex]++; | 1521 info.deadCount[gcInfoIndex]++; |
| 1522 info.deadSize[gcInfoIndex] += header->size(); | 1522 info.deadSize[gcInfoIndex] += header->payloadSize(); |
| 1523 } | 1523 } |
| 1524 | 1524 |
| 1525 pageDump->addScalar("live_count", "objects", liveCount); | 1525 pageDump->addScalar("live_count", "objects", liveCount); |
| 1526 pageDump->addScalar("dead_count", "objects", deadCount); | 1526 pageDump->addScalar("dead_count", "objects", deadCount); |
| 1527 pageDump->addScalar("live_size", "bytes", liveSize); | 1527 pageDump->addScalar("live_size", "bytes", liveSize); |
| 1528 pageDump->addScalar("dead_size", "bytes", deadSize); | 1528 pageDump->addScalar("dead_size", "bytes", deadSize); |
| 1529 } | 1529 } |
| 1530 | 1530 |
| 1531 #if ENABLE(ASSERT) | 1531 #if ENABLE(ASSERT) |
| 1532 bool LargeObjectPage::contains(Address object) | 1532 bool LargeObjectPage::contains(Address object) |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1573 | 1573 |
| 1574 m_hasEntries = true; | 1574 m_hasEntries = true; |
| 1575 size_t index = hash(address); | 1575 size_t index = hash(address); |
| 1576 ASSERT(!(index & 1)); | 1576 ASSERT(!(index & 1)); |
| 1577 Address cachePage = roundToBlinkPageStart(address); | 1577 Address cachePage = roundToBlinkPageStart(address); |
| 1578 m_entries[index + 1] = m_entries[index]; | 1578 m_entries[index + 1] = m_entries[index]; |
| 1579 m_entries[index] = cachePage; | 1579 m_entries[index] = cachePage; |
| 1580 } | 1580 } |
| 1581 | 1581 |
| 1582 } // namespace blink | 1582 } // namespace blink |
| OLD | NEW |