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

Side by Side Diff: runtime/bin/main.cc

Issue 1294023009: Switch to a VM wide timeline recorder (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 4 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
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 <stdlib.h> 5 #include <stdlib.h>
6 #include <string.h> 6 #include <string.h>
7 #include <stdio.h> 7 #include <stdio.h>
8 8
9 #include "include/dart_api.h" 9 #include "include/dart_api.h"
10 #include "include/dart_tools_api.h" 10 #include "include/dart_tools_api.h"
(...skipping 668 matching lines...) Expand 10 before | Expand all | Expand 10 after
679 CHECK_RESULT(result); 679 CHECK_RESULT(result);
680 680
681 // Load the script. 681 // Load the script.
682 result = DartUtils::LoadScript(script_uri, builtin_lib); 682 result = DartUtils::LoadScript(script_uri, builtin_lib);
683 CHECK_RESULT(result); 683 CHECK_RESULT(result);
684 684
685 // Run event-loop and wait for script loading to complete. 685 // Run event-loop and wait for script loading to complete.
686 result = Dart_RunLoop(); 686 result = Dart_RunLoop();
687 CHECK_RESULT(result); 687 CHECK_RESULT(result);
688 688
689 if (isolate_data->load_async_id >= 0) {
690 Dart_TimelineAsyncEnd("LoadScript", isolate_data->load_async_id);
691 }
692
689 Platform::SetPackageRoot(package_root); 693 Platform::SetPackageRoot(package_root);
690 694
691 DartUtils::SetupIOLibrary(script_uri); 695 DartUtils::SetupIOLibrary(script_uri);
692 696
693 // Make the isolate runnable so that it is ready to handle messages. 697 // Make the isolate runnable so that it is ready to handle messages.
694 Dart_ExitScope(); 698 Dart_ExitScope();
695 Dart_ExitIsolate(); 699 Dart_ExitIsolate();
696 bool retval = Dart_IsolateMakeRunnable(isolate); 700 bool retval = Dart_IsolateMakeRunnable(isolate);
697 if (!retval) { 701 if (!retval) {
698 *error = strdup("Invalid isolate state - Unable to make it runnable"); 702 *error = strdup("Invalid isolate state - Unable to make it runnable");
(...skipping 487 matching lines...) Expand 10 before | Expand all | Expand 10 after
1186 exit(Process::GlobalExitCode()); 1190 exit(Process::GlobalExitCode());
1187 } 1191 }
1188 1192
1189 } // namespace bin 1193 } // namespace bin
1190 } // namespace dart 1194 } // namespace dart
1191 1195
1192 int main(int argc, char** argv) { 1196 int main(int argc, char** argv) {
1193 dart::bin::main(argc, argv); 1197 dart::bin::main(argc, argv);
1194 UNREACHABLE(); 1198 UNREACHABLE();
1195 } 1199 }
OLDNEW
« no previous file with comments | « runtime/bin/dartutils.cc ('k') | runtime/vm/dart.cc » ('j') | runtime/vm/dart.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698