v8
V8 is Google’s open source high-performance JavaScript and WebAssembly engine, written in C++.
Loading...
Searching...
No Matches
perfetto-logger.h
Go to the documentation of this file.
1// Copyright 2024 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_PERFETTO_LOGGER_H_
6#define V8_TRACING_PERFETTO_LOGGER_H_
7
9
10namespace v8 {
11namespace internal {
12
13class Isolate;
14
15// Implementation that writes events to a Perfetto data source.
17 public:
18 static void RegisterIsolate(Isolate* isolate);
19 static void UnregisterIsolate(Isolate* isolate);
20 static void OnCodeDataSourceStart();
21 static void OnCodeDataSourceStop();
22
23 explicit PerfettoLogger(Isolate* isolate);
24 ~PerfettoLogger() override;
25
26 void LogExistingCode();
27
29 const char* name) override;
31 DirectHandle<Name> name) override;
34 DirectHandle<Name> script_name) override;
37 DirectHandle<Name> script_name, int line,
38 int column) override;
39#if V8_ENABLE_WEBASSEMBLY
40 void CodeCreateEvent(CodeTag tag, const wasm::WasmCode* code,
41 wasm::WasmName name, const char* source_url,
42 int code_offset, int script_id) override;
43#endif // V8_ENABLE_WEBASSEMBLY
44
45 void CallbackEvent(DirectHandle<Name> name, Address entry_point) override;
47 Address entry_point) override;
49 Address entry_point) override;
52 RegExpFlags flags) override;
54 Tagged<InstructionStream> to) override;
56 Tagged<BytecodeArray> to) override;
57 void SharedFunctionInfoMoveEvent(Address from, Address to) override;
58 void NativeContextMoveEvent(Address from, Address to) override;
59 void CodeMovingGCEvent() override;
61 DirectHandle<SharedFunctionInfo> shared) override;
63 int fp_to_sp_delta) override;
66 const char* reason) override;
67 void WeakCodeClearEvent() override;
68 bool is_listening_to_code_events() override;
69
70 private:
72};
73
74} // namespace internal
75} // namespace v8
76
77#endif // V8_TRACING_PERFETTO_LOGGER_H_
Builtins::Kind kind
Definition builtins.cc:40
void CodeDeoptEvent(DirectHandle< Code > code, DeoptimizeKind kind, Address pc, int fp_to_sp_delta) override
void BytecodeMoveEvent(Tagged< BytecodeArray > from, Tagged< BytecodeArray > to) override
void SharedFunctionInfoMoveEvent(Address from, Address to) override
void GetterCallbackEvent(DirectHandle< Name > name, Address entry_point) override
void CodeMoveEvent(Tagged< InstructionStream > from, Tagged< InstructionStream > to) override
void RegExpCodeCreateEvent(DirectHandle< AbstractCode > code, DirectHandle< String > source, RegExpFlags flags) override
bool is_listening_to_code_events() override
void CodeDisableOptEvent(DirectHandle< AbstractCode > code, DirectHandle< SharedFunctionInfo > shared) override
static void UnregisterIsolate(Isolate *isolate)
static void RegisterIsolate(Isolate *isolate)
void CodeDependencyChangeEvent(DirectHandle< Code > code, DirectHandle< SharedFunctionInfo > shared, const char *reason) override
void SetterCallbackEvent(DirectHandle< Name > name, Address entry_point) override
void NativeContextMoveEvent(Address from, Address to) override
void CodeCreateEvent(CodeTag tag, DirectHandle< AbstractCode > code, const char *name) override
void CallbackEvent(DirectHandle< Name > name, Address entry_point) override