Chromium Code Reviews| Index: runtime/vm/profiler.cc |
| diff --git a/runtime/vm/profiler.cc b/runtime/vm/profiler.cc |
| index de2afea156800d813254301cd5df6486242ec88a..2960583d7f95a19ee84fc3e6d1384228b5ec04b9 100644 |
| --- a/runtime/vm/profiler.cc |
| +++ b/runtime/vm/profiler.cc |
| @@ -1687,7 +1687,9 @@ class ProfilerNativeStackWalker : public ValueObject { |
| // Stack pointer should not be above frame pointer. |
| return 1; |
| } |
| - intptr_t gap = original_fp_ - original_sp_; |
| + const intptr_t kPageMask = ~(kMaxStep - 1); |
| + const intptr_t gap = |
|
Cutch
2014/05/23 11:44:29
#ifdef PLATFORM_WINDOWS
const intptr_t gap = (orig
Anders Johnsen
2014/05/26 08:27:55
Done.
|
| + (original_fp_ & kPageMask) - (original_sp_ & kPageMask); |
| if (gap >= kMaxStep) { |
| // Gap between frame pointer and stack pointer is |
| // too large. |
| @@ -1699,7 +1701,9 @@ class ProfilerNativeStackWalker : public ValueObject { |
| lower_bound_ = original_sp_; |
| } |
| // Store the PC marker for the top frame. |
| - sample_->set_pc_marker(GetCurrentFramePcMarker(fp)); |
| + if (gap > 0) { |
| + sample_->set_pc_marker(GetCurrentFramePcMarker(fp)); |
| + } |
| int i = 0; |
| for (; i < FLAG_profile_depth; i++) { |
| if (FLAG_profile_verify_stack_walk) { |