Reviewers: Alexandra Mikhaylova,

Message:
Committed patchset #1 manually as r17338.

Description:
Revert "Disable allocation folding when allocations tracking is on"

This reverts r17337. The new test fails on V8 linux - shared:
http://build.chromium.org/p/client.v8/builders/V8%20Linux%20-%20shared/builds/4726/steps/Check/logs/stdio

[email protected]
BUG=None

Committed: https://code.google.com/p/v8/source/detail?r=17338

Please review this at https://codereview.chromium.org/37073003/

SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge

Affected files (+4, -29 lines):
  M src/hydrogen-instructions.h
  M src/hydrogen-instructions.cc
  M test/cctest/test-heap-profiler.cc


Index: src/hydrogen-instructions.cc
diff --git a/src/hydrogen-instructions.cc b/src/hydrogen-instructions.cc
index b6cdd05c08cabc751d538092505cb9f9664c160c..6da6774aa8e87302bdd2a03a9f4f31f88d8216e7 100644
--- a/src/hydrogen-instructions.cc
+++ b/src/hydrogen-instructions.cc
@@ -3308,10 +3308,7 @@ void HAllocate::HandleSideEffectDominator(GVNFlag side_effect,
                                           HValue* dominator) {
   ASSERT(side_effect == kChangesNewSpacePromotion);
   Zone* zone = block()->zone();
-  if (!FLAG_use_allocation_folding ||
-      isolate()->heap_profiler()->is_tracking_allocations()) {
-    return;
-  }
+  if (!FLAG_use_allocation_folding) return;

   // Try to fold allocations together with their dominating allocations.
   if (!dominator->IsAllocate()) {
Index: src/hydrogen-instructions.h
diff --git a/src/hydrogen-instructions.h b/src/hydrogen-instructions.h
index 48ea2b3476fb87c350a3a7d5d4a8d9afb19ff2a9..c8b149b8ddaf164b141c9f6377e798e637aa550e 100644
--- a/src/hydrogen-instructions.h
+++ b/src/hydrogen-instructions.h
@@ -5300,7 +5300,7 @@ class HAllocate V8_FINAL : public HTemplateInstruction<2> {
                         PretenureFlag pretenure_flag,
                         InstanceType instance_type) {
     return new(zone) HAllocate(context, size, type, pretenure_flag,
-        instance_type, zone);
+        instance_type);
   }

   // Maximum instance size for which allocations will be inlined.
@@ -5373,8 +5373,7 @@ class HAllocate V8_FINAL : public HTemplateInstruction<2> {
             HValue* size,
             HType type,
             PretenureFlag pretenure_flag,
-            InstanceType instance_type,
-            Zone* zone)
+            InstanceType instance_type)
       : HTemplateInstruction<2>(type),
         dominating_allocate_(NULL),
         filler_free_space_size_(NULL),
@@ -5397,8 +5396,7 @@ class HAllocate V8_FINAL : public HTemplateInstruction<2> {
     // other, i.e., have a pointer to each other. A GC in between these
// allocations may leave such objects behind in a not completely initialized
     // state.
-    if (!FLAG_use_gvn || !FLAG_use_allocation_folding ||
-        zone->isolate()->heap_profiler()->is_tracking_allocations()) {
+    if (!FLAG_use_gvn || !FLAG_use_allocation_folding) {
       flags_ = static_cast<HAllocate::Flags>(flags_ | PREFILL_WITH_FILLER);
     }
     clear_next_map_word_ = pretenure_flag == NOT_TENURED &&
Index: test/cctest/test-heap-profiler.cc
diff --git a/test/cctest/test-heap-profiler.cc b/test/cctest/test-heap-profiler.cc index e62b3a432a58ae9d9272a8dee1f15aaac85ac495..809372d75aa80c1710c6c224d29fcbc76fc6cd09 100644
--- a/test/cctest/test-heap-profiler.cc
+++ b/test/cctest/test-heap-profiler.cc
@@ -2072,23 +2072,3 @@ TEST(HeapObjectsTracker) {
     "    a.shift();\n"
     "findUntrackedObjects();\n");
 }
-
-
-// If we don't disable allocation folding when allocations tracking is on, we
-// may have untracked allocations.
-TEST(DisableAllocationFolding) {
-  LocalContext env;
-  v8::HandleScope scope(env->GetIsolate());
-  HeapObjectsTracker tracker;
-  CompileRun(
-    "function literal() {"
-    "    return [1];"
-    "}"
-    "function modify_literal(literal, v) {"
-    "    literal[0] = v;"
-    "    return literal;"
-    "}"
-    "obj = modify_literal(literal(), 1);"
-    "obj = modify_literal(literal(), 1.5);"
-    "obj = modify_literal(literal(), 1);");
-}


--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to