Fine-tune inobject slack tracking.
authorkaznacheev@chromium.org <kaznacheev@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Fri, 1 Oct 2010 08:28:28 +0000 (08:28 +0000)
committerkaznacheev@chromium.org <kaznacheev@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Fri, 1 Oct 2010 08:28:28 +0000 (08:28 +0000)
The current parameters (initial slack = 6, kGenerousAllocationsCount = 16)
caused 15-20% performance regression on 3d-raytrace on x64
(visible both in standalone shell and in the web harness). This is very
likely some kind of an alignment  problem (it goes away completely with --prof).
A similar problem can be observed on ia32 with initial slack=2.

Increased initial slack to 8 and decreased constructions count to 8.
This made the regression go away (and did not harm any of the other tests).

Review URL: http://codereview.chromium.org/3595002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5571 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

src/handles.cc
src/objects.h

index 0207492..3fed0bc 100644 (file)
@@ -175,7 +175,7 @@ static int ExpectedNofPropertiesFromEstimate(int estimate) {
 
   // Inobject slack tracking will reclaim redundant inobject space later,
   // so we can afford to adjust the estimate generously.
-  return estimate + 6;
+  return estimate + 8;
 }
 
 
index 7f301b5..8f79aca 100644 (file)
@@ -3537,7 +3537,7 @@ class SharedFunctionInfo: public HeapObject {
   //  Important: inobject slack tracking is not attempted during the snapshot
   //  creation.
 
-  static const int kGenerousAllocationCount = 16;
+  static const int kGenerousAllocationCount = 8;
 
   // [construction_count]: Counter for constructor calls made during
   // the tracking phase.