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

Unified Diff: src/heap/spaces.h

Issue 1427973006: [heap] make inline allocation step size dynamic (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebase 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 3f2d22bee06cc5d8d726a1e3b270b9ba208e5a59..4773e0da477485510b4f996027d6df893125a117 100644
--- a/src/heap/spaces.h
+++ b/src/heap/spaces.h
@@ -2521,6 +2521,7 @@ class InlineAllocationObserver {
private:
intptr_t step_size() const { return step_size_; }
+ intptr_t bytes_to_next_step() const { return bytes_to_next_step_; }
// Pure virtual method provided by the subclasses that gets called when more
// than step_size byte have been allocated.
@@ -2561,7 +2562,6 @@ class NewSpace : public Space {
to_space_(heap, kToSpace),
from_space_(heap, kFromSpace),
reservation_(),
- inline_allocation_limit_step_(0),
top_on_previous_step_(0) {}
// Sets up the new space using the given chunk.
@@ -2735,7 +2735,7 @@ class NewSpace : public Space {
void ResetAllocationInfo();
void UpdateInlineAllocationLimit(int size_in_bytes);
- void UpdateInlineAllocationLimitStep();
+ void StartNextInlineAllocationStep();
// Allows observation of inline allocation. The observer->Step() method gets
// called after every step_size bytes have been allocated (approximately).
@@ -2747,7 +2747,6 @@ class NewSpace : public Space {
void RemoveInlineAllocationObserver(InlineAllocationObserver* observer);
void DisableInlineAllocationSteps() {
- inline_allocation_limit_step_ = 0;
top_on_previous_step_ = 0;
UpdateInlineAllocationLimit(0);
}
@@ -2849,7 +2848,6 @@ class NewSpace : public Space {
// once in a while. This is done by setting allocation_info_.limit to be lower
// than the actual limit and and increasing it in steps to guarantee that the
// observers are notified periodically.
- intptr_t inline_allocation_limit_step_;
List<InlineAllocationObserver*> inline_allocation_observers_;
Address top_on_previous_step_;
@@ -2866,6 +2864,7 @@ class NewSpace : public Space {
// where the next byte is going to be allocated from. top and new_top may be
// different when we cross a page boundary or reset the space.
void InlineAllocationStep(Address top, Address new_top);
+ intptr_t GetNextInlineAllocationStepSize();
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