v8
V8 is Google’s open source high-performance JavaScript and WebAssembly engine, written in C++.
Loading...
Searching...
No Matches
recorder.h
Go to the documentation of this file.
1
// Copyright 2020 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_RECORDER_H_
6
#define V8_LIBPLATFORM_TRACING_RECORDER_H_
7
8
#include <stdint.h>
9
10
#include "
include/libplatform/v8-tracing.h
"
11
12
#if V8_OS_DARWIN
13
#include <os/signpost.h>
14
#pragma clang diagnostic push
15
#pragma clang diagnostic ignored "-Wunguarded-availability"
16
#endif
17
18
#if !defined(V8_ENABLE_SYSTEM_INSTRUMENTATION)
19
#error "only include this file if V8_ENABLE_SYSTEM_INSTRUMENTATION"
20
#endif
// V8_ENABLE_SYSTEM_INSTRUMENTATION
21
22
namespace
v8
{
23
namespace
platform {
24
namespace
tracing {
25
26
// This class serves as a base class for emitting events to system event
27
// controllers: ETW for Windows, Signposts on Mac (to be implemented). It is
28
// enabled by turning on both the ENABLE_SYSTEM_INSTRUMENTATION build flag and
29
// the --enable-system-instrumentation command line flag. When enabled, it is
30
// called from within SystemInstrumentationTraceWriter and replaces the
31
// JSONTraceWriter for event-tracing.
32
class
V8_PLATFORM_EXPORT
Recorder
{
33
public
:
34
Recorder
();
35
~Recorder
();
36
37
bool
IsEnabled();
38
bool
IsEnabled(
const
uint8_t level);
39
40
void
AddEvent(
TraceObject
* trace_event);
41
42
private
:
43
#if V8_OS_DARWIN
44
os_log_t v8Provider;
45
#endif
46
};
47
48
}
// namespace tracing
49
}
// namespace platform
50
}
// namespace v8
51
52
#if V8_OS_DARWIN
53
#pragma clang diagnostic pop
54
#endif
55
56
#endif
// V8_LIBPLATFORM_TRACING_RECORDER_H_
v8::platform::tracing::Recorder
Definition
recorder.h:32
v8::platform::tracing::TraceObject
Definition
v8-tracing.h:36
V8_PLATFORM_EXPORT
#define V8_PLATFORM_EXPORT
Definition
libplatform-export.h:24
v8
Definition
api-arguments-inl.h:19
v8-tracing.h
src
libplatform
tracing
recorder.h
Generated on Sun Apr 6 2025 21:08:54 for v8 by
1.12.0