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

Unified Diff: runtime/vm/stack_frame.h

Issue 360373003: Enable top exit frame profiler mode by default + Windows fixes (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 6 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/profiler.cc ('k') | runtime/vm/stack_frame.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/stack_frame.h
diff --git a/runtime/vm/stack_frame.h b/runtime/vm/stack_frame.h
index f4617f0b4a77fefe6c1a783691432d7de8ac644c..d80eca770fe00ebec45255dc04badf8185f8cd94 100644
--- a/runtime/vm/stack_frame.h
+++ b/runtime/vm/stack_frame.h
@@ -62,8 +62,8 @@ class StackFrame : public ValueObject {
virtual bool IsValid() const;
// Frame type.
- virtual bool IsDartFrame() const {
- ASSERT(IsValid());
+ virtual bool IsDartFrame(bool validate = true) const {
+ ASSERT(!validate || IsValid());
return !(IsEntryFrame() || IsExitFrame() || IsStubFrame());
}
virtual bool IsStubFrame() const;
@@ -121,7 +121,7 @@ class StackFrame : public ValueObject {
class ExitFrame : public StackFrame {
public:
bool IsValid() const { return sp() == 0; }
- bool IsDartFrame() const { return false; }
+ bool IsDartFrame(bool validate = true) const { return false; }
bool IsStubFrame() const { return false; }
bool IsExitFrame() const { return true; }
@@ -146,7 +146,7 @@ class EntryFrame : public StackFrame {
bool IsValid() const {
return StubCode::InInvocationStubForIsolate(isolate(), pc());
}
- bool IsDartFrame() const { return false; }
+ bool IsDartFrame(bool validate = true) const { return false; }
bool IsStubFrame() const { return false; }
bool IsEntryFrame() const { return true; }
@@ -194,6 +194,8 @@ class StackFrameIterator : public ValueObject {
// Get next frame.
StackFrame* NextFrame();
+ bool validate() const { return validate_; }
+
private:
// Iterator for iterating over the set of frames (dart or stub) which exist
// in one EntryFrame and ExitFrame block.
@@ -274,7 +276,7 @@ class DartFrameIterator : public ValueObject {
// Get next dart frame.
StackFrame* NextFrame() {
StackFrame* frame = frames_.NextFrame();
- while (frame != NULL && !frame->IsDartFrame()) {
+ while (frame != NULL && !frame->IsDartFrame(frames_.validate())) {
frame = frames_.NextFrame();
}
return frame;
« no previous file with comments | « runtime/vm/profiler.cc ('k') | runtime/vm/stack_frame.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698