| 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 1483 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1494 // 2. Trace objects reachable from the stack. We do this independent of | 1494 // 2. Trace objects reachable from the stack. We do this independent of |
| 1495 // the | 1495 // the |
| 1496 // given stackState since other threads might have a different stack | 1496 // given stackState since other threads might have a different stack |
| 1497 // state. | 1497 // state. |
| 1498 heap().visitStackRoots(visitor.get()); | 1498 heap().visitStackRoots(visitor.get()); |
| 1499 | 1499 |
| 1500 // 3. Transitive closure to trace objects including ephemerons. | 1500 // 3. Transitive closure to trace objects including ephemerons. |
| 1501 heap().processMarkingStack(visitor.get()); | 1501 heap().processMarkingStack(visitor.get()); |
| 1502 | 1502 |
| 1503 heap().postMarkingProcessing(visitor.get()); | 1503 heap().postMarkingProcessing(visitor.get()); |
| 1504 heap().globalWeakProcessing(visitor.get()); | 1504 heap().weakProcessing(visitor.get()); |
| 1505 } | 1505 } |
| 1506 | 1506 |
| 1507 double markingTimeInMilliseconds = WTF::currentTimeMS() - startTime; | 1507 double markingTimeInMilliseconds = WTF::currentTimeMS() - startTime; |
| 1508 heap().heapStats().setEstimatedMarkingTimePerByte( | 1508 heap().heapStats().setEstimatedMarkingTimePerByte( |
| 1509 totalObjectSize ? (markingTimeInMilliseconds / 1000 / totalObjectSize) | 1509 totalObjectSize ? (markingTimeInMilliseconds / 1000 / totalObjectSize) |
| 1510 : 0); | 1510 : 0); |
| 1511 | 1511 |
| 1512 #if PRINT_HEAP_STATS | 1512 #if PRINT_HEAP_STATS |
| 1513 dataLogF( | 1513 dataLogF( |
| 1514 "ThreadHeap::collectGarbage (gcReason=%s, lazySweeping=%d, " | 1514 "ThreadHeap::collectGarbage (gcReason=%s, lazySweeping=%d, " |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1558 collectGarbage(BlinkGC::NoHeapPointersOnStack, BlinkGC::GCWithSweep, | 1558 collectGarbage(BlinkGC::NoHeapPointersOnStack, BlinkGC::GCWithSweep, |
| 1559 BlinkGC::ForcedGC); | 1559 BlinkGC::ForcedGC); |
| 1560 size_t liveObjects = heap().heapStats().markedObjectSize(); | 1560 size_t liveObjects = heap().heapStats().markedObjectSize(); |
| 1561 if (liveObjects == previousLiveObjects) | 1561 if (liveObjects == previousLiveObjects) |
| 1562 break; | 1562 break; |
| 1563 previousLiveObjects = liveObjects; | 1563 previousLiveObjects = liveObjects; |
| 1564 } | 1564 } |
| 1565 } | 1565 } |
| 1566 | 1566 |
| 1567 } // namespace blink | 1567 } // namespace blink |
| OLD | NEW |