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

Side by Side Diff: runtime/vm/deopt_instructions.cc

Issue 1975203003: Cleanup timeline stream enabled flag so that it can be easily tested from an intrinsic (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 7 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/thread.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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/deopt_instructions.h" 5 #include "vm/deopt_instructions.h"
6 6
7 #include "vm/assembler.h" 7 #include "vm/assembler.h"
8 #include "vm/code_patcher.h" 8 #include "vm/code_patcher.h"
9 #include "vm/compiler.h" 9 #include "vm/compiler.h"
10 #include "vm/intermediate_language.h" 10 #include "vm/intermediate_language.h"
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 // Delete all deferred objects. 134 // Delete all deferred objects.
135 for (intptr_t i = 0; i < deferred_objects_count_; i++) { 135 for (intptr_t i = 0; i < deferred_objects_count_; i++) {
136 delete deferred_objects_[i]; 136 delete deferred_objects_[i];
137 } 137 }
138 delete[] deferred_objects_; 138 delete[] deferred_objects_;
139 deferred_objects_ = NULL; 139 deferred_objects_ = NULL;
140 deferred_objects_count_ = 0; 140 deferred_objects_count_ = 0;
141 if (FLAG_support_timeline && (deopt_start_micros_ != 0)) { 141 if (FLAG_support_timeline && (deopt_start_micros_ != 0)) {
142 TimelineStream* compiler_stream = Timeline::GetCompilerStream(); 142 TimelineStream* compiler_stream = Timeline::GetCompilerStream();
143 ASSERT(compiler_stream != NULL); 143 ASSERT(compiler_stream != NULL);
144 if (compiler_stream->Enabled()) { 144 if (compiler_stream->enabled()) {
145 // Allocate all Dart objects needed before calling StartEvent, 145 // Allocate all Dart objects needed before calling StartEvent,
146 // which blocks safe points until Complete is called. 146 // which blocks safe points until Complete is called.
147 const Code& code = Code::Handle(zone(), code_); 147 const Code& code = Code::Handle(zone(), code_);
148 const Function& function = Function::Handle(zone(), code.function()); 148 const Function& function = Function::Handle(zone(), code.function());
149 const String& function_name = 149 const String& function_name =
150 String::Handle(zone(), function.QualifiedScrubbedName()); 150 String::Handle(zone(), function.QualifiedScrubbedName());
151 const char* reason = DeoptReasonToCString(deopt_reason()); 151 const char* reason = DeoptReasonToCString(deopt_reason());
152 const int counter = function.deoptimization_counter(); 152 const int counter = function.deoptimization_counter();
153 TimelineEvent* timeline_event = compiler_stream->StartEvent(); 153 TimelineEvent* timeline_event = compiler_stream->StartEvent();
154 if (timeline_event != NULL) { 154 if (timeline_event != NULL) {
(...skipping 1164 matching lines...) Expand 10 before | Expand all | Expand 10 after
1319 Smi* offset, 1319 Smi* offset,
1320 TypedData* info, 1320 TypedData* info,
1321 Smi* reason) { 1321 Smi* reason) {
1322 intptr_t i = index * kEntrySize; 1322 intptr_t i = index * kEntrySize;
1323 *offset ^= table.At(i); 1323 *offset ^= table.At(i);
1324 *info ^= table.At(i + 1); 1324 *info ^= table.At(i + 1);
1325 *reason ^= table.At(i + 2); 1325 *reason ^= table.At(i + 2);
1326 } 1326 }
1327 1327
1328 } // namespace dart 1328 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/thread.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698