| 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 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 144 } | 144 } |
| 145 if (!FLAG_profile) { | 145 if (!FLAG_profile) { |
| 146 return; | 146 return; |
| 147 } | 147 } |
| 148 ASSERT(initialized_); | 148 ASSERT(initialized_); |
| 149 IsolateProfilerData* profiler_data = isolate->profiler_data(); | 149 IsolateProfilerData* profiler_data = isolate->profiler_data(); |
| 150 if (profiler_data == NULL) { | 150 if (profiler_data == NULL) { |
| 151 return; | 151 return; |
| 152 } | 152 } |
| 153 ThreadInterrupter::Register(RecordSampleInterruptCallback, isolate); | 153 ThreadInterrupter::Register(RecordSampleInterruptCallback, isolate); |
| 154 ThreadInterrupter::WakeUp(); |
| 154 } | 155 } |
| 155 | 156 |
| 156 | 157 |
| 157 void Profiler::EndExecution(Isolate* isolate) { | 158 void Profiler::EndExecution(Isolate* isolate) { |
| 158 if (isolate == NULL) { | 159 if (isolate == NULL) { |
| 159 return; | 160 return; |
| 160 } | 161 } |
| 161 if (!FLAG_profile) { | 162 if (!FLAG_profile) { |
| 162 return; | 163 return; |
| 163 } | 164 } |
| (...skipping 1696 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1860 ProfilerDartStackWalker stackWalker(sample); | 1861 ProfilerDartStackWalker stackWalker(sample); |
| 1861 stackWalker.walk(); | 1862 stackWalker.walk(); |
| 1862 } else { | 1863 } else { |
| 1863 // TODO(johnmccutchan): Support collecting only Dart frames with | 1864 // TODO(johnmccutchan): Support collecting only Dart frames with |
| 1864 // ProfilerNativeStackWalker. | 1865 // ProfilerNativeStackWalker. |
| 1865 } | 1866 } |
| 1866 } | 1867 } |
| 1867 } | 1868 } |
| 1868 | 1869 |
| 1869 } // namespace dart | 1870 } // namespace dart |
| OLD | NEW |