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

Unified Diff: runtime/vm/pages.h

Issue 503363005: - Add and enable concurrent sweeper. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 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
Index: runtime/vm/pages.h
===================================================================
--- runtime/vm/pages.h (revision 39568)
+++ runtime/vm/pages.h (working copy)
@@ -296,6 +296,10 @@
is_protected, is_locked);
}
+ Monitor* tasks_lock() const { return tasks_lock_; }
+ intptr_t tasks() const { return tasks_; }
+ void set_tasks(intptr_t val) { tasks_ = val; }
koda 2014/08/26 23:34:49 ASSERT(tasks_ >= 0); Also consider just having in
Ivan Posva 2014/08/27 01:00:22 Done.
+
private:
// Ids for time and data records in Heap::GCStats.
enum {
@@ -311,10 +315,6 @@
kAllowedGrowth = 3
};
- Monitor* tasks_lock() const { return tasks_lock_; }
- intptr_t tasks() const { return tasks_; }
- void set_tasks(intptr_t val) { tasks_ = val; }
-
static const intptr_t kAllocatablePageSize = 64 * KB;
uword TryAllocateInternal(intptr_t size,
@@ -329,8 +329,12 @@
void FreeLargePage(HeapPage* page, HeapPage* previous_page);
void FreePages(HeapPage* pages);
HeapPage* NextPageAnySize(HeapPage* page) const {
- ASSERT(pages_tail_ == NULL || pages_tail_->next() == NULL);
- return page == pages_tail_ ? large_pages_ : page->next();
+ ASSERT((pages_tail_ == NULL) || (pages_tail_->next() == NULL));
+ ASSERT((exec_pages_tail_ == NULL) || (exec_pages_tail_->next() == NULL));
+ if (page == pages_tail_) {
+ return (exec_pages_ != NULL) ? exec_pages_ : large_pages_;
+ }
+ return page == exec_pages_tail_ ? large_pages_ : page->next();
}
static intptr_t LargePageSizeInWordsFor(intptr_t size);
@@ -344,8 +348,11 @@
Heap* heap_;
+ Mutex* pages_lock_;
HeapPage* pages_;
HeapPage* pages_tail_;
+ HeapPage* exec_pages_;
+ HeapPage* exec_pages_tail_;
HeapPage* large_pages_;
koda 2014/08/26 23:34:49 Can large pages be executable?
Ivan Posva 2014/08/27 01:00:22 Yes, large pages survive as a mixed class list.
// Various sizes being tracked for this generation.
@@ -362,6 +369,7 @@
intptr_t collections_;
friend class PageSpaceController;
+ friend class SweeperTask;
DISALLOW_IMPLICIT_CONSTRUCTORS(PageSpace);
};

Powered by Google App Engine
This is Rietveld 408576698