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

Unified Diff: include/v8-profiler.h

Issue 2378143003: [profiler] Introduce Tracing CPU profiler V8 API. (Closed)
Patch Set: Created 4 years, 3 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 | « BUILD.gn ('k') | src/profiler/tracing-cpu-profiler.h » ('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 55c8386bdeff4aa1a7bb3570671999013216de35..6ee0340f3c3d7c0b5a443a3fec08891b077580ad 100644
--- a/include/v8-profiler.h
+++ b/include/v8-profiler.h
@@ -46,6 +46,20 @@ template class V8_EXPORT std::vector<v8::CpuProfileDeoptInfo>;
namespace v8 {
+/**
+ * TracingCpuProfiler monitors tracing being enabled/disabled
+ * and emits CpuProfile trace events once v8.cpu_profile2 tracing category
+ * is enabled. It has no overhead unless the category is enabled.
+ */
+class V8_EXPORT TracingCpuProfiler {
+ public:
+ static std::unique_ptr<TracingCpuProfiler> Create(Isolate*);
+ virtual ~TracingCpuProfiler() = default;
+
+ protected:
+ TracingCpuProfiler() = default;
+};
+
// TickSample captures the information collected for each sample.
struct TickSample {
// Internal profiling (with --prof + tools/$OS-tick-processor) wants to
« no previous file with comments | « BUILD.gn ('k') | src/profiler/tracing-cpu-profiler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698