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

Unified Diff: runtime/vm/heap.h

Issue 1285603004: Add Thread-based constructors to TimerScope, TimelineDurationScope. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Minor fixes. Created 5 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | runtime/vm/heap.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/heap.h
diff --git a/runtime/vm/heap.h b/runtime/vm/heap.h
index 05e0ef04e90b6d6223231e6aaf41cf7a26006bf5..6a9889c93ba361c439f2b00d4bcc92bd318f5f75 100644
--- a/runtime/vm/heap.h
+++ b/runtime/vm/heap.h
@@ -219,7 +219,7 @@ class Heap {
stats_.data_[id] = value;
}
- bool gc_in_progress() const { return gc_in_progress_; }
+ bool gc_in_progress();
static bool IsAllocatableInNewSpace(intptr_t size) {
return size <= kNewAllocatableSize;
@@ -297,6 +297,10 @@ class Heap {
void UpdateClassHeapStatsBeforeGC(Heap::Space space);
void UpdatePretenurePolicy();
+ // Updates gc_in_progress.
+ void BeginGC();
+ void EndGC();
+
// If this heap is non-empty, updates start and end to the smallest range that
// contains both the original [start, end) and the [lowest, highest) addresses
// of this heap.
@@ -318,6 +322,7 @@ class Heap {
bool read_only_;
// GC on the heap is in progress.
+ Mutex gc_in_progress_mutex_;
bool gc_in_progress_;
int pretenure_policy_;
« no previous file with comments | « no previous file | runtime/vm/heap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698