| 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 989 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1000 | 1000 |
| 1001 void ThreadState::makeConsistentForMutator() | 1001 void ThreadState::makeConsistentForMutator() |
| 1002 { | 1002 { |
| 1003 ASSERT(isInGC()); | 1003 ASSERT(isInGC()); |
| 1004 for (int i = 0; i < BlinkGC::NumberOfArenas; ++i) | 1004 for (int i = 0; i < BlinkGC::NumberOfArenas; ++i) |
| 1005 m_arenas[i]->makeConsistentForMutator(); | 1005 m_arenas[i]->makeConsistentForMutator(); |
| 1006 } | 1006 } |
| 1007 | 1007 |
| 1008 void ThreadState::preGC() | 1008 void ThreadState::preGC() |
| 1009 { | 1009 { |
| 1010 if (RuntimeEnabledFeatures::traceWrappablesEnabled() && m_isolate && m_perfo
rmCleanup) | 1010 if (RuntimeEnabledFeatures::traceWrappablesEnabled() && m_performCleanup) |
| 1011 m_performCleanup(m_isolate); | 1011 m_performCleanup(m_isolate); |
| 1012 | 1012 |
| 1013 ASSERT(!isInGC()); | 1013 ASSERT(!isInGC()); |
| 1014 setGCState(GCRunning); | 1014 setGCState(GCRunning); |
| 1015 makeConsistentForGC(); | 1015 makeConsistentForGC(); |
| 1016 flushHeapDoesNotContainCacheIfNeeded(); | 1016 flushHeapDoesNotContainCacheIfNeeded(); |
| 1017 clearArenaAges(); | 1017 clearArenaAges(); |
| 1018 | 1018 |
| 1019 // It is possible, albeit rare, for a thread to be kept | 1019 // It is possible, albeit rare, for a thread to be kept |
| 1020 // at a safepoint across multiple GCs, as resuming all attached | 1020 // at a safepoint across multiple GCs, as resuming all attached |
| (...skipping 726 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1747 for (int i = 0; i < 5; ++i) { | 1747 for (int i = 0; i < 5; ++i) { |
| 1748 collectGarbage(BlinkGC::NoHeapPointersOnStack, BlinkGC::GCWithSweep, Bli
nkGC::ForcedGC); | 1748 collectGarbage(BlinkGC::NoHeapPointersOnStack, BlinkGC::GCWithSweep, Bli
nkGC::ForcedGC); |
| 1749 size_t liveObjects = heap().heapStats().markedObjectSize(); | 1749 size_t liveObjects = heap().heapStats().markedObjectSize(); |
| 1750 if (liveObjects == previousLiveObjects) | 1750 if (liveObjects == previousLiveObjects) |
| 1751 break; | 1751 break; |
| 1752 previousLiveObjects = liveObjects; | 1752 previousLiveObjects = liveObjects; |
| 1753 } | 1753 } |
| 1754 } | 1754 } |
| 1755 | 1755 |
| 1756 } // namespace blink | 1756 } // namespace blink |
| OLD | NEW |