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

Side by Side 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 unified diff | Download patch
« no previous file with comments | « no previous file | runtime/vm/dart.cc » ('j') | runtime/vm/isolate.h » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "vm/compiler.h" 5 #include "vm/compiler.h"
6 6
7 #include "vm/assembler.h" 7 #include "vm/assembler.h"
8 8
9 #include "vm/ast_printer.h" 9 #include "vm/ast_printer.h"
10 #include "vm/block_scheduler.h" 10 #include "vm/block_scheduler.h"
(...skipping 1050 matching lines...) Expand 10 before | Expand all | Expand 10 after
1061 isolate->object_store()->clear_sticky_error(); 1061 isolate->object_store()->clear_sticky_error();
1062 return error.raw(); 1062 return error.raw();
1063 } 1063 }
1064 UNREACHABLE(); 1064 UNREACHABLE();
1065 return Error::null(); 1065 return Error::null();
1066 } 1066 }
1067 1067
1068 1068
1069 RawError* Compiler::CompileFunction(Thread* thread, 1069 RawError* Compiler::CompileFunction(Thread* thread,
1070 const Function& function) { 1070 const Function& function) {
1071 VMTagScope tagScope(thread->isolate(), VMTag::kCompileUnoptimizedTagId); 1071 Isolate* isolate = thread->isolate();
1072 VMTagScope tagScope(isolate, VMTag::kCompileUnoptimizedTagId);
1073 TimelineDurationScope tds(isolate->GetCompilerStream(), "CompileFunction");
1074 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.
1072 CompilationPipeline* pipeline = 1075 CompilationPipeline* pipeline =
1073 CompilationPipeline::New(thread->zone(), function); 1076 CompilationPipeline::New(thread->zone(), function);
1074 1077
1075 const bool optimized = 1078 const bool optimized =
1076 Compiler::always_optimize() && function.IsOptimizable(); 1079 Compiler::always_optimize() && function.IsOptimizable();
1077 1080
1078 return CompileFunctionHelper(pipeline, function, optimized, 1081 return CompileFunctionHelper(pipeline, function, optimized,
1079 Isolate::kNoDeoptId); 1082 Isolate::kNoDeoptId);
1080 } 1083 }
1081 1084
(...skipping 24 matching lines...) Expand all
1106 if (FLAG_trace_compiler) { 1109 if (FLAG_trace_compiler) {
1107 ISL_Print("Ensure unoptimized code for %s\n", function.ToCString()); 1110 ISL_Print("Ensure unoptimized code for %s\n", function.ToCString());
1108 } 1111 }
1109 return Error::null(); 1112 return Error::null();
1110 } 1113 }
1111 1114
1112 1115
1113 RawError* Compiler::CompileOptimizedFunction(Thread* thread, 1116 RawError* Compiler::CompileOptimizedFunction(Thread* thread,
1114 const Function& function, 1117 const Function& function,
1115 intptr_t osr_id) { 1118 intptr_t osr_id) {
1116 VMTagScope tagScope(thread->isolate(), VMTag::kCompileOptimizedTagId); 1119 Isolate* isolate = thread->isolate();
1120 VMTagScope tagScope(isolate, VMTag::kCompileOptimizedTagId);
1121 TimelineDurationScope tds(isolate->GetCompilerStream(),
1122 "CompileOptimizedFunction");
siva 2015/06/09 22:37:56 VMTagScope and TimelineDurationScope seem to alway
Cutch 2015/06/10 18:20:56 Acknowledged.
1123 tds.SetArgument("function", function.PrettyNameCString());
1117 CompilationPipeline* pipeline = 1124 CompilationPipeline* pipeline =
1118 CompilationPipeline::New(thread->zone(), function); 1125 CompilationPipeline::New(thread->zone(), function);
1119 return CompileFunctionHelper(pipeline, function, true, osr_id); 1126 return CompileFunctionHelper(pipeline, function, true, osr_id);
1120 } 1127 }
1121 1128
1122 1129
1123 // This is only used from unit tests. 1130 // This is only used from unit tests.
1124 RawError* Compiler::CompileParsedFunction( 1131 RawError* Compiler::CompileParsedFunction(
1125 ParsedFunction* parsed_function) { 1132 ParsedFunction* parsed_function) {
1126 LongJumpScope jump; 1133 LongJumpScope jump;
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after
1324 const Object& result = 1331 const Object& result =
1325 PassiveObject::Handle(isolate->object_store()->sticky_error()); 1332 PassiveObject::Handle(isolate->object_store()->sticky_error());
1326 isolate->object_store()->clear_sticky_error(); 1333 isolate->object_store()->clear_sticky_error();
1327 return result.raw(); 1334 return result.raw();
1328 } 1335 }
1329 UNREACHABLE(); 1336 UNREACHABLE();
1330 return Object::null(); 1337 return Object::null();
1331 } 1338 }
1332 1339
1333 } // namespace dart 1340 } // namespace dart
OLDNEW
« 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