| OLD | NEW |
| 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 "platform/utils.h" | 5 #include "platform/utils.h" |
| 6 | 6 |
| 7 #include "vm/allocation.h" | 7 #include "vm/allocation.h" |
| 8 #include "vm/atomic.h" | 8 #include "vm/atomic.h" |
| 9 #include "vm/code_patcher.h" | 9 #include "vm/code_patcher.h" |
| 10 #include "vm/isolate.h" | 10 #include "vm/isolate.h" |
| 11 #include "vm/json_stream.h" | 11 #include "vm/json_stream.h" |
| 12 #include "vm/native_symbol.h" | 12 #include "vm/native_symbol.h" |
| 13 #include "vm/object.h" | 13 #include "vm/object.h" |
| 14 #include "vm/os.h" | 14 #include "vm/os.h" |
| 15 #include "vm/profiler.h" | 15 #include "vm/profiler.h" |
| 16 #include "vm/reusable_handles.h" | 16 #include "vm/reusable_handles.h" |
| 17 #include "vm/signal_handler.h" | 17 #include "vm/signal_handler.h" |
| 18 #include "vm/simulator.h" | 18 #include "vm/simulator.h" |
| 19 #include "vm/stack_frame.h" | 19 #include "vm/stack_frame.h" |
| 20 | 20 |
| 21 namespace dart { | 21 namespace dart { |
| 22 | 22 |
| 23 | 23 |
| 24 #if defined(USING_SIMULATOR) || defined(TARGET_OS_WINDOWS) || \ | 24 #if defined(USING_SIMULATOR) || defined(TARGET_OS_ANDROID) |
| 25 defined(TARGET_OS_ANDROID) | |
| 26 DEFINE_FLAG(bool, profile, false, "Enable Sampling Profiler"); | 25 DEFINE_FLAG(bool, profile, false, "Enable Sampling Profiler"); |
| 27 #else | 26 #else |
| 28 DEFINE_FLAG(bool, profile, true, "Enable Sampling Profiler"); | 27 DEFINE_FLAG(bool, profile, true, "Enable Sampling Profiler"); |
| 29 #endif | 28 #endif |
| 30 DEFINE_FLAG(bool, trace_profiled_isolates, false, "Trace profiled isolates."); | 29 DEFINE_FLAG(bool, trace_profiled_isolates, false, "Trace profiled isolates."); |
| 31 DEFINE_FLAG(charp, profile_dir, NULL, | 30 DEFINE_FLAG(charp, profile_dir, NULL, |
| 32 "Enable writing profile data into specified directory."); | 31 "Enable writing profile data into specified directory."); |
| 33 DEFINE_FLAG(int, profile_period, 1000, | 32 DEFINE_FLAG(int, profile_period, 1000, |
| 34 "Time between profiler samples in microseconds. Minimum 50."); | 33 "Time between profiler samples in microseconds. Minimum 50."); |
| 35 DEFINE_FLAG(int, profile_depth, 8, | 34 DEFINE_FLAG(int, profile_depth, 8, |
| (...skipping 1796 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1832 ProfilerDartStackWalker stackWalker(sample); | 1831 ProfilerDartStackWalker stackWalker(sample); |
| 1833 stackWalker.walk(); | 1832 stackWalker.walk(); |
| 1834 } else { | 1833 } else { |
| 1835 // TODO(johnmccutchan): Support collecting only Dart frames with | 1834 // TODO(johnmccutchan): Support collecting only Dart frames with |
| 1836 // ProfilerNativeStackWalker. | 1835 // ProfilerNativeStackWalker. |
| 1837 } | 1836 } |
| 1838 } | 1837 } |
| 1839 } | 1838 } |
| 1840 | 1839 |
| 1841 } // namespace dart | 1840 } // namespace dart |
| OLD | NEW |