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

Side by Side Diff: src/heap.h

Issue 6824078: Move most of the incremental marking write barrier to generated code. (Closed) Base URL: http://v8.googlecode.com/svn/branches/experimental/gc/
Patch Set: '' Created 9 years, 8 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/assembler.cc ('k') | src/heap.cc » ('j') | src/heap.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 789 matching lines...) Expand 10 before | Expand all | Expand 10 after
800 // Last hope GC, should try to squeeze as much as possible. 800 // Last hope GC, should try to squeeze as much as possible.
801 static void CollectAllAvailableGarbage(); 801 static void CollectAllAvailableGarbage();
802 802
803 // Notify the heap that a context has been disposed. 803 // Notify the heap that a context has been disposed.
804 static int NotifyContextDisposed() { return ++contexts_disposed_; } 804 static int NotifyContextDisposed() { return ++contexts_disposed_; }
805 805
806 // Utility to invoke the scavenger. This is needed in test code to 806 // Utility to invoke the scavenger. This is needed in test code to
807 // ensure correct callback for weak global handles. 807 // ensure correct callback for weak global handles.
808 static void PerformScavenge(); 808 static void PerformScavenge();
809 809
810 static inline void increment_scan_on_scavenge_pages() {
811 scan_on_scavenge_pages_++;
812 }
813
814 static inline void decrement_scan_on_scavenge_pages() {
815 scan_on_scavenge_pages_++;
Vyacheslav Egorov (Chromium) 2011/04/16 17:50:36 ++ -> --
Erik Corry 2011/04/23 17:00:11 oops.
816 }
817
810 #ifdef DEBUG 818 #ifdef DEBUG
811 // Utility used with flag gc-greedy. 819 // Utility used with flag gc-greedy.
812 static void GarbageCollectionGreedyCheck(); 820 static void GarbageCollectionGreedyCheck();
813 #endif 821 #endif
814 822
815 static void AddGCPrologueCallback( 823 static void AddGCPrologueCallback(
816 GCEpilogueCallback callback, GCType gc_type_filter); 824 GCEpilogueCallback callback, GCType gc_type_filter);
817 static void RemoveGCPrologueCallback(GCEpilogueCallback callback); 825 static void RemoveGCPrologueCallback(GCEpilogueCallback callback);
818 826
819 static void AddGCEpilogueCallback( 827 static void AddGCEpilogueCallback(
(...skipping 387 matching lines...) Expand 10 before | Expand all | Expand 10 after
1207 // For keeping track of how much data has survived 1215 // For keeping track of how much data has survived
1208 // scavenge since last new space expansion. 1216 // scavenge since last new space expansion.
1209 static int survived_since_last_expansion_; 1217 static int survived_since_last_expansion_;
1210 1218
1211 static int always_allocate_scope_depth_; 1219 static int always_allocate_scope_depth_;
1212 static int linear_allocation_scope_depth_; 1220 static int linear_allocation_scope_depth_;
1213 1221
1214 // For keeping track of context disposals. 1222 // For keeping track of context disposals.
1215 static int contexts_disposed_; 1223 static int contexts_disposed_;
1216 1224
1225 static int scan_on_scavenge_pages_;
1226
1217 #if defined(V8_TARGET_ARCH_X64) 1227 #if defined(V8_TARGET_ARCH_X64)
1218 static const int kMaxObjectSizeInNewSpace = 1024*KB; 1228 static const int kMaxObjectSizeInNewSpace = 1024*KB;
1219 #else 1229 #else
1220 static const int kMaxObjectSizeInNewSpace = 512*KB; 1230 static const int kMaxObjectSizeInNewSpace = 512*KB;
1221 #endif 1231 #endif
1222 1232
1223 static NewSpace new_space_; 1233 static NewSpace new_space_;
1224 static OldSpace* old_pointer_space_; 1234 static OldSpace* old_pointer_space_;
1225 static OldSpace* old_data_space_; 1235 static OldSpace* old_data_space_;
1226 static OldSpace* code_space_; 1236 static OldSpace* code_space_;
(...skipping 1044 matching lines...) Expand 10 before | Expand all | Expand 10 after
2271 2281
2272 AssertNoAllocation no_alloc; // i.e. no gc allowed. 2282 AssertNoAllocation no_alloc; // i.e. no gc allowed.
2273 2283
2274 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); 2284 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer);
2275 }; 2285 };
2276 #endif // DEBUG || LIVE_OBJECT_LIST 2286 #endif // DEBUG || LIVE_OBJECT_LIST
2277 2287
2278 } } // namespace v8::internal 2288 } } // namespace v8::internal
2279 2289
2280 #endif // V8_HEAP_H_ 2290 #endif // V8_HEAP_H_
OLDNEW
« no previous file with comments | « src/assembler.cc ('k') | src/heap.cc » ('j') | src/heap.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698