Add code creation logging for construct stubs.
authormikhail.naganov@gmail.com <mikhail.naganov@gmail.com@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Wed, 2 Sep 2009 06:55:49 +0000 (06:55 +0000)
committermikhail.naganov@gmail.com <mikhail.naganov@gmail.com@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Wed, 2 Sep 2009 06:55:49 +0000 (06:55 +0000)
Otherwise, tick processor reports unknown code deletes / moves for them.

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

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

src/stub-cache.cc

index a719f29..2906c22 100644 (file)
@@ -1099,9 +1099,14 @@ Object* CallStubCompiler::GetCode(PropertyType type, String* name) {
 
 Object* ConstructStubCompiler::GetCode() {
   Code::Flags flags = Code::ComputeFlags(Code::STUB);
-  return GetCodeWithFlags(flags, "ConstructStub");
+  Object* result = GetCodeWithFlags(flags, "ConstructStub");
+  if (!result->IsFailure()) {
+    Code* code = Code::cast(result);
+    USE(code);
+    LOG(CodeCreateEvent(Logger::STUB_TAG, code, "ConstructStub"));
+  }
+  return result;
 }
 
 
-
 } }  // namespace v8::internal