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

Side by Side Diff: src/heap/heap.h

Issue 479113004: Remove conservative sweeping. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 4 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/heap-snapshot-generator.cc ('k') | src/heap/heap.cc » ('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 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef V8_HEAP_HEAP_H_ 5 #ifndef V8_HEAP_HEAP_H_
6 #define V8_HEAP_HEAP_H_ 6 #define V8_HEAP_HEAP_H_
7 7
8 #include <cmath> 8 #include <cmath>
9 9
10 #include "src/allocation.h" 10 #include "src/allocation.h"
(...skipping 695 matching lines...) Expand 10 before | Expand all | Expand 10 after
706 inline Object* ToBoolean(bool condition); 706 inline Object* ToBoolean(bool condition);
707 707
708 // Performs garbage collection operation. 708 // Performs garbage collection operation.
709 // Returns whether there is a chance that another major GC could 709 // Returns whether there is a chance that another major GC could
710 // collect more garbage. 710 // collect more garbage.
711 inline bool CollectGarbage( 711 inline bool CollectGarbage(
712 AllocationSpace space, const char* gc_reason = NULL, 712 AllocationSpace space, const char* gc_reason = NULL,
713 const GCCallbackFlags gc_callback_flags = kNoGCCallbackFlags); 713 const GCCallbackFlags gc_callback_flags = kNoGCCallbackFlags);
714 714
715 static const int kNoGCFlags = 0; 715 static const int kNoGCFlags = 0;
716 static const int kSweepPreciselyMask = 1; 716 static const int kReduceMemoryFootprintMask = 1;
717 static const int kReduceMemoryFootprintMask = 2; 717 static const int kAbortIncrementalMarkingMask = 2;
718 static const int kAbortIncrementalMarkingMask = 4;
719 718
720 // Making the heap iterable requires us to sweep precisely and abort any 719 // Making the heap iterable requires us to abort incremental marking.
721 // incremental marking as well. 720 static const int kMakeHeapIterableMask = kAbortIncrementalMarkingMask;
722 static const int kMakeHeapIterableMask =
723 kSweepPreciselyMask | kAbortIncrementalMarkingMask;
724 721
725 // Performs a full garbage collection. If (flags & kMakeHeapIterableMask) is 722 // Performs a full garbage collection. If (flags & kMakeHeapIterableMask) is
726 // non-zero, then the slower precise sweeper is used, which leaves the heap 723 // non-zero, then the slower precise sweeper is used, which leaves the heap
727 // in a state where we can iterate over the heap visiting all objects. 724 // in a state where we can iterate over the heap visiting all objects.
728 void CollectAllGarbage( 725 void CollectAllGarbage(
729 int flags, const char* gc_reason = NULL, 726 int flags, const char* gc_reason = NULL,
730 const GCCallbackFlags gc_callback_flags = kNoGCCallbackFlags); 727 const GCCallbackFlags gc_callback_flags = kNoGCCallbackFlags);
731 728
732 // Last hope GC, should try to squeeze as much as possible. 729 // Last hope GC, should try to squeeze as much as possible.
733 void CollectAllAvailableGarbage(const char* gc_reason = NULL); 730 void CollectAllAvailableGarbage(const char* gc_reason = NULL);
(...skipping 1786 matching lines...) Expand 10 before | Expand all | Expand 10 after
2520 DisallowHeapAllocation no_allocation; // i.e. no gc allowed. 2517 DisallowHeapAllocation no_allocation; // i.e. no gc allowed.
2521 2518
2522 private: 2519 private:
2523 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); 2520 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer);
2524 }; 2521 };
2525 #endif // DEBUG 2522 #endif // DEBUG
2526 } 2523 }
2527 } // namespace v8::internal 2524 } // namespace v8::internal
2528 2525
2529 #endif // V8_HEAP_HEAP_H_ 2526 #endif // V8_HEAP_HEAP_H_
OLDNEW
« no previous file with comments | « src/heap-snapshot-generator.cc ('k') | src/heap/heap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698