Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(206)

Unified Diff: runtime/vm/compiler.cc

Issue 1170503004: Initial Timeline Events (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | runtime/vm/dart.cc » ('j') | runtime/vm/isolate.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/compiler.cc
diff --git a/runtime/vm/compiler.cc b/runtime/vm/compiler.cc
index 57cfa7f6026391418fd2cf1aa5a61bd5c75b1954..2d31344adc25507361e96569d9170af52e31633e 100644
--- a/runtime/vm/compiler.cc
+++ b/runtime/vm/compiler.cc
@@ -1068,7 +1068,10 @@ 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->GetCompilerStream(), "CompileFunction");
+ tds.SetArgument("function", function.PrettyNameCString());
rmacnak 2015/06/05 21:22:58 Is this string in the right zone? Doesn't the curr
Cutch 2015/06/05 21:34:43 The string is copied when stored in the Event.
CompilationPipeline* pipeline =
CompilationPipeline::New(thread->zone(), function);
@@ -1113,7 +1116,11 @@ 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->GetCompilerStream(),
+ "CompileOptimizedFunction");
siva 2015/06/09 22:37:56 VMTagScope and TimelineDurationScope seem to alway
Cutch 2015/06/10 18:20:56 Acknowledged.
+ tds.SetArgument("function", function.PrettyNameCString());
CompilationPipeline* pipeline =
CompilationPipeline::New(thread->zone(), function);
return CompileFunctionHelper(pipeline, function, true, osr_id);
« no previous file with comments | « no previous file | runtime/vm/dart.cc » ('j') | runtime/vm/isolate.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698