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

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

Issue 1412733008: Switch profiler from isolates to threads (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 1 month 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 | « runtime/tests/vm/vm.status ('k') | runtime/vm/dart_api_impl.cc » ('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/dart.h" 5 #include "vm/dart.h"
6 6
7 #include "vm/code_observers.h" 7 #include "vm/code_observers.h"
8 #include "vm/cpu.h" 8 #include "vm/cpu.h"
9 #include "vm/dart_api_state.h" 9 #include "vm/dart_api_state.h"
10 #include "vm/dart_entry.h" 10 #include "vm/dart_entry.h"
(...skipping 280 matching lines...) Expand 10 before | Expand all | Expand 10 after
291 tds.CopyArgument(0, "isolateName", I->name()); 291 tds.CopyArgument(0, "isolateName", I->name());
292 292
293 ASSERT(I != NULL); 293 ASSERT(I != NULL);
294 StackZone zone(T); 294 StackZone zone(T);
295 HandleScope handle_scope(T); 295 HandleScope handle_scope(T);
296 { 296 {
297 TimelineDurationScope tds(T, I->GetIsolateStream(), "ObjectStore::Init"); 297 TimelineDurationScope tds(T, I->GetIsolateStream(), "ObjectStore::Init");
298 ObjectStore::Init(I); 298 ObjectStore::Init(I);
299 } 299 }
300 300
301 // Setup for profiling.
302 Profiler::InitProfilingForIsolate(I);
303
304 const Error& error = Error::Handle(Object::Init(I)); 301 const Error& error = Error::Handle(Object::Init(I));
305 if (!error.IsNull()) { 302 if (!error.IsNull()) {
306 return error.raw(); 303 return error.raw();
307 } 304 }
308 if (snapshot_buffer != NULL) { 305 if (snapshot_buffer != NULL) {
309 // Read the snapshot and setup the initial state. 306 // Read the snapshot and setup the initial state.
310 TimelineDurationScope tds( 307 TimelineDurationScope tds(
311 T, I->GetIsolateStream(), "IsolateSnapshotReader"); 308 T, I->GetIsolateStream(), "IsolateSnapshotReader");
312 // TODO(turnidge): Remove once length is not part of the snapshot. 309 // TODO(turnidge): Remove once length is not part of the snapshot.
313 const Snapshot* snapshot = Snapshot::SetupFromBuffer(snapshot_buffer); 310 const Snapshot* snapshot = Snapshot::SetupFromBuffer(snapshot_buffer);
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
424 return predefined_handles_->handles_.IsValidScopedHandle(address); 421 return predefined_handles_->handles_.IsValidScopedHandle(address);
425 } 422 }
426 423
427 424
428 bool Dart::IsReadOnlyApiHandle(Dart_Handle handle) { 425 bool Dart::IsReadOnlyApiHandle(Dart_Handle handle) {
429 ASSERT(predefined_handles_ != NULL); 426 ASSERT(predefined_handles_ != NULL);
430 return predefined_handles_->api_handles_.IsValidHandle(handle); 427 return predefined_handles_->api_handles_.IsValidHandle(handle);
431 } 428 }
432 429
433 } // namespace dart 430 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/tests/vm/vm.status ('k') | runtime/vm/dart_api_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698