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

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

Issue 8997004: Do not delay sweeping of pages that are completely free. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 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 | src/spaces.cc » ('j') | src/spaces.cc » ('J')
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 3605 matching lines...) Expand 10 before | Expand all | Expand 10 after
3616 if (p->IsEvacuationCandidate()) { 3616 if (p->IsEvacuationCandidate()) {
3617 ASSERT(evacuation_candidates_.length() > 0); 3617 ASSERT(evacuation_candidates_.length() > 0);
3618 continue; 3618 continue;
3619 } 3619 }
3620 3620
3621 if (p->IsFlagSet(Page::RESCAN_ON_EVACUATION)) { 3621 if (p->IsFlagSet(Page::RESCAN_ON_EVACUATION)) {
3622 // Will be processed in EvacuateNewSpaceAndCandidates. 3622 // Will be processed in EvacuateNewSpaceAndCandidates.
3623 continue; 3623 continue;
3624 } 3624 }
3625 3625
3626 if (lazy_sweeping_active) {
3627 if (FLAG_gc_verbose) {
3628 PrintF("Sweeping 0x%" V8PRIxPTR " lazily postponed.\n",
3629 reinterpret_cast<intptr_t>(p));
3630 }
3631 continue;
3632 }
3633
3634 // One unused page is kept, all further are released before sweeping them. 3626 // One unused page is kept, all further are released before sweeping them.
3635 if (p->LiveBytes() == 0) { 3627 if (p->LiveBytes() == 0) {
3636 if (unused_page_present) { 3628 if (unused_page_present) {
3637 if (FLAG_gc_verbose) { 3629 if (FLAG_gc_verbose) {
3638 PrintF("Sweeping 0x%" V8PRIxPTR " released page.\n", 3630 PrintF("Sweeping 0x%" V8PRIxPTR " released page.\n",
3639 reinterpret_cast<intptr_t>(p)); 3631 reinterpret_cast<intptr_t>(p));
3640 } 3632 }
3641 space->ReleasePage(p); 3633 space->ReleasePage(p);
3642 continue; 3634 continue;
3643 } 3635 }
3644 unused_page_present = true; 3636 unused_page_present = true;
3645 } 3637 }
3646 3638
3639 if (lazy_sweeping_active) {
3640 if (FLAG_gc_verbose) {
3641 PrintF("Sweeping 0x%" V8PRIxPTR " lazily postponed.\n",
3642 reinterpret_cast<intptr_t>(p));
3643 }
3644 continue;
3645 }
3646
3647 switch (sweeper) { 3647 switch (sweeper) {
3648 case CONSERVATIVE: { 3648 case CONSERVATIVE: {
3649 if (FLAG_gc_verbose) { 3649 if (FLAG_gc_verbose) {
3650 PrintF("Sweeping 0x%" V8PRIxPTR " conservatively.\n", 3650 PrintF("Sweeping 0x%" V8PRIxPTR " conservatively.\n",
3651 reinterpret_cast<intptr_t>(p)); 3651 reinterpret_cast<intptr_t>(p));
3652 } 3652 }
3653 SweepConservatively(space, p); 3653 SweepConservatively(space, p);
3654 pages_swept++; 3654 pages_swept++;
3655 break; 3655 break;
3656 } 3656 }
(...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after
3903 while (buffer != NULL) { 3903 while (buffer != NULL) {
3904 SlotsBuffer* next_buffer = buffer->next(); 3904 SlotsBuffer* next_buffer = buffer->next();
3905 DeallocateBuffer(buffer); 3905 DeallocateBuffer(buffer);
3906 buffer = next_buffer; 3906 buffer = next_buffer;
3907 } 3907 }
3908 *buffer_address = NULL; 3908 *buffer_address = NULL;
3909 } 3909 }
3910 3910
3911 3911
3912 } } // namespace v8::internal 3912 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | src/spaces.cc » ('j') | src/spaces.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698