Index: include/v8-profiler.h |
diff --git a/include/v8-profiler.h b/include/v8-profiler.h |
index 88a5fe027d7ab0ea49a28ce935fc87827067bdc4..14a31344c442049204de33c67c69004c44760f50 100644 |
--- a/include/v8-profiler.h |
+++ b/include/v8-profiler.h |
@@ -60,12 +60,44 @@ struct TickSample { |
frames_count(0), |
has_external_callback(false), |
update_stats(true) {} |
+ |
+ /** |
+ * Initialize a tick sample from the isolate. |
+ * \param isolate The currect isolate. |
alph
2016/08/08 21:36:57
typo. Perhaps just "The isolate" would be fine.
lpy
2016/08/09 18:31:43
Done.
|
+ * \param state Execution state. |
+ * \param record_c_entry_frame Include or skip the runtime function. |
+ * \param update_stats Whether update the sample to the aggregated stats. |
+ * \param update_state If set to true, V8 will update the register state |
+ when running on simulator. Default value is true, |
+ unless the register state is absolutely correct, |
+ otherwise don't use it. |
+ */ |
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, bool update_stats, |
+ bool update_state = true); |
alph
2016/08/08 21:36:57
How does it update the state if it's declared cons
lpy
2016/08/09 18:31:43
My question is where we want to propagate the upda
|
+ /** |
+ * Get a call stack sample from the isolate. |
+ * \param isolate The currect isolate. |
+ * \param state Register state. |
+ * \param record_c_entry_frame Include or skip the runtime function. |
+ * \param frames Caller allocated buffer to store stack frames. |
+ * \param frames_limit Maximum number of frames to capture. The buffer must |
+ * be large enough to hold the number of frames. |
+ * \param sample_info The sample info is filled up by the function |
+ * provides number of actual captured stack frames and |
+ * the current VM state. |
+ * \param update_state If set to true, V8 will update the given register state |
+ when running on simulator. Default value is true, |
+ unless the register state is absolutely correct, |
+ otherwise don't use it. |
+ * \note GetStackSample should only be called when the JS thread is paused or |
+ * interrupted. Otherwise the behavior is undefined. |
alph
2016/08/08 21:36:57
Could you please also note that the function is th
lpy
2016/08/09 18:31:43
Done.
|
+ */ |
+ static bool GetStackSample(Isolate* isolate, v8::RegisterState& state, |
alph
2016/08/08 21:36:57
if state is an in-out parameter now, it should be
lpy
2016/08/09 18:31:43
Done.
|
RecordCEntryFrame record_c_entry_frame, |
void** frames, size_t frames_limit, |
- v8::SampleInfo* sample_info); |
+ v8::SampleInfo* sample_info, |
+ bool update_state = true); |
StateTag state; // The state of the VM. |
void* pc; // Instruction pointer. |
union { |