| Index: runtime/vm/compiler.cc
|
| diff --git a/runtime/vm/compiler.cc b/runtime/vm/compiler.cc
|
| index 05093ead27a22f6dcc501ef5b0ff15c373a0355c..d4065155ee2a4c558423d92bcca541500861626d 100644
|
| --- a/runtime/vm/compiler.cc
|
| +++ b/runtime/vm/compiler.cc
|
| @@ -1071,7 +1071,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()));
|
| + }
|
| CompilationPipeline* pipeline =
|
| CompilationPipeline::New(thread->zone(), function);
|
|
|
| @@ -1116,7 +1127,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()));
|
| + }
|
| CompilationPipeline* pipeline =
|
| CompilationPipeline::New(thread->zone(), function);
|
| return CompileFunctionHelper(pipeline, function, true, osr_id);
|
|
|