Reviewers: Erik Corry,

Description:
Ensure that we are getting steps from inline allocation when doing incremental
sweeping.

Delay full collections when we decided do to an incremental mark-sweep even if
incremental collector is still sweeping and have not started marking yet.

Fix ll_prof.py to handle lack of code deletion events.

Please review this at http://codereview.chromium.org/6995018/

SVN Base: https://v8.googlecode.com/svn/branches/experimental/gc

Affected files:
  M src/heap.cc
  M src/incremental-marking.cc
  M tools/ll_prof.py


Index: src/heap.cc
diff --git a/src/heap.cc b/src/heap.cc
index 303561d4816a029a24fa4df8b15c1d87b72d64aa..6d4651c43e4c68683a87a0539aed84ce2d574c89 100644
--- a/src/heap.cc
+++ b/src/heap.cc
@@ -482,7 +482,7 @@ bool Heap::CollectGarbage(AllocationSpace space, GarbageCollector collector) {

   if (collector == MARK_COMPACTOR &&
       !mark_compact_collector()->PreciseSweepingRequired() &&
-      incremental_marking()->IsMarkingIncomplete() &&
+      !incremental_marking()->IsStopped() &&
       !incremental_marking()->should_hurry() &&
       FLAG_incremental_marking_steps) {
     if (FLAG_trace_incremental_marking) {
Index: src/incremental-marking.cc
diff --git a/src/incremental-marking.cc b/src/incremental-marking.cc
index 82484f0982144555c731eb4d15b203a5a9492308..913dee79f6d52577b22af279f618e89ba0dae598 100644
--- a/src/incremental-marking.cc
+++ b/src/incremental-marking.cc
@@ -244,6 +244,8 @@ void IncrementalMarking::Start() {
     }
     state_ = SWEEPING;
   }
+
+  heap_->new_space()->LowerInlineAllocationLimit(kAllocatedThreshold);
 }


@@ -275,8 +277,6 @@ void IncrementalMarking::StartMarking() {
   VerifyMarkbitsAreClean();
 #endif

-  heap_->new_space()->LowerInlineAllocationLimit(kAllocatedThreshold);
-
   // Mark strong roots grey.
   IncrementalMarkingRootMarkingVisitor visitor(heap_, this);
   heap_->IterateStrongRoots(&visitor, VISIT_ONLY_STRONG);
Index: tools/ll_prof.py
diff --git a/tools/ll_prof.py b/tools/ll_prof.py
index 650f923a2d5f397990c83d677f272147137151f1..7de7d8947c45c3dc4d4d23e80918b75b68b26339 100755
--- a/tools/ll_prof.py
+++ b/tools/ll_prof.py
@@ -399,12 +399,16 @@ class LogReader(object):
code = Code(name, start_address, end_address, origin, origin_offset)
         conficting_code = self.code_map.Find(start_address)
         if conficting_code:
-          LogReader._HandleCodeConflict(conficting_code, code)
-          # TODO(vitalyr): this warning is too noisy because of our
-          # attempts to reconstruct code log from the snapshot.
-          # print >>sys.stderr, \
-          #     "Warning: Skipping duplicate code log entry %s" % code
-          continue
+          if not (conficting_code.start_address == code.start_address and
+            conficting_code.end_address == code.end_address):
+            self.code_map.Remove(conficting_code)
+          else:
+            LogReader._HandleCodeConflict(conficting_code, code)
+            # TODO(vitalyr): this warning is too noisy because of our
+            # attempts to reconstruct code log from the snapshot.
+            # print >>sys.stderr, \
+            #     "Warning: Skipping duplicate code log entry %s" % code
+            continue
         self.code_map.Add(code)
         continue



--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev

Reply via email to