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

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
Index: runtime/vm/isolate.cc
diff --git a/runtime/vm/isolate.cc b/runtime/vm/isolate.cc
index a87a87a475d478e43b2c31f64d8d6500b3dab2f7..cfb7cebb383664e9eee9e338fcecabbe85e8739a 100644
--- a/runtime/vm/isolate.cc
+++ b/runtime/vm/isolate.cc
@@ -649,6 +649,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.
@@ -656,10 +660,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());
}
@@ -682,14 +683,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;

Powered by Google App Engine
This is Rietveld 408576698