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

Unified Diff: runtime/vm/isolate.cc

Issue 718393005: Enable the profiler on the simulator (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | runtime/vm/profiler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/isolate.cc
diff --git a/runtime/vm/isolate.cc b/runtime/vm/isolate.cc
index 3c5e938ea08b46fcc1e7a9ad4e6c6bd3ff5ce205..6be38c3dbb6f325782b3e964ef7f4ea6604ed3db 100644
--- a/runtime/vm/isolate.cc
+++ b/runtime/vm/isolate.cc
@@ -647,6 +647,10 @@ uword Isolate::GetSpecifiedStackSize() {
void Isolate::SetStackLimitFromStackBase(uword stack_base) {
+ // Set stack base.
+ stack_base_ = stack_base;
+
+ // Set stack limit.
#if defined(USING_SIMULATOR)
// Ignore passed-in native stack top and use Simulator stack top.
Simulator* sim = Simulator::Current(); // May allocate a simulator.
@@ -654,10 +658,7 @@ void Isolate::SetStackLimitFromStackBase(uword stack_base) {
stack_base = sim->StackTop();
// The overflow area is accounted for by the simulator.
#endif
- // Set stack base.
- stack_base_ = stack_base;
- // Set stack limit.
- SetStackLimit(stack_base_ - GetSpecifiedStackSize());
+ SetStackLimit(stack_base - GetSpecifiedStackSize());
}
@@ -680,14 +681,11 @@ void Isolate::ClearStackLimit() {
bool Isolate::GetProfilerStackBounds(uword* lower, uword* upper) const {
- uword stack_lower = stack_limit();
- if (stack_lower == kUwordMax) {
- stack_lower = saved_stack_limit();
- }
- if (stack_lower == kUwordMax) {
+ uword stack_upper = stack_base_;
+ if (stack_upper == 0) {
return false;
}
- uword stack_upper = stack_lower + GetSpecifiedStackSize();
+ uword stack_lower = stack_upper - GetSpecifiedStackSize();
*lower = stack_lower;
*upper = stack_upper;
return true;
« no previous file with comments | « no previous file | runtime/vm/profiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698