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

Unified Diff: src/heap/spaces.h

Issue 1465633002: [heap] pause/resume inline allocation observers around scavenge (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 1 month 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 | « src/heap/heap.cc ('k') | src/heap/spaces.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/heap/spaces.h
diff --git a/src/heap/spaces.h b/src/heap/spaces.h
index e2680b4419423901790bdf48d22d0335aac04cdf..1aaa36baf6715bcf6f8ddab532e515f7680eca5b 100644
--- a/src/heap/spaces.h
+++ b/src/heap/spaces.h
@@ -2559,7 +2559,8 @@ class NewSpace : public Space {
to_space_(heap, kToSpace),
from_space_(heap, kFromSpace),
reservation_(),
- top_on_previous_step_(0) {}
+ top_on_previous_step_(0),
+ inline_allocation_observers_paused_(false) {}
// Sets up the new space using the given chunk.
bool SetUp(int reserved_semispace_size_, int max_semi_space_size);
@@ -2732,7 +2733,6 @@ class NewSpace : public Space {
void ResetAllocationInfo();
void UpdateInlineAllocationLimit(int size_in_bytes);
- void StartNextInlineAllocationStep();
// Allows observation of inline allocation. The observer->Step() method gets
// called after every step_size bytes have been allocated (approximately).
@@ -2743,6 +2743,9 @@ class NewSpace : public Space {
// Removes a previously installed observer.
void RemoveInlineAllocationObserver(InlineAllocationObserver* observer);
+ void PauseInlineAllocationObservers();
+ void ResumeInlineAllocationObservers();
+
void DisableInlineAllocationSteps() {
top_on_previous_step_ = 0;
UpdateInlineAllocationLimit(0);
@@ -2846,8 +2849,8 @@ class NewSpace : public Space {
// than the actual limit and and increasing it in steps to guarantee that the
// observers are notified periodically.
List<InlineAllocationObserver*> inline_allocation_observers_;
-
Address top_on_previous_step_;
+ bool inline_allocation_observers_paused_;
HistogramInfo* allocated_histogram_;
HistogramInfo* promoted_histogram_;
@@ -2862,6 +2865,7 @@ class NewSpace : public Space {
// different when we cross a page boundary or reset the space.
void InlineAllocationStep(Address top, Address new_top);
intptr_t GetNextInlineAllocationStepSize();
+ void StartNextInlineAllocationStep();
friend class SemiSpaceIterator;
};
« no previous file with comments | « src/heap/heap.cc ('k') | src/heap/spaces.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698