| 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/isolate.h" | 9 #include "vm/isolate.h" |
| 10 #include "vm/json_stream.h" | 10 #include "vm/json_stream.h" |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 61 | 61 |
| 62 // Notes on stack frame walking: | 62 // Notes on stack frame walking: |
| 63 // | 63 // |
| 64 // The sampling profiler will collect up to Sample::kNumStackFrames stack frames | 64 // The sampling profiler will collect up to Sample::kNumStackFrames stack frames |
| 65 // The stack frame walking code uses the frame pointer to traverse the stack. | 65 // The stack frame walking code uses the frame pointer to traverse the stack. |
| 66 // If the VM is compiled without frame pointers (which is the default on | 66 // If the VM is compiled without frame pointers (which is the default on |
| 67 // recent GCC versions with optimizing enabled) the stack walking code will | 67 // recent GCC versions with optimizing enabled) the stack walking code will |
| 68 // fail (sometimes leading to a crash). | 68 // fail (sometimes leading to a crash). |
| 69 // | 69 // |
| 70 | 70 |
| 71 DEFINE_FLAG(bool, profile, true, "Enable Sampling Profiler"); | 71 DEFINE_FLAG(bool, profile, false, "Enable Sampling Profiler"); |
| 72 DEFINE_FLAG(bool, trace_profiled_isolates, false, "Trace profiled isolates."); | 72 DEFINE_FLAG(bool, trace_profiled_isolates, false, "Trace profiled isolates."); |
| 73 | 73 |
| 74 bool ProfilerManager::initialized_ = false; | 74 bool ProfilerManager::initialized_ = false; |
| 75 bool ProfilerManager::shutdown_ = false; | 75 bool ProfilerManager::shutdown_ = false; |
| 76 bool ProfilerManager::thread_running_ = false; | 76 bool ProfilerManager::thread_running_ = false; |
| 77 Monitor* ProfilerManager::monitor_ = NULL; | 77 Monitor* ProfilerManager::monitor_ = NULL; |
| 78 Monitor* ProfilerManager::start_stop_monitor_ = NULL; | 78 Monitor* ProfilerManager::start_stop_monitor_ = NULL; |
| 79 Isolate** ProfilerManager::isolates_ = NULL; | 79 Isolate** ProfilerManager::isolates_ = NULL; |
| 80 intptr_t ProfilerManager::isolates_capacity_ = 0; | 80 intptr_t ProfilerManager::isolates_capacity_ = 0; |
| 81 intptr_t ProfilerManager::isolates_size_ = 0; | 81 intptr_t ProfilerManager::isolates_size_ = 0; |
| (...skipping 605 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 687 return false; | 687 return false; |
| 688 } | 688 } |
| 689 uintptr_t cursor = reinterpret_cast<uintptr_t>(fp); | 689 uintptr_t cursor = reinterpret_cast<uintptr_t>(fp); |
| 690 cursor += sizeof(fp); | 690 cursor += sizeof(fp); |
| 691 bool r = cursor >= lower_bound_ && cursor < stack_upper_; | 691 bool r = cursor >= lower_bound_ && cursor < stack_upper_; |
| 692 return r; | 692 return r; |
| 693 } | 693 } |
| 694 | 694 |
| 695 | 695 |
| 696 } // namespace dart | 696 } // namespace dart |
| OLD | NEW |