Reviewers: Søren Gjesse,

Description:
Augment trace-ic to provide information on patching inlined loads.

Please review this at http://codereview.chromium.org/2818023/show

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

Affected files:
  M     src/ic.cc


Index: src/ic.cc
===================================================================
--- src/ic.cc   (revision 4913)
+++ src/ic.cc   (working copy)
@@ -731,11 +731,32 @@
     if (index < 0) {
       // Index is an offset from the end of the object.
       int offset = map->instance_size() + (index * kPointerSize);
+ if (FLAG_trace_ic) PrintF("[LoadIC : patch %s ]\n", *name->ToCString());
       if (PatchInlinedLoad(address(), map, offset)) {
         set_target(megamorphic_stub());
         return lookup.holder()->FastPropertyAt(lookup.GetFieldIndex());
+        if (FLAG_trace_ic) {
+          PrintF("[LoadIC : inline patch %s]\n", *name->ToCString());
+        }
+      } else {
+        if (FLAG_trace_ic) {
+          PrintF("[LoadIC : no inline patch %s (patching failed)]\n",
+                 *name->ToCString());
+        }
       }
+    } else {
+      if (FLAG_trace_ic) {
+        PrintF("[LoadIC : no inline patch %s (not inobject)]\n",
+               *name->ToCString());
+      }
     }
+  } else {
+    if (FLAG_use_ic && state == PREMONOMORPHIC) {
+      if (FLAG_trace_ic) {
+        PrintF("[LoadIC : no inline patch %s (not inlinable)]\n",
+               *name->ToCString());
+      }
+    }
   }

   // Update inline cache and stub cache.


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

Reply via email to