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

Unified Diff: src/mark-compact.cc

Issue 8060053: Enable code flushing for full (non-incremental) collections. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: update test and remove FLAG_flush_code = false Created 9 years, 3 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/flag-definitions.h ('k') | test/cctest/test-heap.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/mark-compact.cc
diff --git a/src/mark-compact.cc b/src/mark-compact.cc
index 4fc9fdba5e974a8c43fa9c4f1872cbc93f01ca1d..c731ba5e5dc4d72dd608fcce8dd427067025a078 100644
--- a/src/mark-compact.cc
+++ b/src/mark-compact.cc
@@ -467,8 +467,6 @@ void MarkCompactCollector::AbortCompaction() {
void MarkCompactCollector::Prepare(GCTracer* tracer) {
- FLAG_flush_code = false;
-
was_marked_incrementally_ = heap()->incremental_marking()->IsMarking();
// Disable collection of maps if incremental marking is enabled.
@@ -485,7 +483,6 @@ void MarkCompactCollector::Prepare(GCTracer* tracer) {
state_ = PREPARE_GC;
#endif
- // TODO(1726) Revert this into an assertion when compaction is enabled.
ASSERT(!FLAG_never_compact || !FLAG_always_compact);
if (collect_maps_) CreateBackPointers();
@@ -1422,7 +1419,8 @@ class SharedFunctionInfoMarkingVisitor : public ObjectVisitor {
void MarkCompactCollector::PrepareForCodeFlushing() {
ASSERT(heap() == Isolate::Current()->heap());
- if (!FLAG_flush_code) {
+ // TODO(1609) Currently incremental marker does not support code flushing.
+ if (!FLAG_flush_code || was_marked_incrementally_) {
EnableCodeFlushing(false);
return;
}
@@ -1434,6 +1432,7 @@ void MarkCompactCollector::PrepareForCodeFlushing() {
return;
}
#endif
+
EnableCodeFlushing(true);
// Ensure that empty descriptor array is marked. Method MarkDescriptorArray
@@ -3687,9 +3686,6 @@ void MarkCompactCollector::SweepSpaces() {
}
-// TODO(1466) ReportDeleteIfNeeded is not called currently.
-// Our profiling tools do not expect intersections between
-// code objects. We should either reenable it or change our tools.
void MarkCompactCollector::EnableCodeFlushing(bool enable) {
if (enable) {
if (code_flusher_ != NULL) return;
@@ -3702,6 +3698,9 @@ void MarkCompactCollector::EnableCodeFlushing(bool enable) {
}
+// TODO(1466) ReportDeleteIfNeeded is not called currently.
+// Our profiling tools do not expect intersections between
+// code objects. We should either reenable it or change our tools.
void MarkCompactCollector::ReportDeleteIfNeeded(HeapObject* obj,
Isolate* isolate) {
#ifdef ENABLE_GDB_JIT_INTERFACE
« no previous file with comments | « src/flag-definitions.h ('k') | test/cctest/test-heap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698