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 1382 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1393 Header* header = 0; | 1393 Header* header = 0; |
1394 for (Address addr = payload(); addr < end(); addr += header->size()) { | 1394 for (Address addr = payload(); addr < end(); addr += header->size()) { |
1395 header = reinterpret_cast<Header*>(addr); | 1395 header = reinterpret_cast<Header*>(addr); |
1396 if (json) | 1396 if (json) |
1397 json->pushInteger(header->encodedSize()); | 1397 json->pushInteger(header->encodedSize()); |
1398 if (header->isFree()) { | 1398 if (header->isFree()) { |
1399 info->freeSize += header->size(); | 1399 info->freeSize += header->size(); |
1400 continue; | 1400 continue; |
1401 } | 1401 } |
1402 | 1402 |
1403 size_t tag = info->getClassTag(header->gcInfo()); | 1403 const GCInfo* gcinfo = header->gcInfo() ? header->gcInfo() : gcInfo(); |
| 1404 size_t tag = info->getClassTag(gcinfo); |
1404 size_t age = header->age(); | 1405 size_t age = header->age(); |
1405 if (json) | 1406 if (json) |
1406 json->pushInteger(tag); | 1407 json->pushInteger(tag); |
1407 if (header->isMarked()) { | 1408 if (header->isMarked()) { |
1408 info->liveCount[tag] += 1; | 1409 info->liveCount[tag] += 1; |
1409 info->liveSize += header->size(); | 1410 info->liveSize += header->size(); |
1410 // Count objects that are live when promoted to the final generation
. | 1411 // Count objects that are live when promoted to the final generation
. |
1411 if (age == maxHeapObjectAge - 1) | 1412 if (age == maxHeapObjectAge - 1) |
1412 info->generations[tag][maxHeapObjectAge] += 1; | 1413 info->generations[tag][maxHeapObjectAge] += 1; |
1413 header->incAge(); | 1414 header->incAge(); |
(...skipping 969 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2383 Visitor* Heap::s_markingVisitor; | 2384 Visitor* Heap::s_markingVisitor; |
2384 CallbackStack* Heap::s_markingStack; | 2385 CallbackStack* Heap::s_markingStack; |
2385 CallbackStack* Heap::s_weakCallbackStack; | 2386 CallbackStack* Heap::s_weakCallbackStack; |
2386 CallbackStack* Heap::s_ephemeronStack; | 2387 CallbackStack* Heap::s_ephemeronStack; |
2387 HeapDoesNotContainCache* Heap::s_heapDoesNotContainCache; | 2388 HeapDoesNotContainCache* Heap::s_heapDoesNotContainCache; |
2388 bool Heap::s_shutdownCalled = false; | 2389 bool Heap::s_shutdownCalled = false; |
2389 bool Heap::s_lastGCWasConservative = false; | 2390 bool Heap::s_lastGCWasConservative = false; |
2390 FreePagePool* Heap::s_freePagePool; | 2391 FreePagePool* Heap::s_freePagePool; |
2391 OrphanedPagePool* Heap::s_orphanedPagePool; | 2392 OrphanedPagePool* Heap::s_orphanedPagePool; |
2392 } | 2393 } |
OLD | NEW |