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

Unified Diff: runtime/vm/profiler.cc

Issue 183113005: Fix usage of heap_ (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 10 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/profiler.cc
diff --git a/runtime/vm/profiler.cc b/runtime/vm/profiler.cc
index f41a017276cb8eaf37bc46dfa69f6201606ab5d1..a80809cb43754027b476c64ea464ac6b8f7bb65f 100644
--- a/runtime/vm/profiler.cc
+++ b/runtime/vm/profiler.cc
@@ -874,15 +874,13 @@ Sample* SampleBuffer::ReserveSample() {
//
class ProfilerSampleStackWalker : public ValueObject {
public:
- ProfilerSampleStackWalker(Heap* heap,
- Sample* sample,
+ ProfilerSampleStackWalker(Sample* sample,
uword stack_lower,
uword stack_upper,
uword pc,
uword fp,
uword sp)
- : heap_(heap),
- sample_(sample),
+ : sample_(sample),
stack_upper_(stack_upper),
original_pc_(pc),
original_fp_(fp),
@@ -891,6 +889,12 @@ class ProfilerSampleStackWalker : public ValueObject {
ASSERT(sample_ != NULL);
}
+#if defined(DEBUG_STACK_WALK)
siva 2014/02/27 18:30:48 I missed this in the last round, normally we don't
+ void set_heap(Heap* heap) {
+ heap_ = heap;
+ }
+#endif
+
int walk() {
const intptr_t kMaxStep = 0x1000; // 4K.
const bool kWalkStack = true; // Walk the stack.
@@ -980,7 +984,9 @@ class ProfilerSampleStackWalker : public ValueObject {
return r;
}
+#if defined(DEBUG_STACK_WALK)
Heap* heap_;
+#endif
Sample* sample_;
const uword stack_upper_;
const uword original_pc_;
@@ -1013,9 +1019,11 @@ void Profiler::RecordSampleInterruptCallback(
stack_lower = 0;
stack_upper = 0;
}
- ProfilerSampleStackWalker stackWalker(isolate->heap(), sample, stack_lower,
- stack_upper, state.pc, state.fp,
- state.sp);
+ ProfilerSampleStackWalker stackWalker(sample, stack_lower, stack_upper,
+ state.pc, state.fp, state.sp);
+#if defined(DEBUG_STACK_WALK)
+ stackWalker.set_heap(isolate->heap());
+#endif
stackWalker.walk();
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698