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

Side by Side Diff: src/heap.h

Issue 9608006: Add kAbortIncrementalMarkingMask flag for GC. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed comments by Ulan Degenbaev. Created 8 years, 9 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 | src/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 // 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 1023 matching lines...) Expand 10 before | Expand all | Expand 10 after
1034 const char* gc_reason, 1034 const char* gc_reason,
1035 const char* collector_reason); 1035 const char* collector_reason);
1036 1036
1037 // Performs garbage collection operation. 1037 // Performs garbage collection operation.
1038 // Returns whether there is a chance that another major GC could 1038 // Returns whether there is a chance that another major GC could
1039 // collect more garbage. 1039 // collect more garbage.
1040 inline bool CollectGarbage(AllocationSpace space, 1040 inline bool CollectGarbage(AllocationSpace space,
1041 const char* gc_reason = NULL); 1041 const char* gc_reason = NULL);
1042 1042
1043 static const int kNoGCFlags = 0; 1043 static const int kNoGCFlags = 0;
1044 static const int kMakeHeapIterableMask = 1; 1044 static const int kSweepPreciselyMask = 1;
1045 static const int kReduceMemoryFootprintMask = 2; 1045 static const int kReduceMemoryFootprintMask = 2;
1046 static const int kAbortIncrementalMarkingMask = 4;
1047
1048 // Making the heap iterable requires us to sweep precisely and abort any
1049 // incremental marking as well.
1050 static const int kMakeHeapIterableMask =
1051 kSweepPreciselyMask | kAbortIncrementalMarkingMask;
1046 1052
1047 // Performs a full garbage collection. If (flags & kMakeHeapIterableMask) is 1053 // Performs a full garbage collection. If (flags & kMakeHeapIterableMask) is
1048 // non-zero, then the slower precise sweeper is used, which leaves the heap 1054 // non-zero, then the slower precise sweeper is used, which leaves the heap
1049 // in a state where we can iterate over the heap visiting all objects. 1055 // in a state where we can iterate over the heap visiting all objects.
1050 void CollectAllGarbage(int flags, const char* gc_reason = NULL); 1056 void CollectAllGarbage(int flags, const char* gc_reason = NULL);
1051 1057
1052 // Last hope GC, should try to squeeze as much as possible. 1058 // Last hope GC, should try to squeeze as much as possible.
1053 void CollectAllAvailableGarbage(const char* gc_reason = NULL); 1059 void CollectAllAvailableGarbage(const char* gc_reason = NULL);
1054 1060
1055 // Check whether the heap is currently iterable. 1061 // Check whether the heap is currently iterable.
(...skipping 1609 matching lines...) Expand 10 before | Expand all | Expand 10 after
2665 AssertNoAllocation no_alloc; // i.e. no gc allowed. 2671 AssertNoAllocation no_alloc; // i.e. no gc allowed.
2666 2672
2667 private: 2673 private:
2668 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); 2674 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer);
2669 }; 2675 };
2670 #endif // DEBUG || LIVE_OBJECT_LIST 2676 #endif // DEBUG || LIVE_OBJECT_LIST
2671 2677
2672 } } // namespace v8::internal 2678 } } // namespace v8::internal
2673 2679
2674 #endif // V8_HEAP_H_ 2680 #endif // V8_HEAP_H_
OLDNEW
« no previous file with comments | « no previous file | src/heap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698