Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Public Member Functions | Protected Attributes | List of all members
dart::ProfilerStackWalker Class Reference
Inheritance diagram for dart::ProfilerStackWalker:
dart::ValueObject dart::ProfilerDartStackWalker dart::ProfilerNativeStackWalker

Public Member Functions

 ProfilerStackWalker (Dart_Port port_id, Sample *head_sample, SampleBuffer *sample_buffer, intptr_t skip_count=0)
 
bool Append (uword pc, uword fp)
 
- Public Member Functions inherited from dart::ValueObject
 ValueObject ()
 
 ~ValueObject ()
 

Protected Attributes

Dart_Port port_id_
 
Samplesample_
 
SampleBuffersample_buffer_
 
intptr_t skip_count_
 
intptr_t frames_skipped_
 
intptr_t frame_index_
 
intptr_t total_frames_
 

Detailed Description

Definition at line 124 of file profiler.cc.

Constructor & Destructor Documentation

◆ ProfilerStackWalker()

dart::ProfilerStackWalker::ProfilerStackWalker ( Dart_Port  port_id,
Sample head_sample,
SampleBuffer sample_buffer,
intptr_t  skip_count = 0 
)
inline

Definition at line 126 of file profiler.cc.

130 : port_id_(port_id),
131 sample_(head_sample),
132 sample_buffer_(sample_buffer),
133 skip_count_(skip_count),
135 frame_index_(0),
136 total_frames_(0) {
137 if (sample_ == nullptr) {
138 ASSERT(sample_buffer_ == nullptr);
139 } else {
140 ASSERT(sample_buffer_ != nullptr);
142 }
143 }
SampleBuffer * sample_buffer_
Definition profiler.cc:182
bool head_sample() const
Definition profiler.h:350
#define ASSERT(E)

Member Function Documentation

◆ Append()

bool dart::ProfilerStackWalker::Append ( uword  pc,
uword  fp 
)
inline

Definition at line 145 of file profiler.cc.

145 {
148 return true;
149 }
150
151 if (sample_ == nullptr) {
153 frame_index_++;
155 return true;
156 }
157 if (total_frames_ >= FLAG_max_profile_depth) {
159 return false;
160 }
161 ASSERT(sample_ != nullptr);
164 if (new_sample == nullptr) {
165 // Could not reserve new sample- mark this as truncated.
167 return false;
168 }
169 frame_index_ = 0;
170 sample_ = new_sample;
171 }
174 frame_index_++;
176 return true;
177 }
virtual Sample * ReserveSampleAndLink(Sample *previous)=0
static constexpr int kPCArraySizeInWords
Definition profiler.h:362
void set_truncated_trace(bool truncated_trace)
Definition profiler.h:302
void SetAt(intptr_t i, uword pc)
Definition profiler.h:244
const uint32_t fp
static void DumpStackFrame(uword pc, uword fp, const char *name, uword offset)
Definition profiler.cc:72

Member Data Documentation

◆ frame_index_

intptr_t dart::ProfilerStackWalker::frame_index_
protected

Definition at line 185 of file profiler.cc.

◆ frames_skipped_

intptr_t dart::ProfilerStackWalker::frames_skipped_
protected

Definition at line 184 of file profiler.cc.

◆ port_id_

Dart_Port dart::ProfilerStackWalker::port_id_
protected

Definition at line 180 of file profiler.cc.

◆ sample_

Sample* dart::ProfilerStackWalker::sample_
protected

Definition at line 181 of file profiler.cc.

◆ sample_buffer_

SampleBuffer* dart::ProfilerStackWalker::sample_buffer_
protected

Definition at line 182 of file profiler.cc.

◆ skip_count_

intptr_t dart::ProfilerStackWalker::skip_count_
protected

Definition at line 183 of file profiler.cc.

◆ total_frames_

intptr_t dart::ProfilerStackWalker::total_frames_
protected

Definition at line 186 of file profiler.cc.


The documentation for this class was generated from the following file: