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

Side by Side Diff: src/mark-compact.cc

Issue 5685010: Postpone interrupts during marking garbage collection. This allows the check... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 10 years 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 | « no previous file | 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 // Copyright 2006-2008 the V8 project authors. All rights reserved. 1 // Copyright 2006-2008 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 1263 matching lines...) Expand 10 before | Expand all | Expand 10 after
1274 while (work_to_do) { 1274 while (work_to_do) {
1275 MarkObjectGroups(); 1275 MarkObjectGroups();
1276 work_to_do = !marking_stack.is_empty(); 1276 work_to_do = !marking_stack.is_empty();
1277 ProcessMarkingStack(); 1277 ProcessMarkingStack();
1278 } 1278 }
1279 } 1279 }
1280 1280
1281 1281
1282 void MarkCompactCollector::MarkLiveObjects() { 1282 void MarkCompactCollector::MarkLiveObjects() {
1283 GCTracer::Scope gc_scope(tracer_, GCTracer::Scope::MC_MARK); 1283 GCTracer::Scope gc_scope(tracer_, GCTracer::Scope::MC_MARK);
1284 PostponeInterruptsScope postpone;
Vyacheslav Egorov (Chromium) 2010/12/14 11:34:52 Please consider commenting why we need this scope
William Hesse 2010/12/14 11:59:22 Done.
1285
1284 #ifdef DEBUG 1286 #ifdef DEBUG
1285 ASSERT(state_ == PREPARE_GC); 1287 ASSERT(state_ == PREPARE_GC);
1286 state_ = MARK_LIVE_OBJECTS; 1288 state_ = MARK_LIVE_OBJECTS;
1287 #endif 1289 #endif
1288 // The to space contains live objects, the from space is used as a marking 1290 // The to space contains live objects, the from space is used as a marking
1289 // stack. 1291 // stack.
1290 marking_stack.Initialize(Heap::new_space()->FromSpaceLow(), 1292 marking_stack.Initialize(Heap::new_space()->FromSpaceLow(),
1291 Heap::new_space()->FromSpaceHigh()); 1293 Heap::new_space()->FromSpaceHigh());
1292 1294
1293 ASSERT(!marking_stack.overflowed()); 1295 ASSERT(!marking_stack.overflowed());
(...skipping 1624 matching lines...) Expand 10 before | Expand all | Expand 10 after
2918 } 2920 }
2919 2921
2920 2922
2921 void MarkCompactCollector::Initialize() { 2923 void MarkCompactCollector::Initialize() {
2922 StaticPointersToNewGenUpdatingVisitor::Initialize(); 2924 StaticPointersToNewGenUpdatingVisitor::Initialize();
2923 StaticMarkingVisitor::Initialize(); 2925 StaticMarkingVisitor::Initialize();
2924 } 2926 }
2925 2927
2926 2928
2927 } } // namespace v8::internal 2929 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698