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

Unified Diff: runtime/vm/heap.h

Issue 511963007: Pretenure some strings into bump-allocated block (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/heap.h
===================================================================
--- runtime/vm/heap.h (revision 39651)
+++ runtime/vm/heap.h (working copy)
@@ -33,6 +33,7 @@
kNew,
kOld,
kCode,
+ kPretenured,
};
enum WeakSelector {
@@ -78,6 +79,8 @@
return AllocateOld(size, HeapPage::kData);
case kCode:
return AllocateOld(size, HeapPage::kExecutable);
+ case kPretenured:
+ return AllocatePretenured(size);
default:
UNREACHABLE();
}
@@ -236,6 +239,8 @@
Isolate* isolate() const { return isolate_; }
+ bool ShouldPretenure(intptr_t class_id) const;
+
private:
class GCStats : public ValueObject {
public:
@@ -275,12 +280,14 @@
uword AllocateNew(intptr_t size);
uword AllocateOld(intptr_t size, HeapPage::PageType type);
+ uword AllocatePretenured(intptr_t size);
// GC stats collection.
void RecordBeforeGC(Space space, GCReason reason);
void RecordAfterGC();
void PrintStats();
void UpdateClassHeapStatsBeforeGC(Heap::Space space);
+ void UpdatePretenurePolicy();
// 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
@@ -305,6 +312,8 @@
// GC on the heap is in progress.
bool gc_in_progress_;
+ int pretenure_policy_;
+
friend class GCEvent;
friend class GCTestHelper;
DISALLOW_COPY_AND_ASSIGN(Heap);

Powered by Google App Engine
This is Rietveld 408576698