OLD | NEW |
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/globals.h" | 5 #include "vm/globals.h" |
6 #if defined(TARGET_OS_LINUX) | 6 #if defined(TARGET_OS_LINUX) |
7 | 7 |
8 #include "vm/os.h" | 8 #include "vm/os.h" |
9 | 9 |
10 #include <errno.h> // NOLINT | 10 #include <errno.h> // NOLINT |
11 #include <limits.h> // NOLINT | 11 #include <limits.h> // NOLINT |
12 #include <malloc.h> // NOLINT | 12 #include <malloc.h> // NOLINT |
13 #include <time.h> // NOLINT | 13 #include <time.h> // NOLINT |
14 #include <sys/resource.h> // NOLINT | 14 #include <sys/resource.h> // NOLINT |
15 #include <sys/time.h> // NOLINT | 15 #include <sys/time.h> // NOLINT |
16 #include <sys/types.h> // NOLINT | 16 #include <sys/types.h> // NOLINT |
17 #include <unistd.h> // NOLINT | 17 #include <unistd.h> // NOLINT |
18 | 18 |
19 #include "platform/utils.h" | 19 #include "platform/utils.h" |
20 #include "vm/code_observers.h" | 20 #include "vm/code_observers.h" |
21 #include "vm/dart.h" | 21 #include "vm/dart.h" |
22 #include "vm/debuginfo.h" | 22 #include "vm/debuginfo.h" |
23 #include "vm/isolate.h" | 23 #include "vm/isolate.h" |
| 24 #include "vm/vtune.h" |
24 #include "vm/zone.h" | 25 #include "vm/zone.h" |
25 | 26 |
26 | 27 |
27 namespace dart { | 28 namespace dart { |
28 | 29 |
29 // Linux CodeObservers. | 30 // Linux CodeObservers. |
30 | 31 |
31 DEFINE_FLAG(bool, generate_gdb_symbols, false, | 32 DEFINE_FLAG(bool, generate_gdb_symbols, false, |
32 "Generate symbols of generated dart functions for debugging with GDB"); | 33 "Generate symbols of generated dart functions for debugging with GDB"); |
33 DEFINE_FLAG(bool, generate_perf_events_symbols, false, | 34 DEFINE_FLAG(bool, generate_perf_events_symbols, false, |
(...skipping 436 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
470 if (FLAG_generate_perf_events_symbols) { | 471 if (FLAG_generate_perf_events_symbols) { |
471 CodeObservers::Register(new PerfCodeObserver); | 472 CodeObservers::Register(new PerfCodeObserver); |
472 } | 473 } |
473 if (FLAG_generate_gdb_symbols) { | 474 if (FLAG_generate_gdb_symbols) { |
474 CodeObservers::Register(new GdbCodeObserver); | 475 CodeObservers::Register(new GdbCodeObserver); |
475 } | 476 } |
476 if (FLAG_generate_pprof_symbols != NULL) { | 477 if (FLAG_generate_pprof_symbols != NULL) { |
477 CodeObservers::Register(new PprofCodeObserver); | 478 CodeObservers::Register(new PprofCodeObserver); |
478 } | 479 } |
479 #if defined(DART_VTUNE_SUPPORT) | 480 #if defined(DART_VTUNE_SUPPORT) |
480 Register(new VTuneCodeObserver); | 481 CodeObservers::Register(new VTuneCodeObserver); |
481 #endif | 482 #endif |
482 } | 483 } |
483 | 484 |
484 | 485 |
485 void OS::PrintErr(const char* format, ...) { | 486 void OS::PrintErr(const char* format, ...) { |
486 va_list args; | 487 va_list args; |
487 va_start(args, format); | 488 va_start(args, format); |
488 VFPrint(stderr, format, args); | 489 VFPrint(stderr, format, args); |
489 va_end(args); | 490 va_end(args); |
490 } | 491 } |
(...skipping 18 matching lines...) Expand all Loading... |
509 } | 510 } |
510 | 511 |
511 | 512 |
512 void OS::Exit(int code) { | 513 void OS::Exit(int code) { |
513 exit(code); | 514 exit(code); |
514 } | 515 } |
515 | 516 |
516 } // namespace dart | 517 } // namespace dart |
517 | 518 |
518 #endif // defined(TARGET_OS_LINUX) | 519 #endif // defined(TARGET_OS_LINUX) |
OLD | NEW |