v8
V8 is Google’s open source high-performance JavaScript and WebAssembly engine, written in C++.
Loading...
Searching...
No Matches
tracing-category-observer.h
Go to the documentation of this file.
1// Copyright 2016 the V8 project authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#ifndef V8_TRACING_TRACING_CATEGORY_OBSERVER_H_
6#define V8_TRACING_TRACING_CATEGORY_OBSERVER_H_
7
10
11namespace v8 {
12namespace tracing {
13
15#if defined(V8_USE_PERFETTO)
16 : public perfetto::TrackEventSessionObserver {
17#else
19#endif
20 public:
21 enum Mode {
22 ENABLED_BY_NATIVE = 1 << 0,
25 };
26
27 static void SetUp();
28 static void TearDown();
29
30#if defined(V8_USE_PERFETTO)
31 // perfetto::TrackEventSessionObserver
32 void OnStart(const perfetto::DataSourceBase::StartArgs&) override;
33 void OnStop(const perfetto::DataSourceBase::StopArgs&) override;
34#else
35 // v8::TracingController::TraceStateObserver
36 void OnTraceEnabled() final;
37 void OnTraceDisabled() final;
38#endif
39
40 private:
42};
43
44} // namespace tracing
45} // namespace v8
46
47#endif // V8_TRACING_TRACING_CATEGORY_OBSERVER_H_
static TracingCategoryObserver * instance_
bool defined