Index: src/code-stubs-hydrogen.cc |
diff --git a/src/code-stubs-hydrogen.cc b/src/code-stubs-hydrogen.cc |
index 2700dbbe9c505c4e42a667695fe5ea409646c9d9..64a6dedd3257df56fda75c2d10a4a2239e706176 100644 |
--- a/src/code-stubs-hydrogen.cc |
+++ b/src/code-stubs-hydrogen.cc |
@@ -301,9 +301,18 @@ static Handle<Code> DoGenerateCode(Isolate* isolate, Stub* stub) { |
ASSERT(descriptor->stack_parameter_count_ == NULL); |
return stub->GenerateLightweightMissCode(isolate); |
} |
+ ElapsedTimer timer; |
+ if (FLAG_profile_hydrogen_code_stub_compilation) { |
+ timer.Start(); |
Yang
2013/10/02 09:53:53
You don't want to include GenerateLightweightMissC
|
+ } |
CodeStubGraphBuilder<Stub> builder(isolate, stub); |
LChunk* chunk = OptimizeGraph(builder.CreateGraph()); |
- return chunk->Codegen(); |
+ Handle<Code> code = chunk->Codegen(); |
+ if (FLAG_profile_hydrogen_code_stub_compilation) { |
+ double ms = timer.Elapsed().InMillisecondsF(); |
+ PrintF("[Lazy compilation of %s took %0.3f ms]\n", *stub->GetName(), ms); |
+ } |
+ return code; |
} |