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

Side by Side Diff: src/store-buffer.cc

Issue 8381040: Move some heap verification code in under the --verify-heap flag to speed (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 9 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 | « src/spaces.cc ('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 // Copyright 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 372 matching lines...) Expand 10 before | Expand all | Expand 10 after
383 slot_address += kPointerSize; 383 slot_address += kPointerSize;
384 } 384 }
385 } 385 }
386 } 386 }
387 } 387 }
388 #endif 388 #endif
389 389
390 390
391 void StoreBuffer::Verify() { 391 void StoreBuffer::Verify() {
392 #ifdef DEBUG 392 #ifdef DEBUG
393 if (FLAG_enable_slow_asserts || FLAG_verify_heap) { 393 VerifyPointers(heap_->old_pointer_space(),
394 VerifyPointers(heap_->old_pointer_space(), 394 &StoreBuffer::FindPointersToNewSpaceInRegion);
395 &StoreBuffer::FindPointersToNewSpaceInRegion); 395 VerifyPointers(heap_->map_space(),
396 VerifyPointers(heap_->map_space(), 396 &StoreBuffer::FindPointersToNewSpaceInMapsRegion);
397 &StoreBuffer::FindPointersToNewSpaceInMapsRegion); 397 VerifyPointers(heap_->lo_space());
398 VerifyPointers(heap_->lo_space());
399 }
400 #endif 398 #endif
401 } 399 }
402 400
403 401
404 void StoreBuffer::GCEpilogue() { 402 void StoreBuffer::GCEpilogue() {
405 during_gc_ = false; 403 during_gc_ = false;
406 Verify(); 404 if (FLAG_verify_heap) {
405 Verify();
406 }
407 } 407 }
408 408
409 409
410 void StoreBuffer::FindPointersToNewSpaceInRegion( 410 void StoreBuffer::FindPointersToNewSpaceInRegion(
411 Address start, Address end, ObjectSlotCallback slot_callback) { 411 Address start, Address end, ObjectSlotCallback slot_callback) {
412 for (Address slot_address = start; 412 for (Address slot_address = start;
413 slot_address < end; 413 slot_address < end;
414 slot_address += kPointerSize) { 414 slot_address += kPointerSize) {
415 Object** slot = reinterpret_cast<Object**>(slot_address); 415 Object** slot = reinterpret_cast<Object**>(slot_address);
416 if (heap_->InNewSpace(*slot)) { 416 if (heap_->InNewSpace(*slot)) {
(...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after
687 } 687 }
688 688
689 689
690 void StoreBuffer::CheckForFullBuffer() { 690 void StoreBuffer::CheckForFullBuffer() {
691 if (old_limit_ - old_top_ < kStoreBufferSize * 2) { 691 if (old_limit_ - old_top_ < kStoreBufferSize * 2) {
692 HandleFullness(); 692 HandleFullness();
693 } 693 }
694 } 694 }
695 695
696 } } // namespace v8::internal 696 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/spaces.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698