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

Unified Diff: src/spaces.h

Issue 6756006: Exponentially increase incremental marking factor each 512 steps. (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/gc
Patch Set: Created 9 years, 9 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 | « src/incremental-marking.cc ('k') | src/spaces.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/spaces.h
diff --git a/src/spaces.h b/src/spaces.h
index b0a65bc49c6b2a53f742b8e19156ee0b20602b44..f2c5f0b74e3cbdebe3bbb15cdc402413f7bc90c5 100644
--- a/src/spaces.h
+++ b/src/spaces.h
@@ -1631,12 +1631,20 @@ class NewSpace : public Space {
Address* allocation_limit_address() { return &allocation_info_.limit; }
MUST_USE_RESULT MaybeObject* AllocateRaw(int size_in_bytes) {
- return AllocateRawInternal(size_in_bytes, &allocation_info_);
+ return AllocateRawInternal(size_in_bytes);
}
// Reset the allocation pointer to the beginning of the active semispace.
void ResetAllocationInfo();
+ void LowerInlineAllocationLimit(intptr_t step) {
+ inline_alloction_limit_step_ = step;
+ allocation_info_.limit = Min(
+ allocation_info_.top + inline_alloction_limit_step_,
+ allocation_info_.limit);
+ top_on_previous_step_ = allocation_info_.top;
+ }
+
// Get the extent of the inactive semispace (for use as a marking stack).
Address FromSpaceLow() { return from_space_.low(); }
Address FromSpaceHigh() { return from_space_.high(); }
@@ -1727,15 +1735,21 @@ class NewSpace : public Space {
// mark-compact collection.
AllocationInfo allocation_info_;
+ // When incremental marking is active we will set allocation_info_.limit
+ // to be lower than actual limit and then will gradually increase it
+ // in steps to guarantee that we do incremental marking steps even
+ // when all allocation is performed from inlined generated code.
+ intptr_t inline_alloction_limit_step_;
+
+ Address top_on_previous_step_;
+
#if defined(DEBUG) || defined(ENABLE_LOGGING_AND_PROFILING)
HistogramInfo* allocated_histogram_;
HistogramInfo* promoted_histogram_;
#endif
- // Implementation of AllocateRaw and MCAllocateRaw.
- MUST_USE_RESULT inline MaybeObject* AllocateRawInternal(
- int size_in_bytes,
- AllocationInfo* alloc_info);
+ // Implementation of AllocateRaw.
+ MUST_USE_RESULT inline MaybeObject* AllocateRawInternal(int size_in_bytes);
friend class SemiSpaceIterator;
@@ -1772,6 +1786,14 @@ class OldSpace : public PagedSpace {
};
+// For contiguous spaces, top should be in the space (or at the end) and limit
+// should be the end of the space.
+#define ASSERT_SEMISPACE_ALLOCATION_INFO(info, space) \
+ ASSERT((space).low() <= (info).top \
+ && (info).top <= (space).high() \
+ && (info).limit <= (space).high())
+
+
// -----------------------------------------------------------------------------
// Old space for objects of a fixed size
« no previous file with comments | « src/incremental-marking.cc ('k') | src/spaces.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698