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

Unified Diff: runtime/vm/isolate.h

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, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/dart_entry.cc ('k') | runtime/vm/isolate.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/isolate.h
diff --git a/runtime/vm/isolate.h b/runtime/vm/isolate.h
index c97a102064ec27056e9e4b35d26502072aa32326..0356d59c2f05076b0cf94ebb5545ca7f1c252081 100644
--- a/runtime/vm/isolate.h
+++ b/runtime/vm/isolate.h
@@ -240,7 +240,8 @@ class Isolate : public BaseIsolate {
}
void SetStackLimit(uword value);
- void SetStackLimitFromCurrentTOS(uword isolate_stack_top);
+ void SetStackLimitFromStackBase(uword stack_base);
+ void ClearStackLimit();
uword stack_limit_address() const {
return reinterpret_cast<uword>(&stack_limit_);
@@ -256,6 +257,8 @@ class Isolate : public BaseIsolate {
// The true stack limit for this isolate.
uword saved_stack_limit() const { return saved_stack_limit_; }
+ uword stack_base() const { return stack_base_; }
+
// Stack overflow flags
enum {
kOsrRequest = 0x1, // Current stack overflow caused by OSR request.
@@ -274,8 +277,8 @@ class Isolate : public BaseIsolate {
// stack overflow is called.
uword GetAndClearStackOverflowFlags();
- // Retrieve the stack address bounds.
- bool GetStackBounds(uword* lower, uword* upper);
+ // Retrieve the stack address bounds for profiler.
+ bool GetProfilerStackBounds(uword* lower, uword* upper) const;
static uword GetSpecifiedStackSize();
@@ -649,6 +652,7 @@ class Isolate : public BaseIsolate {
Mutex* mutex_; // protects stack_limit_ and saved_stack_limit_.
uword stack_limit_;
uword saved_stack_limit_;
+ uword stack_base_;
uword stack_overflow_flags_;
int32_t stack_overflow_count_;
MessageHandler* message_handler_;
@@ -749,13 +753,13 @@ class StartIsolateScope {
if (saved_isolate_ != new_isolate_) {
ASSERT(Isolate::Current() == NULL);
Isolate::SetCurrent(new_isolate_);
- new_isolate_->SetStackLimitFromCurrentTOS(reinterpret_cast<uword>(this));
+ new_isolate_->SetStackLimitFromStackBase(reinterpret_cast<uword>(this));
}
}
~StartIsolateScope() {
if (saved_isolate_ != new_isolate_) {
- new_isolate_->SetStackLimit(~static_cast<uword>(0));
+ new_isolate_->ClearStackLimit();
Isolate::SetCurrent(saved_isolate_);
}
}
« no previous file with comments | « runtime/vm/dart_entry.cc ('k') | runtime/vm/isolate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698