v8
V8 is Google’s open source high-performance JavaScript and WebAssembly engine, written in C++.
Loading...
Searching...
No Matches
trace-event-listener.h
Go to the documentation of this file.
1// Copyright 2019 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_LIBPLATFORM_TRACING_TRACE_EVENT_LISTENER_H_
6#define V8_LIBPLATFORM_TRACING_TRACE_EVENT_LISTENER_H_
7
8#include <vector>
9
11
12namespace v8 {
13namespace platform {
14namespace tracing {
15
16// A TraceEventListener is a simple interface that allows subclasses to listen
17// to trace events. This interface is to hide the more complex interactions that
18// the PerfettoConsumer class has to perform. Clients override ParseFromArray()
19// to process traces, e.g. to write them to a file as JSON or for testing
20// purposes.
22 public:
23 virtual ~TraceEventListener() = default;
24 virtual void ParseFromArray(const std::vector<char>& array) = 0;
25};
26
27} // namespace tracing
28} // namespace platform
29} // namespace v8
30
31#endif // V8_LIBPLATFORM_TRACING_TRACE_EVENT_LISTENER_H_
virtual void ParseFromArray(const std::vector< char > &array)=0
#define V8_PLATFORM_EXPORT