Index: src/x64/full-codegen-x64.cc |
diff --git a/src/x64/full-codegen-x64.cc b/src/x64/full-codegen-x64.cc |
index 9144874c89deaa3bce0f42fbb29ae016a32b7c24..9412d38b823a6c7487a0388fcca8a27086dbeec3 100644 |
--- a/src/x64/full-codegen-x64.cc |
+++ b/src/x64/full-codegen-x64.cc |
@@ -3575,10 +3575,30 @@ Register FullCodeGenerator::context_register() { |
void FullCodeGenerator::EmitCallIC(Handle<Code> ic, RelocInfo::Mode mode) { |
ASSERT(mode == RelocInfo::CODE_TARGET || |
mode == RelocInfo::CODE_TARGET_CONTEXT); |
+ switch (ic->kind()) { |
+ case Code::LOAD_IC: |
+ __ IncrementCounter(&Counters::named_load_full, 1); |
+ break; |
+ case Code::KEYED_LOAD_IC: |
+ __ IncrementCounter(&Counters::keyed_load_full, 1); |
+ break; |
+ case Code::STORE_IC: |
+ __ IncrementCounter(&Counters::named_store_full, 1); |
+ break; |
+ case Code::KEYED_STORE_IC: |
+ __ IncrementCounter(&Counters::keyed_store_full, 1); |
+ default: |
+ break; |
+ } |
+ |
__ call(ic, mode); |
// Crankshaft doesn't need patching of inlined loads and stores. |
- if (V8::UseCrankshaft()) return; |
+ // When compiling the snapshot we need to produce code that works |
+ // with and without Crankshaft. |
+ if (V8::UseCrankshaft() && !Serializer::enabled()) { |
+ return; |
+ } |
// If we're calling a (keyed) load or store stub, we have to mark |
// the call as containing no inlined code so we will not attempt to |