| 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 1726 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 1737       : sample_(sample), | 1737       : sample_(sample), | 
| 1738         stack_upper_(stack_upper), | 1738         stack_upper_(stack_upper), | 
| 1739         original_pc_(pc), | 1739         original_pc_(pc), | 
| 1740         original_fp_(fp), | 1740         original_fp_(fp), | 
| 1741         original_sp_(sp), | 1741         original_sp_(sp), | 
| 1742         lower_bound_(stack_lower) { | 1742         lower_bound_(stack_lower) { | 
| 1743     ASSERT(sample_ != NULL); | 1743     ASSERT(sample_ != NULL); | 
| 1744   } | 1744   } | 
| 1745 | 1745 | 
| 1746   void walk(Heap* heap) { | 1746   void walk(Heap* heap) { | 
| 1747     const intptr_t kMaxStep = VirtualMemory::PageSize(); | 1747     const uword kMaxStep = VirtualMemory::PageSize(); | 
| 1748 | 1748 | 
| 1749     sample_->SetAt(0, original_pc_); | 1749     sample_->SetAt(0, original_pc_); | 
| 1750 | 1750 | 
| 1751     uword* pc = reinterpret_cast<uword*>(original_pc_); | 1751     uword* pc = reinterpret_cast<uword*>(original_pc_); | 
| 1752     uword* fp = reinterpret_cast<uword*>(original_fp_); | 1752     uword* fp = reinterpret_cast<uword*>(original_fp_); | 
| 1753     uword* previous_fp = fp; | 1753     uword* previous_fp = fp; | 
| 1754 | 1754 | 
| 1755     if ((original_fp_ - original_sp_) >= kMaxStep) { | 1755     if ((original_fp_ - original_sp_) >= kMaxStep) { | 
| 1756       // Gap between frame pointer and stack pointer is | 1756       // Gap between frame pointer and stack pointer is | 
| 1757       // too large. | 1757       // too large. | 
| (...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 1926       stackWalker.walk(); | 1926       stackWalker.walk(); | 
| 1927     } else { | 1927     } else { | 
| 1928       ProfilerNativeStackWalker stackWalker(sample, stack_lower, stack_upper, | 1928       ProfilerNativeStackWalker stackWalker(sample, stack_lower, stack_upper, | 
| 1929                                             state.pc, state.fp, state.sp); | 1929                                             state.pc, state.fp, state.sp); | 
| 1930       stackWalker.walk(isolate->heap()); | 1930       stackWalker.walk(isolate->heap()); | 
| 1931     } | 1931     } | 
| 1932   } | 1932   } | 
| 1933 } | 1933 } | 
| 1934 | 1934 | 
| 1935 }  // namespace dart | 1935 }  // namespace dart | 
| OLD | NEW | 
|---|