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

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

Issue 11022007: Make GDBJIT interface compile again. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years, 2 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 | « src/gdb-jit.cc ('k') | tools/gyp/v8.gyp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 321 matching lines...) Expand 10 before | Expand all | Expand 10 after
332 number_of_pages, 332 number_of_pages,
333 static_cast<int>(free), 333 static_cast<int>(free),
334 static_cast<double>(free) * 100 / reserved); 334 static_cast<double>(free) * 100 / reserved);
335 } 335 }
336 336
337 337
338 bool MarkCompactCollector::StartCompaction(CompactionMode mode) { 338 bool MarkCompactCollector::StartCompaction(CompactionMode mode) {
339 if (!compacting_) { 339 if (!compacting_) {
340 ASSERT(evacuation_candidates_.length() == 0); 340 ASSERT(evacuation_candidates_.length() == 0);
341 341
342 #ifdef ENABLE_GDB_JIT_INTERFACE
343 // If GDBJIT interface is active disable compaction.
344 if (FLAG_gdbjit) return false;
345 #endif
346
342 CollectEvacuationCandidates(heap()->old_pointer_space()); 347 CollectEvacuationCandidates(heap()->old_pointer_space());
343 CollectEvacuationCandidates(heap()->old_data_space()); 348 CollectEvacuationCandidates(heap()->old_data_space());
344 349
345 if (FLAG_compact_code_space && 350 if (FLAG_compact_code_space &&
346 (mode == NON_INCREMENTAL_COMPACTION || 351 (mode == NON_INCREMENTAL_COMPACTION ||
347 FLAG_incremental_code_compaction)) { 352 FLAG_incremental_code_compaction)) {
348 CollectEvacuationCandidates(heap()->code_space()); 353 CollectEvacuationCandidates(heap()->code_space());
349 } else if (FLAG_trace_fragmentation) { 354 } else if (FLAG_trace_fragmentation) {
350 TraceFragmentation(heap()->code_space()); 355 TraceFragmentation(heap()->code_space());
351 } 356 }
(...skipping 419 matching lines...) Expand 10 before | Expand all | Expand 10 after
771 // variable. 776 // variable.
772 tracer_ = tracer; 777 tracer_ = tracer;
773 778
774 #ifdef DEBUG 779 #ifdef DEBUG
775 ASSERT(state_ == IDLE); 780 ASSERT(state_ == IDLE);
776 state_ = PREPARE_GC; 781 state_ = PREPARE_GC;
777 #endif 782 #endif
778 783
779 ASSERT(!FLAG_never_compact || !FLAG_always_compact); 784 ASSERT(!FLAG_never_compact || !FLAG_always_compact);
780 785
781 #ifdef ENABLE_GDB_JIT_INTERFACE
782 if (FLAG_gdbjit) {
783 // If GDBJIT interface is active disable compaction.
784 compacting_collection_ = false;
785 }
786 #endif
787
788 // Clear marking bits if incremental marking is aborted. 786 // Clear marking bits if incremental marking is aborted.
789 if (was_marked_incrementally_ && abort_incremental_marking_) { 787 if (was_marked_incrementally_ && abort_incremental_marking_) {
790 heap()->incremental_marking()->Abort(); 788 heap()->incremental_marking()->Abort();
791 ClearMarkbits(); 789 ClearMarkbits();
792 AbortCompaction(); 790 AbortCompaction();
793 was_marked_incrementally_ = false; 791 was_marked_incrementally_ = false;
794 } 792 }
795 793
796 // Don't start compaction if we are in the middle of incremental 794 // Don't start compaction if we are in the middle of incremental
797 // marking cycle. We did not collect any slots. 795 // marking cycle. We did not collect any slots.
(...skipping 3343 matching lines...) Expand 10 before | Expand all | Expand 10 after
4141 while (buffer != NULL) { 4139 while (buffer != NULL) {
4142 SlotsBuffer* next_buffer = buffer->next(); 4140 SlotsBuffer* next_buffer = buffer->next();
4143 DeallocateBuffer(buffer); 4141 DeallocateBuffer(buffer);
4144 buffer = next_buffer; 4142 buffer = next_buffer;
4145 } 4143 }
4146 *buffer_address = NULL; 4144 *buffer_address = NULL;
4147 } 4145 }
4148 4146
4149 4147
4150 } } // namespace v8::internal 4148 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/gdb-jit.cc ('k') | tools/gyp/v8.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698