| 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 <cstdio> | 5 #include <cstdio> |
| 6 | 6 |
| 7 #include "platform/utils.h" | 7 #include "platform/utils.h" |
| 8 | 8 |
| 9 #include "vm/atomic.h" | 9 #include "vm/atomic.h" |
| 10 #include "vm/isolate.h" | 10 #include "vm/isolate.h" |
| (...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 126 if (profiler_data == NULL) { | 126 if (profiler_data == NULL) { |
| 127 return; | 127 return; |
| 128 } | 128 } |
| 129 SampleBuffer* sample_buffer = profiler_data->sample_buffer(); | 129 SampleBuffer* sample_buffer = profiler_data->sample_buffer(); |
| 130 if (sample_buffer == NULL) { | 130 if (sample_buffer == NULL) { |
| 131 return; | 131 return; |
| 132 } | 132 } |
| 133 Sample* sample = sample_buffer->ReserveSample(); | 133 Sample* sample = sample_buffer->ReserveSample(); |
| 134 sample->Init(Sample::kIsolateStart, isolate, OS::GetCurrentTimeMicros(), | 134 sample->Init(Sample::kIsolateStart, isolate, OS::GetCurrentTimeMicros(), |
| 135 Thread::GetCurrentThreadId()); | 135 Thread::GetCurrentThreadId()); |
| 136 ThreadInterrupter::Register(RecordSampleInterruptCallback, isolate); | 136 ThreadInterrupter::Register(ThreadInterruptNoOp, isolate); |
| 137 } | 137 } |
| 138 | 138 |
| 139 | 139 |
| 140 void Profiler::EndExecution(Isolate* isolate) { | 140 void Profiler::EndExecution(Isolate* isolate) { |
| 141 if (isolate == NULL) { | 141 if (isolate == NULL) { |
| 142 return; | 142 return; |
| 143 } | 143 } |
| 144 if (!FLAG_profile) { | 144 if (!FLAG_profile) { |
| 145 return; | 145 return; |
| 146 } | 146 } |
| (...skipping 366 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 513 return false; | 513 return false; |
| 514 } | 514 } |
| 515 uintptr_t cursor = reinterpret_cast<uintptr_t>(fp); | 515 uintptr_t cursor = reinterpret_cast<uintptr_t>(fp); |
| 516 cursor += sizeof(fp); | 516 cursor += sizeof(fp); |
| 517 bool r = cursor >= lower_bound_ && cursor < stack_upper_; | 517 bool r = cursor >= lower_bound_ && cursor < stack_upper_; |
| 518 return r; | 518 return r; |
| 519 } | 519 } |
| 520 | 520 |
| 521 | 521 |
| 522 } // namespace dart | 522 } // namespace dart |
| OLD | NEW |