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

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

Issue 2012973002: Background finalization. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 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
« no previous file with comments | « runtime/vm/gc_marker.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 VM_HEAP_H_ 5 #ifndef VM_HEAP_H_
6 #define VM_HEAP_H_ 6 #define 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 238 matching lines...) Expand 10 before | Expand all | Expand 10 after
249 // The heap map contains the sizes and class ids for the objects in each page. 249 // The heap map contains the sizes and class ids for the objects in each page.
250 void PrintHeapMapToJSONStream(Isolate* isolate, JSONStream* stream) { 250 void PrintHeapMapToJSONStream(Isolate* isolate, JSONStream* stream) {
251 return old_space_.PrintHeapMapToJSONStream(isolate, stream); 251 return old_space_.PrintHeapMapToJSONStream(isolate, stream);
252 } 252 }
253 253
254 Isolate* isolate() const { return isolate_; } 254 Isolate* isolate() const { return isolate_; }
255 255
256 Monitor* barrier() const { return barrier_; } 256 Monitor* barrier() const { return barrier_; }
257 Monitor* barrier_done() const { return barrier_done_; } 257 Monitor* barrier_done() const { return barrier_done_; }
258 258
259 Monitor* finalization_tasks_lock() const { return finalization_tasks_lock_; }
260 intptr_t finalization_tasks() const { return finalization_tasks_; }
261 void set_finalization_tasks(intptr_t count) { finalization_tasks_ = count; }
262
259 bool ShouldPretenure(intptr_t class_id) const; 263 bool ShouldPretenure(intptr_t class_id) const;
260 264
261 void SetupExternalPage(void* pointer, uword size, bool is_executable) { 265 void SetupExternalPage(void* pointer, uword size, bool is_executable) {
262 old_space_.SetupExternalPage(pointer, size, is_executable); 266 old_space_.SetupExternalPage(pointer, size, is_executable);
263 } 267 }
264 268
265 private: 269 private:
266 class GCStats : public ValueObject { 270 class GCStats : public ValueObject {
267 public: 271 public:
268 GCStats() {} 272 GCStats() {}
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
346 // The different spaces used for allocation. 350 // The different spaces used for allocation.
347 ALIGN8 Scavenger new_space_; 351 ALIGN8 Scavenger new_space_;
348 PageSpace old_space_; 352 PageSpace old_space_;
349 353
350 WeakTable* new_weak_tables_[kNumWeakSelectors]; 354 WeakTable* new_weak_tables_[kNumWeakSelectors];
351 WeakTable* old_weak_tables_[kNumWeakSelectors]; 355 WeakTable* old_weak_tables_[kNumWeakSelectors];
352 356
353 Monitor* barrier_; 357 Monitor* barrier_;
354 Monitor* barrier_done_; 358 Monitor* barrier_done_;
355 359
360 Monitor* finalization_tasks_lock_;
361 intptr_t finalization_tasks_;
362
356 // GC stats collection. 363 // GC stats collection.
357 GCStats stats_; 364 GCStats stats_;
358 365
359 // This heap is in read-only mode: No allocation is allowed. 366 // This heap is in read-only mode: No allocation is allowed.
360 bool read_only_; 367 bool read_only_;
361 368
362 // GC on the heap is in progress. 369 // GC on the heap is in progress.
363 Monitor gc_in_progress_monitor_; 370 Monitor gc_in_progress_monitor_;
364 bool gc_new_space_in_progress_; 371 bool gc_new_space_in_progress_;
365 bool gc_old_space_in_progress_; 372 bool gc_old_space_in_progress_;
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
400 // Note: During this scope, the code pages are non-executable. 407 // Note: During this scope, the code pages are non-executable.
401 class WritableVMIsolateScope : StackResource { 408 class WritableVMIsolateScope : StackResource {
402 public: 409 public:
403 explicit WritableVMIsolateScope(Thread* thread); 410 explicit WritableVMIsolateScope(Thread* thread);
404 ~WritableVMIsolateScope(); 411 ~WritableVMIsolateScope();
405 }; 412 };
406 413
407 } // namespace dart 414 } // namespace dart
408 415
409 #endif // VM_HEAP_H_ 416 #endif // VM_HEAP_H_
OLDNEW
« no previous file with comments | « runtime/vm/gc_marker.cc ('k') | runtime/vm/heap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698