diff options
Diffstat (limited to 'deps/v8/include/v8-profiler.h')
-rw-r--r-- | deps/v8/include/v8-profiler.h | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/deps/v8/include/v8-profiler.h b/deps/v8/include/v8-profiler.h index 74b6df884d..85d3f8a482 100644 --- a/deps/v8/include/v8-profiler.h +++ b/deps/v8/include/v8-profiler.h @@ -259,6 +259,17 @@ enum class CpuProfilingStatus { }; /** + * Delegate for when max samples reached and samples are discarded. + */ +class V8_EXPORT DiscardedSamplesDelegate { + public: + DiscardedSamplesDelegate() {} + + virtual ~DiscardedSamplesDelegate() = default; + virtual void Notify() = 0; +}; + +/** * Optional profiling attributes. */ class V8_EXPORT CpuProfilingOptions { @@ -346,8 +357,9 @@ class V8_EXPORT CpuProfiler { * profiles may be collected at once. Attempts to start collecting several * profiles with the same title are silently ignored. */ - CpuProfilingStatus StartProfiling(Local<String> title, - CpuProfilingOptions options); + CpuProfilingStatus StartProfiling( + Local<String> title, CpuProfilingOptions options, + std::unique_ptr<DiscardedSamplesDelegate> delegate = nullptr); /** * Starts profiling with the same semantics as above, except with expanded |