Chromium Code Reviews| Index: include/v8-profiler.h |
| diff --git a/include/v8-profiler.h b/include/v8-profiler.h |
| index b2c1dc9818ac8e4f78660e48d6a0992815495fb5..3912d9cbc43a79655e7829c6157ece8437a8fc5b 100644 |
| --- a/include/v8-profiler.h |
| +++ b/include/v8-profiler.h |
| @@ -46,6 +46,40 @@ template class V8_EXPORT std::vector<v8::CpuProfileDeoptInfo>; |
| namespace v8 { |
| +// TickSample captures the information collected for each sample. |
| +struct TickSample { |
|
alph
2016/06/29 19:39:09
Why did you remove the timestamp from TickSample?
lpy
2016/06/29 20:17:39
Can the files in include/ directory include files
|
| + // Internal profiling (with --prof + tools/$OS-tick-processor) wants to |
| + // include the runtime function we're calling. Externally exposed tick |
| + // samples don't care. |
| + enum RecordCEntryFrame { kIncludeCEntryFrame, kSkipCEntryFrame }; |
| + |
| + TickSample() |
| + : state(OTHER), |
| + pc(NULL), |
|
alph
2016/06/29 19:39:09
nullptr
lpy
2016/06/29 20:17:39
Done.
|
| + external_callback_entry(NULL), |
| + frames_count(0), |
| + has_external_callback(false), |
| + update_stats(true) {} |
| + void Init(Isolate* isolate, const v8::RegisterState& state, |
| + RecordCEntryFrame record_c_entry_frame, bool update_stats); |
| + static bool GetStackSample(Isolate* isolate, const v8::RegisterState& state, |
| + RecordCEntryFrame record_c_entry_frame, |
| + void** frames, size_t frames_limit, |
| + v8::SampleInfo* sample_info); |
| + StateTag state; // The state of the VM. |
| + void* pc; // Instruction pointer. |
| + union { |
| + void* tos; // Top stack value (*sp). |
| + void* external_callback_entry; |
| + }; |
| + static const unsigned kMaxFramesCountLog2 = 8; |
| + static const unsigned kMaxFramesCount = (1 << kMaxFramesCountLog2) - 1; |
| + void* stack[kMaxFramesCount]; // Call stack. |
| + unsigned frames_count : kMaxFramesCountLog2; // Number of captured frames. |
| + bool has_external_callback : 1; |
| + bool update_stats : 1; // Whether the sample should update aggregated stats. |
| +}; |
| + |
| /** |
| * CpuProfileNode represents a node in a call graph. |
| */ |