#include "src/trace_processor/importers/proto/v8_module.h"
#include <cstdint>
#include <optional>
#include "perfetto/base/logging.h"
#include "protos/perfetto/trace/chrome/v8.pbzero.h"
#include "protos/perfetto/trace/trace_packet.pbzero.h"
#include "src/trace_processor/importers/common/parser_types.h"
#include "src/trace_processor/importers/common/process_tracker.h"
#include "src/trace_processor/importers/proto/packet_sequence_state_generation.h"
#include "src/trace_processor/importers/proto/v8_sequence_state.h"
#include "src/trace_processor/importers/proto/v8_tracker.h"
#include "src/trace_processor/storage/stats.h"
#include "src/trace_processor/storage/trace_storage.h"
#include "src/trace_processor/tables/metadata_tables_py.h"
#include "src/trace_processor/tables/v8_tables_py.h"
namespace perfetto {
namespace trace_processor {
namespace {
TracePacket;
V8CodeDefaults;
V8CodeMove;
V8InternalCode;
V8JsCode;
V8RegExpCode;
V8WasmCode;
}
V8Module::V8Module(TraceProcessorContext* context)
: … { … }
V8Module::~V8Module() = default;
ModuleResult V8Module::TokenizePacket(
const TracePacket::Decoder&,
TraceBlobView* ,
int64_t ,
RefPtr<PacketSequenceStateGeneration> ,
uint32_t ) { … }
void V8Module::ParseTracePacketData(const TracePacket::Decoder& decoder,
int64_t ts,
const TracePacketData& data,
uint32_t field_id) { … }
template <typename CodeDecoder>
std::optional<UniqueTid> V8Module::GetUtid(
PacketSequenceStateGeneration& generation,
IsolateId isolate_id,
const CodeDecoder& code) { … }
std::optional<uint32_t> V8Module::GetDefaultTid(
PacketSequenceStateGeneration& generation) const { … }
void V8Module::ParseV8JsCode(protozero::ConstBytes bytes,
int64_t ts,
const TracePacketData& data) { … }
void V8Module::ParseV8InternalCode(protozero::ConstBytes bytes,
int64_t ts,
const TracePacketData& data) { … }
void V8Module::ParseV8WasmCode(protozero::ConstBytes bytes,
int64_t ts,
const TracePacketData& data) { … }
void V8Module::ParseV8RegExpCode(protozero::ConstBytes bytes,
int64_t ts,
const TracePacketData& data) { … }
void V8Module::ParseV8CodeMove(protozero::ConstBytes bytes,
int64_t,
const TracePacketData& data) { … }
}
}