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

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

Issue 1563553002: Fix Mac gen_snapshot by calling TimerUtils::InitOnce (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 11 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 | « runtime/bin/embedded_dart_io.cc ('k') | runtime/bin/vmservice_dartium.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 // Generate a snapshot file after loading all the scripts specified on the 5 // Generate a snapshot file after loading all the scripts specified on the
6 // command line. 6 // command line.
7 7
8 #include <stdlib.h> 8 #include <stdlib.h>
9 #include <string.h> 9 #include <string.h>
10 #include <stdio.h> 10 #include <stdio.h>
11 11
12 #include <cstdarg> 12 #include <cstdarg>
13 13
14 #include "include/dart_api.h" 14 #include "include/dart_api.h"
15 15
16 #include "bin/builtin.h" 16 #include "bin/builtin.h"
17 #include "bin/dartutils.h" 17 #include "bin/dartutils.h"
18 #include "bin/eventhandler.h" 18 #include "bin/eventhandler.h"
19 #include "bin/file.h" 19 #include "bin/file.h"
20 #include "bin/log.h" 20 #include "bin/log.h"
21 #include "bin/thread.h" 21 #include "bin/thread.h"
22 #include "bin/utils.h"
22 #include "bin/vmservice_impl.h" 23 #include "bin/vmservice_impl.h"
23 24
24 #include "platform/globals.h" 25 #include "platform/globals.h"
25 26
26 27
27 namespace dart { 28 namespace dart {
28 namespace bin { 29 namespace bin {
29 30
30 #define CHECK_RESULT(result) \ 31 #define CHECK_RESULT(result) \
31 if (Dart_IsError(result)) { \ 32 if (Dart_IsError(result)) { \
(...skipping 978 matching lines...) Expand 10 before | Expand all | Expand 10 after
1010 argv, 1011 argv,
1011 &vm_options, 1012 &vm_options,
1012 &app_script_name) < 0) { 1013 &app_script_name) < 0) {
1013 PrintUsage(); 1014 PrintUsage();
1014 return 255; 1015 return 255;
1015 } 1016 }
1016 1017
1017 Thread::InitOnce(); 1018 Thread::InitOnce();
1018 DartUtils::SetOriginalWorkingDirectory(); 1019 DartUtils::SetOriginalWorkingDirectory();
1019 // Start event handler. 1020 // Start event handler.
1021 TimerUtils::InitOnce();
1020 EventHandler::Start(); 1022 EventHandler::Start();
1021 1023
1022 vm_options.AddArgument("--load_deferred_eagerly"); 1024 vm_options.AddArgument("--load_deferred_eagerly");
1023 // Workaround until issue 21620 is fixed. 1025 // Workaround until issue 21620 is fixed.
1024 // (https://github.com/dart-lang/sdk/issues/21620) 1026 // (https://github.com/dart-lang/sdk/issues/21620)
1025 vm_options.AddArgument("--no-concurrent_sweep"); 1027 vm_options.AddArgument("--no-concurrent_sweep");
1026 1028
1027 if (IsSnapshottingForPrecompilation()) { 1029 if (IsSnapshottingForPrecompilation()) {
1028 vm_options.AddArgument("--precompilation"); 1030 vm_options.AddArgument("--precompilation");
1029 #if TARGET_ARCH_ARM 1031 #if TARGET_ARCH_ARM
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
1150 EventHandler::Stop(); 1152 EventHandler::Stop();
1151 return 0; 1153 return 0;
1152 } 1154 }
1153 1155
1154 } // namespace bin 1156 } // namespace bin
1155 } // namespace dart 1157 } // namespace dart
1156 1158
1157 int main(int argc, char** argv) { 1159 int main(int argc, char** argv) {
1158 return dart::bin::main(argc, argv); 1160 return dart::bin::main(argc, argv);
1159 } 1161 }
OLDNEW
« no previous file with comments | « runtime/bin/embedded_dart_io.cc ('k') | runtime/bin/vmservice_dartium.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698