Chromium Code Reviews| Index: runtime/vm/compiler.cc |
| diff --git a/runtime/vm/compiler.cc b/runtime/vm/compiler.cc |
| index dfe2c697d1d9946d3d5a7d3680031880a073c6da..1d789bc9ecb7f866b1f51d8e3d78f8d6f28911c2 100644 |
| --- a/runtime/vm/compiler.cc |
| +++ b/runtime/vm/compiler.cc |
| @@ -1064,7 +1064,18 @@ static RawError* CompileFunctionHelper(CompilationPipeline* pipeline, |
| RawError* Compiler::CompileFunction(Thread* thread, |
| const Function& function) { |
| - VMTagScope tagScope(thread->isolate(), VMTag::kCompileUnoptimizedTagId); |
| + Isolate* isolate = thread->isolate(); |
| + VMTagScope tagScope(isolate, VMTag::kCompileUnoptimizedTagId); |
| + TimelineDurationScope tds(isolate, |
| + isolate->GetCompilerStream(), |
| + "CompileFunction"); |
| + if (tds.enabled()) { |
| + tds.SetNumArguments(1); |
| + tds.CopyArgument( |
| + 0, |
| + "function", |
| + const_cast<char*>(function.QualifiedUserVisibleNameCString())); |
| + } |
|
siva
2015/06/12 19:50:34
I think you should really switch this code to a ma
Cutch
2015/06/12 23:18:56
Done.
|
| CompilationPipeline* pipeline = |
| CompilationPipeline::New(thread->zone(), function); |
| @@ -1109,7 +1120,18 @@ RawError* Compiler::EnsureUnoptimizedCode(Thread* thread, |
| RawError* Compiler::CompileOptimizedFunction(Thread* thread, |
| const Function& function, |
| intptr_t osr_id) { |
| - VMTagScope tagScope(thread->isolate(), VMTag::kCompileOptimizedTagId); |
| + Isolate* isolate = thread->isolate(); |
| + VMTagScope tagScope(isolate, VMTag::kCompileOptimizedTagId); |
| + TimelineDurationScope tds(isolate, |
| + isolate->GetCompilerStream(), |
| + "CompileOptimizedFunction"); |
| + if (tds.enabled()) { |
| + tds.SetNumArguments(1); |
| + tds.CopyArgument( |
| + 0, |
| + "function", |
| + const_cast<char*>(function.QualifiedUserVisibleNameCString())); |
| + } |
|
siva
2015/06/12 19:50:34
TIMELINE_FUNCTION_COMPILATION_DURATION(isolate, "O
Cutch
2015/06/12 23:18:56
Done.
|
| CompilationPipeline* pipeline = |
| CompilationPipeline::New(thread->zone(), function); |
| return CompileFunctionHelper(pipeline, function, true, osr_id); |