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

Side by Side Diff: src/heap.h

Issue 7105016: Ensure strings are never externalized as a side-effect of doing a GC. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 9 years, 6 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/api.cc ('k') | 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 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 1035 matching lines...) Expand 10 before | Expand all | Expand 10 after
1046 inline void RecordWrites(Address address, int start, int len); 1046 inline void RecordWrites(Address address, int start, int len);
1047 1047
1048 // Given an address occupied by a live code object, return that object. 1048 // Given an address occupied by a live code object, return that object.
1049 Object* FindCodeObject(Address a); 1049 Object* FindCodeObject(Address a);
1050 1050
1051 // Invoke Shrink on shrinkable spaces. 1051 // Invoke Shrink on shrinkable spaces.
1052 void Shrink(); 1052 void Shrink();
1053 1053
1054 enum HeapState { NOT_IN_GC, SCAVENGE, MARK_COMPACT }; 1054 enum HeapState { NOT_IN_GC, SCAVENGE, MARK_COMPACT };
1055 inline HeapState gc_state() { return gc_state_; } 1055 inline HeapState gc_state() { return gc_state_; }
1056
1057 inline int gc_post_process_count() { return gc_post_process_count_; }
Vyacheslav Egorov (Chromium) 2011/06/01 11:12:35 Better make it a: bool IsInGCPostProcessing() { r
sandholm 2011/06/01 11:39:34 Done.
1058
1056 1059
1057 #ifdef DEBUG 1060 #ifdef DEBUG
1058 bool IsAllocationAllowed() { return allocation_allowed_; } 1061 bool IsAllocationAllowed() { return allocation_allowed_; }
1059 inline bool allow_allocation(bool enable); 1062 inline bool allow_allocation(bool enable);
1060 1063
1061 bool disallow_allocation_failure() { 1064 bool disallow_allocation_failure() {
1062 return disallow_allocation_failure_; 1065 return disallow_allocation_failure_;
1063 } 1066 }
1064 1067
1065 void TracePathToObject(Object* target); 1068 void TracePathToObject(Object* target);
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after
1270 #endif 1273 #endif
1271 1274
1272 NewSpace new_space_; 1275 NewSpace new_space_;
1273 OldSpace* old_pointer_space_; 1276 OldSpace* old_pointer_space_;
1274 OldSpace* old_data_space_; 1277 OldSpace* old_data_space_;
1275 OldSpace* code_space_; 1278 OldSpace* code_space_;
1276 MapSpace* map_space_; 1279 MapSpace* map_space_;
1277 CellSpace* cell_space_; 1280 CellSpace* cell_space_;
1278 LargeObjectSpace* lo_space_; 1281 LargeObjectSpace* lo_space_;
1279 HeapState gc_state_; 1282 HeapState gc_state_;
1283 int gc_post_process_count_;
Vyacheslav Egorov (Chromium) 2011/06/01 11:12:35 Name is a bit confusing. Consider naming it: gc_p
sandholm 2011/06/01 11:39:34 Done.
1280 1284
1281 // Returns the size of object residing in non new spaces. 1285 // Returns the size of object residing in non new spaces.
1282 intptr_t PromotedSpaceSize(); 1286 intptr_t PromotedSpaceSize();
1283 1287
1284 // Returns the amount of external memory registered since last global gc. 1288 // Returns the amount of external memory registered since last global gc.
1285 int PromotedExternalMemorySize(); 1289 int PromotedExternalMemorySize();
1286 1290
1287 int mc_count_; // how many mark-compact collections happened 1291 int mc_count_; // how many mark-compact collections happened
1288 int ms_count_; // how many mark-sweep collections happened 1292 int ms_count_; // how many mark-sweep collections happened
1289 unsigned int gc_count_; // how many gc happened 1293 unsigned int gc_count_; // how many gc happened
(...skipping 969 matching lines...) Expand 10 before | Expand all | Expand 10 after
2259 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); 2263 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer);
2260 }; 2264 };
2261 #endif // DEBUG || LIVE_OBJECT_LIST 2265 #endif // DEBUG || LIVE_OBJECT_LIST
2262 2266
2263 2267
2264 } } // namespace v8::internal 2268 } } // namespace v8::internal
2265 2269
2266 #undef HEAP 2270 #undef HEAP
2267 2271
2268 #endif // V8_HEAP_H_ 2272 #endif // V8_HEAP_H_
OLDNEW
« no previous file with comments | « src/api.cc ('k') | src/heap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698