Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(202)

Side by Side Diff: runtime/vm/profiler.cc

Issue 506933002: Keep track of stack base whenever Dart code is invoked. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « runtime/vm/isolate.cc ('k') | runtime/vm/service.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 1982 matching lines...) Expand 10 before | Expand all | Expand 10 after
1993 1993
1994 if (StubCode::InJumpToExceptionHandlerStub(state.pc)) { 1994 if (StubCode::InJumpToExceptionHandlerStub(state.pc)) {
1995 // The JumpToExceptionHandler stub manually adjusts the stack pointer, 1995 // The JumpToExceptionHandler stub manually adjusts the stack pointer,
1996 // frame pointer, and some isolate state before jumping to a catch entry. 1996 // frame pointer, and some isolate state before jumping to a catch entry.
1997 // It is not safe to walk the stack when executing this stub. 1997 // It is not safe to walk the stack when executing this stub.
1998 return; 1998 return;
1999 } 1999 }
2000 2000
2001 uword stack_lower = 0; 2001 uword stack_lower = 0;
2002 uword stack_upper = 0; 2002 uword stack_upper = 0;
2003 isolate->GetStackBounds(&stack_lower, &stack_upper); 2003 isolate->GetProfilerStackBounds(&stack_lower, &stack_upper);
2004 if ((stack_lower == 0) || (stack_upper == 0)) { 2004 if ((stack_lower == 0) || (stack_upper == 0)) {
2005 // Could not get stack boundary. 2005 // Could not get stack boundary.
2006 return; 2006 return;
2007 } 2007 }
2008 2008
2009 if (state.sp > stack_lower) { 2009 if (state.sp > stack_lower) {
2010 // The stack pointer gives us a tighter lower bound. 2010 // The stack pointer gives us a tighter lower bound.
2011 stack_lower = state.sp; 2011 stack_lower = state.sp;
2012 } 2012 }
2013 2013
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
2091 state.pc, 2091 state.pc,
2092 state.fp, 2092 state.fp,
2093 state.sp); 2093 state.sp);
2094 stackWalker.walk(); 2094 stackWalker.walk();
2095 #endif 2095 #endif
2096 } 2096 }
2097 } 2097 }
2098 } 2098 }
2099 2099
2100 } // namespace dart 2100 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/isolate.cc ('k') | runtime/vm/service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698