Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(94)

Side by Side Diff: Source/platform/heap/ThreadState.cpp

Issue 744103003: Oilpan: Implement bitmap marking Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/platform/heap/ThreadState.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 861 matching lines...) Expand 10 before | Expand all | Expand 10 after
872 for (int i = 0; i < NumberOfHeaps; i++) { 872 for (int i = 0; i < NumberOfHeaps; i++) {
873 BaseHeap* heap = m_heaps[i]; 873 BaseHeap* heap = m_heaps[i];
874 heap->makeConsistentForSweeping(); 874 heap->makeConsistentForSweeping();
875 // If a new GC is requested before this thread got around to sweep, ie. due to the 875 // If a new GC is requested before this thread got around to sweep, ie. due to the
876 // thread doing a long running operation, we clear the mark bits and mar k any of 876 // thread doing a long running operation, we clear the mark bits and mar k any of
877 // the dead objects as dead. The latter is used to ensure the next GC ma rking does 877 // the dead objects as dead. The latter is used to ensure the next GC ma rking does
878 // not trace already dead objects. If we trace a dead object we could en d up tracing 878 // not trace already dead objects. If we trace a dead object we could en d up tracing
879 // into garbage or the middle of another object via the newly conservati vely found 879 // into garbage or the middle of another object via the newly conservati vely found
880 // object. 880 // object.
881 if (sweepRequested()) 881 if (sweepRequested())
882 heap->clearLiveAndMarkDead(); 882 heap->makeUnmarkedObjectsDead();
883 heap->clearObjectMarkBitMaps();
883 } 884 }
884 prepareRegionTree(); 885 prepareRegionTree();
885 setSweepRequested(); 886 setSweepRequested();
886 flushHeapDoesNotContainCacheIfNeeded(); 887 flushHeapDoesNotContainCacheIfNeeded();
887 } 888 }
888 889
889 void ThreadState::setupHeapsForTermination() 890 void ThreadState::setupHeapsForTermination()
890 { 891 {
891 for (int i = 0; i < NumberOfHeaps; i++) 892 for (int i = 0; i < NumberOfHeaps; i++)
892 m_heaps[i]->prepareHeapForTermination(); 893 m_heaps[i]->prepareHeapForTermination();
(...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after
1163 return gcInfo; 1164 return gcInfo;
1164 } 1165 }
1165 } 1166 }
1166 if (needLockForIteration) 1167 if (needLockForIteration)
1167 threadAttachMutex().unlock(); 1168 threadAttachMutex().unlock();
1168 return 0; 1169 return 0;
1169 } 1170 }
1170 #endif 1171 #endif
1171 1172
1172 } // namespace blink 1173 } // namespace blink
OLDNEW
« no previous file with comments | « Source/platform/heap/ThreadState.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698