| 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 296 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|   307     , m_persistents(adoptPtr(new PersistentAnchor())) |   307     , m_persistents(adoptPtr(new PersistentAnchor())) | 
|   308     , m_startOfStack(reinterpret_cast<intptr_t*>(getStackStart())) |   308     , m_startOfStack(reinterpret_cast<intptr_t*>(getStackStart())) | 
|   309     , m_endOfStack(reinterpret_cast<intptr_t*>(getStackStart())) |   309     , m_endOfStack(reinterpret_cast<intptr_t*>(getStackStart())) | 
|   310     , m_safePointScopeMarker(nullptr) |   310     , m_safePointScopeMarker(nullptr) | 
|   311     , m_atSafePoint(false) |   311     , m_atSafePoint(false) | 
|   312     , m_interruptors() |   312     , m_interruptors() | 
|   313     , m_didV8GCAfterLastGC(false) |   313     , m_didV8GCAfterLastGC(false) | 
|   314     , m_sweepForbidden(false) |   314     , m_sweepForbidden(false) | 
|   315     , m_noAllocationCount(0) |   315     , m_noAllocationCount(0) | 
|   316     , m_isTerminating(false) |   316     , m_isTerminating(false) | 
 |   317     , m_lazySweepToggle(false) | 
|   317     , m_shouldFlushHeapDoesNotContainCache(false) |   318     , m_shouldFlushHeapDoesNotContainCache(false) | 
|   318     , m_collectionRate(1.0) |   319     , m_collectionRate(1.0) | 
|   319     , m_gcState(NoGCScheduled) |   320     , m_gcState(NoGCScheduled) | 
|   320     , m_traceDOMWrappers(nullptr) |   321     , m_traceDOMWrappers(nullptr) | 
|   321 #if defined(ADDRESS_SANITIZER) |   322 #if defined(ADDRESS_SANITIZER) | 
|   322     , m_asanFakeStack(__asan_get_current_fake_stack()) |   323     , m_asanFakeStack(__asan_get_current_fake_stack()) | 
|   323 #endif |   324 #endif | 
|   324 { |   325 { | 
|   325     checkThread(); |   326     checkThread(); | 
|   326     ASSERT(!**s_threadSpecific); |   327     ASSERT(!**s_threadSpecific); | 
| (...skipping 572 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|   899     } |   900     } | 
|   900 } |   901 } | 
|   901  |   902  | 
|   902 void ThreadState::preGC() |   903 void ThreadState::preGC() | 
|   903 { |   904 { | 
|   904     ASSERT(!isInGC()); |   905     ASSERT(!isInGC()); | 
|   905     setGCState(GCRunning); |   906     setGCState(GCRunning); | 
|   906     makeConsistentForSweeping(); |   907     makeConsistentForSweeping(); | 
|   907     prepareRegionTree(); |   908     prepareRegionTree(); | 
|   908     flushHeapDoesNotContainCacheIfNeeded(); |   909     flushHeapDoesNotContainCacheIfNeeded(); | 
 |   910     m_lazySweepToggle = !m_lazySweepToggle; | 
|   909     if (isMainThread()) |   911     if (isMainThread()) | 
|   910         m_allocatedObjectSizeBeforeGC = Heap::allocatedObjectSize() + Heap::mark
      edObjectSize(); |   912         m_allocatedObjectSizeBeforeGC = Heap::allocatedObjectSize() + Heap::mark
      edObjectSize(); | 
|   911 } |   913 } | 
|   912  |   914  | 
|   913 void ThreadState::postGC(GCType gcType) |   915 void ThreadState::postGC(GCType gcType) | 
|   914 { |   916 { | 
|   915     ASSERT(isInGC()); |   917     ASSERT(isInGC()); | 
|   916     setGCState(gcType == GCWithSweep ? EagerSweepScheduled : LazySweepScheduled)
      ; |   918     setGCState(gcType == GCWithSweep ? EagerSweepScheduled : LazySweepScheduled)
      ; | 
|   917     for (int i = 0; i < NumberOfHeaps; i++) |   919     for (int i = 0; i < NumberOfHeaps; i++) | 
|   918         m_heaps[i]->prepareForSweep(); |   920         m_heaps[i]->prepareForSweep(); | 
| (...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  1175             return gcInfo; |  1177             return gcInfo; | 
|  1176         } |  1178         } | 
|  1177     } |  1179     } | 
|  1178     if (needLockForIteration) |  1180     if (needLockForIteration) | 
|  1179         threadAttachMutex().unlock(); |  1181         threadAttachMutex().unlock(); | 
|  1180     return nullptr; |  1182     return nullptr; | 
|  1181 } |  1183 } | 
|  1182 #endif |  1184 #endif | 
|  1183  |  1185  | 
|  1184 } // namespace blink |  1186 } // namespace blink | 
| OLD | NEW |