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

Side by Side Diff: runtime/vm/heap.h

Issue 2974403002: Revert "Moves the top_ and end_ words of the Scavenger into mutator thread." (Closed)
Patch Set: Created 3 years, 5 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
« no previous file with comments | « runtime/vm/dart.cc ('k') | runtime/vm/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 (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #ifndef RUNTIME_VM_HEAP_H_ 5 #ifndef RUNTIME_VM_HEAP_H_
6 #define RUNTIME_VM_HEAP_H_ 6 #define RUNTIME_VM_HEAP_H_
7 7
8 #include "platform/assert.h" 8 #include "platform/assert.h"
9 #include "vm/allocation.h" 9 #include "vm/allocation.h"
10 #include "vm/flags.h" 10 #include "vm/flags.h"
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 void SetGrowthControlState(bool state); 128 void SetGrowthControlState(bool state);
129 bool GrowthControlState(); 129 bool GrowthControlState();
130 130
131 // Protect access to the heap. Note: Code pages are made 131 // Protect access to the heap. Note: Code pages are made
132 // executable/non-executable when 'read_only' is true/false, respectively. 132 // executable/non-executable when 'read_only' is true/false, respectively.
133 void WriteProtect(bool read_only); 133 void WriteProtect(bool read_only);
134 void WriteProtectCode(bool read_only) { 134 void WriteProtectCode(bool read_only) {
135 old_space_.WriteProtectCode(read_only); 135 old_space_.WriteProtectCode(read_only);
136 } 136 }
137 137
138 // Accessors for inlined allocation in generated code.
139 static intptr_t TopOffset(Space space);
140 static intptr_t EndOffset(Space space);
141
138 // Initialize the heap and register it with the isolate. 142 // Initialize the heap and register it with the isolate.
139 static void Init(Isolate* isolate, 143 static void Init(Isolate* isolate,
140 intptr_t max_new_gen_words, 144 intptr_t max_new_gen_words,
141 intptr_t max_old_gen_words, 145 intptr_t max_old_gen_words,
142 intptr_t max_external_words); 146 intptr_t max_external_words);
143 147
144 // Writes a suitable name for a VM region in the heap into the buffer `name`. 148 // Writes a suitable name for a VM region in the heap into the buffer `name`.
145 static void RegionName(Heap* heap, 149 static void RegionName(Heap* heap,
146 Space space, 150 Space space,
147 char* name, 151 char* name,
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after
332 bool BeginNewSpaceGC(Thread* thread); 336 bool BeginNewSpaceGC(Thread* thread);
333 void EndNewSpaceGC(); 337 void EndNewSpaceGC();
334 bool BeginOldSpaceGC(Thread* thread); 338 bool BeginOldSpaceGC(Thread* thread);
335 void EndOldSpaceGC(); 339 void EndOldSpaceGC();
336 340
337 void AddRegionsToObjectSet(ObjectSet* set) const; 341 void AddRegionsToObjectSet(ObjectSet* set) const;
338 342
339 Isolate* isolate_; 343 Isolate* isolate_;
340 344
341 // The different spaces used for allocation. 345 // The different spaces used for allocation.
342 Scavenger new_space_; 346 ALIGN8 Scavenger new_space_;
343 PageSpace old_space_; 347 PageSpace old_space_;
344 348
345 WeakTable* new_weak_tables_[kNumWeakSelectors]; 349 WeakTable* new_weak_tables_[kNumWeakSelectors];
346 WeakTable* old_weak_tables_[kNumWeakSelectors]; 350 WeakTable* old_weak_tables_[kNumWeakSelectors];
347 351
348 Monitor* barrier_; 352 Monitor* barrier_;
349 Monitor* barrier_done_; 353 Monitor* barrier_done_;
350 354
351 // GC stats collection. 355 // GC stats collection.
352 GCStats stats_; 356 GCStats stats_;
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
400 // Note: During this scope, the code pages are non-executable. 404 // Note: During this scope, the code pages are non-executable.
401 class WritableVMIsolateScope : StackResource { 405 class WritableVMIsolateScope : StackResource {
402 public: 406 public:
403 explicit WritableVMIsolateScope(Thread* thread); 407 explicit WritableVMIsolateScope(Thread* thread);
404 ~WritableVMIsolateScope(); 408 ~WritableVMIsolateScope();
405 }; 409 };
406 410
407 } // namespace dart 411 } // namespace dart
408 412
409 #endif // RUNTIME_VM_HEAP_H_ 413 #endif // RUNTIME_VM_HEAP_H_
OLDNEW
« no previous file with comments | « runtime/vm/dart.cc ('k') | runtime/vm/heap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698