| 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" |
| (...skipping 1872 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1883 stack_lower = 0; | 1883 stack_lower = 0; |
| 1884 stack_upper = 0; | 1884 stack_upper = 0; |
| 1885 } | 1885 } |
| 1886 if (FLAG_profile_vm) { | 1886 if (FLAG_profile_vm) { |
| 1887 // Collect native and Dart frames. | 1887 // Collect native and Dart frames. |
| 1888 ProfilerNativeStackWalker stackWalker(sample, stack_lower, stack_upper, | 1888 ProfilerNativeStackWalker stackWalker(sample, stack_lower, stack_upper, |
| 1889 state.pc, state.fp, state.sp); | 1889 state.pc, state.fp, state.sp); |
| 1890 stackWalker.walk(isolate->heap()); | 1890 stackWalker.walk(isolate->heap()); |
| 1891 } else { | 1891 } else { |
| 1892 if ((isolate->stub_code() != NULL) && | 1892 if ((isolate->stub_code() != NULL) && |
| 1893 (isolate->top_exit_frame_info() != 0)) { | 1893 (isolate->top_exit_frame_info() != 0) && |
| 1894 // Collect only Dart frames. | 1894 (isolate->vm_tag() != VMTag::kScriptTagId)) { |
| 1895 // We have a valid exit frame info, use the Dart stack walker. |
| 1895 ProfilerDartStackWalker stackWalker(isolate, sample); | 1896 ProfilerDartStackWalker stackWalker(isolate, sample); |
| 1896 stackWalker.walk(); | 1897 stackWalker.walk(); |
| 1897 } else { | 1898 } else { |
| 1898 // Collect native and Dart frames. | 1899 // Collect native and Dart frames. |
| 1899 ProfilerNativeStackWalker stackWalker(sample, stack_lower, stack_upper, | 1900 ProfilerNativeStackWalker stackWalker(sample, stack_lower, stack_upper, |
| 1900 state.pc, state.fp, state.sp); | 1901 state.pc, state.fp, state.sp); |
| 1901 stackWalker.walk(isolate->heap()); | 1902 stackWalker.walk(isolate->heap()); |
| 1902 } | 1903 } |
| 1903 } | 1904 } |
| 1904 } | 1905 } |
| 1905 | 1906 |
| 1906 } // namespace dart | 1907 } // namespace dart |
| OLD | NEW |