| 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_ANDROID) | 6 #if defined(TARGET_OS_ANDROID) |
| 7 | 7 |
| 8 #include "vm/os.h" | 8 #include "vm/os.h" |
| 9 | 9 |
| 10 #include <android/log.h> // NOLINT | 10 #include <android/log.h> // NOLINT |
| (...skipping 17 matching lines...) Expand all Loading... |
| 28 | 28 |
| 29 | 29 |
| 30 namespace dart { | 30 namespace dart { |
| 31 | 31 |
| 32 // Android CodeObservers. | 32 // Android CodeObservers. |
| 33 | 33 |
| 34 DEFINE_FLAG(bool, generate_gdb_symbols, false, | 34 DEFINE_FLAG(bool, generate_gdb_symbols, false, |
| 35 "Generate symbols of generated dart functions for debugging with GDB"); | 35 "Generate symbols of generated dart functions for debugging with GDB"); |
| 36 DEFINE_FLAG(bool, generate_perf_events_symbols, false, | 36 DEFINE_FLAG(bool, generate_perf_events_symbols, false, |
| 37 "Generate events symbols for profiling with perf"); | 37 "Generate events symbols for profiling with perf"); |
| 38 DEFINE_FLAG(charp, generate_pprof_symbols, false, | 38 DEFINE_FLAG(charp, generate_pprof_symbols, NULL, |
| 39 "Generate events symbols for profiling with pprof"); | 39 "Generate events symbols for profiling with pprof"); |
| 40 | 40 |
| 41 class PerfCodeObserver : public CodeObserver { | 41 class PerfCodeObserver : public CodeObserver { |
| 42 public: | 42 public: |
| 43 PerfCodeObserver() { | 43 PerfCodeObserver() { |
| 44 Dart_FileOpenCallback file_open = Isolate::file_open_callback(); | 44 Dart_FileOpenCallback file_open = Isolate::file_open_callback(); |
| 45 if (file_open == NULL) { | 45 if (file_open == NULL) { |
| 46 return; | 46 return; |
| 47 } | 47 } |
| 48 const char* format = "/tmp/perf-%ld.map"; | 48 const char* format = "/tmp/perf-%ld.map"; |
| (...skipping 434 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 483 } | 483 } |
| 484 | 484 |
| 485 | 485 |
| 486 void OS::Exit(int code) { | 486 void OS::Exit(int code) { |
| 487 exit(code); | 487 exit(code); |
| 488 } | 488 } |
| 489 | 489 |
| 490 } // namespace dart | 490 } // namespace dart |
| 491 | 491 |
| 492 #endif // defined(TARGET_OS_ANDROID) | 492 #endif // defined(TARGET_OS_ANDROID) |
| OLD | NEW |