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

Unified Diff: runtime/vm/pages.h

Issue 27802002: Disconnects code objects from infrequently used unoptimized functions. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 2 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 | « runtime/vm/object.cc ('k') | runtime/vm/pages.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/pages.h
===================================================================
--- runtime/vm/pages.h (revision 29013)
+++ runtime/vm/pages.h (working copy)
@@ -11,6 +11,9 @@
namespace dart {
+DECLARE_FLAG(bool, collect_code);
+DECLARE_FLAG(bool, log_code_drop);
+
// Forward declarations.
class Heap;
class ObjectPointerVisitor;
@@ -121,6 +124,11 @@
void EvaluateGarbageCollection(intptr_t in_use_before, intptr_t in_use_after,
int64_t start, int64_t end);
+ int64_t last_code_collection_in_us() { return last_code_collection_in_us_; }
+ void set_last_code_collection_in_us(int64_t t) {
+ last_code_collection_in_us_ = t;
+ }
+
void set_is_enabled(bool state) {
is_enabled_ = state;
}
@@ -149,6 +157,10 @@
// garbage collection can be performed.
int garbage_collection_time_ratio_;
+ // The time in microseconds of the last time we tried to collect unused
+ // code.
+ int64_t last_code_collection_in_us_;
+
PageSpaceGarbageCollectionHistory history_;
DISALLOW_IMPLICIT_CONSTRUCTORS(PageSpaceController);
@@ -188,6 +200,10 @@
RawObject* FindObject(FindObjectVisitor* visitor,
HeapPage::PageType type) const;
+ // Runs a visitor that attempts to drop references to code that has not
+ // been run in awhile.
+ void TryDetachingCode();
+
// Collect the garbage in the page space using mark-sweep.
void MarkSweep(bool invoke_api_callbacks);
« no previous file with comments | « runtime/vm/object.cc ('k') | runtime/vm/pages.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698