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

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

Issue 8017001: Fix for gdbjit. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 years, 3 months 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 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 465 matching lines...) Expand 10 before | Expand all | Expand 10 after
476 // variable. 476 // variable.
477 tracer_ = tracer; 477 tracer_ = tracer;
478 478
479 #ifdef DEBUG 479 #ifdef DEBUG
480 ASSERT(state_ == IDLE); 480 ASSERT(state_ == IDLE);
481 state_ = PREPARE_GC; 481 state_ = PREPARE_GC;
482 #endif 482 #endif
483 ASSERT(!FLAG_always_compact || !FLAG_never_compact); 483 ASSERT(!FLAG_always_compact || !FLAG_never_compact);
484 484
485 if (collect_maps_) CreateBackPointers(); 485 if (collect_maps_) CreateBackPointers();
486 bool gdbjit = false;
486 #ifdef ENABLE_GDB_JIT_INTERFACE 487 #ifdef ENABLE_GDB_JIT_INTERFACE
487 if (FLAG_gdbjit) { 488 if (FLAG_gdbjit) {
488 // If GDBJIT interface is active disable compaction. 489 // If GDBJIT interface is active disable compaction.
489 compacting_collection_ = false; 490 gdbjit = true;
Vyacheslav Egorov (Chromium) 2011/09/23 09:27:55 lets instead do never_compact = true; sweep_prec
490 } 491 }
491 #endif 492 #endif
492 493
493 // Clear marking bits for precise sweeping to collect all garbage. 494 // Clear marking bits for precise sweeping to collect all garbage.
494 if (was_marked_incrementally_ && PreciseSweepingRequired()) { 495 if ((was_marked_incrementally_ && PreciseSweepingRequired()) || gdbjit) {
495 heap()->incremental_marking()->Abort(); 496 heap()->incremental_marking()->Abort();
496 ClearMarkbits(heap_); 497 ClearMarkbits(heap_);
497 AbortCompaction(); 498 AbortCompaction();
498 was_marked_incrementally_ = false; 499 was_marked_incrementally_ = false;
499 } 500 }
500 501
501 // Don't start compaction if we are in the middle of incremental 502 // Don't start compaction if we are in the middle of incremental
502 // marking cycle. We did not collect any slots. 503 // marking cycle. We did not collect any slots.
503 if (!FLAG_never_compact && !was_marked_incrementally_) { 504 if (!FLAG_never_compact && !was_marked_incrementally_) {
504 StartCompaction(); 505 StartCompaction();
(...skipping 3313 matching lines...) Expand 10 before | Expand all | Expand 10 after
3818 while (buffer != NULL) { 3819 while (buffer != NULL) {
3819 SlotsBuffer* next_buffer = buffer->next(); 3820 SlotsBuffer* next_buffer = buffer->next();
3820 DeallocateBuffer(buffer); 3821 DeallocateBuffer(buffer);
3821 buffer = next_buffer; 3822 buffer = next_buffer;
3822 } 3823 }
3823 *buffer_address = NULL; 3824 *buffer_address = NULL;
3824 } 3825 }
3825 3826
3826 3827
3827 } } // namespace v8::internal 3828 } } // 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