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

Unified Diff: include/v8-profiler.h

Issue 2189513002: Move SimulatorHelper into V8 out of profiler clients. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 5 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 | src/api.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/v8-profiler.h
diff --git a/include/v8-profiler.h b/include/v8-profiler.h
index 29d3c84a740b03a87a72de28b38f93be3a044779..9b9d8fd3de3aa652dbcfedfc863df6793d01c0c6 100644
--- a/include/v8-profiler.h
+++ b/include/v8-profiler.h
@@ -60,12 +60,50 @@ struct TickSample {
frames_count(0),
has_external_callback(false),
update_stats(true) {}
+
+ /**
+ * Initialize a tick sample from the isolate.
+ * \param isolate The currect isolate.
+ * \param state Execution state.
+ * \param updated_state When running on simulator, this will be set to
+ the real register state used for sampling.
+ * \param record_c_entry_frame Include or skip the runtime function.
+ * \param update_stats Whether update the sample to the aggregated stats.
+ * \param use_first_state Force V8 to use the first register state to
+ collect sample, default value is false, unless
+ the first 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);
+ RegisterState& updated_state,
alph 2016/07/28 23:57:06 Hmm. Is it an output parameter? Where is it used?
+ RecordCEntryFrame record_c_entry_frame, bool update_stats,
+ bool use_first_state = false);
alph 2016/07/28 23:57:06 The name looks a bit awkward. Not sure about a bet
+ /**
+ * Get a call stack sample from the isolate.
+ * \param isolate The currect isolate.
+ * \param state Execution state.
+ * \param updated_state When running on simulator, this will be set to
+ the real register state used for sampling.
+ * \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 use_first_state Force V8 to use the first register state to
+ collect sample, default value is false, unless
+ the first 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.
+ */
static bool GetStackSample(Isolate* isolate, const v8::RegisterState& state,
+ RegisterState& updated_state,
RecordCEntryFrame record_c_entry_frame,
void** frames, size_t frames_limit,
- v8::SampleInfo* sample_info);
+ v8::SampleInfo* sample_info,
+ bool use_first_state = false);
StateTag state; // The state of the VM.
void* pc; // Instruction pointer.
union {
« no previous file with comments | « no previous file | src/api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698