#include "src/trace_processor/importers/proto/profile_module.h"
#include <optional>
#include <string>
#include "perfetto/base/logging.h"
#include "perfetto/ext/base/flat_hash_map.h"
#include "perfetto/ext/base/string_utils.h"
#include "perfetto/ext/base/string_view.h"
#include "src/trace_processor/importers/common/args_translation_table.h"
#include "src/trace_processor/importers/common/clock_tracker.h"
#include "src/trace_processor/importers/common/deobfuscation_mapping_table.h"
#include "src/trace_processor/importers/common/event_tracker.h"
#include "src/trace_processor/importers/common/mapping_tracker.h"
#include "src/trace_processor/importers/common/process_tracker.h"
#include "src/trace_processor/importers/common/stack_profile_tracker.h"
#include "src/trace_processor/importers/proto/packet_sequence_state_generation.h"
#include "src/trace_processor/importers/proto/perf_sample_tracker.h"
#include "src/trace_processor/importers/proto/profile_packet_sequence_state.h"
#include "src/trace_processor/importers/proto/profile_packet_utils.h"
#include "src/trace_processor/importers/proto/stack_profile_sequence_state.h"
#include "src/trace_processor/sorter/trace_sorter.h"
#include "src/trace_processor/storage/stats.h"
#include "src/trace_processor/storage/trace_storage.h"
#include "src/trace_processor/tables/profiler_tables_py.h"
#include "src/trace_processor/types/trace_processor_context.h"
#include "src/trace_processor/util/build_id.h"
#include "src/trace_processor/util/profiler_util.h"
#include "protos/perfetto/common/builtin_clock.pbzero.h"
#include "protos/perfetto/common/perf_events.pbzero.h"
#include "protos/perfetto/trace/profiling/deobfuscation.pbzero.h"
#include "protos/perfetto/trace/profiling/profile_common.pbzero.h"
#include "protos/perfetto/trace/profiling/profile_packet.pbzero.h"
#include "protos/perfetto/trace/profiling/smaps.pbzero.h"
namespace perfetto {
namespace trace_processor {
TracePacket;
ConstBytes;
ProfileModule::ProfileModule(TraceProcessorContext* context)
: … { … }
ProfileModule::~ProfileModule() = default;
ModuleResult ProfileModule::TokenizePacket(
const TracePacket::Decoder& decoder,
TraceBlobView* packet,
int64_t ,
RefPtr<PacketSequenceStateGeneration> state,
uint32_t field_id) { … }
void ProfileModule::ParseTracePacketData(
const protos::pbzero::TracePacket::Decoder& decoder,
int64_t ts,
const TracePacketData& data,
uint32_t field_id) { … }
ModuleResult ProfileModule::TokenizeStreamingProfilePacket(
RefPtr<PacketSequenceStateGeneration> sequence_state,
TraceBlobView* packet,
ConstBytes streaming_profile_packet) { … }
void ProfileModule::ParseStreamingProfilePacket(
int64_t timestamp,
PacketSequenceStateGeneration* sequence_state,
ConstBytes streaming_profile_packet) { … }
void ProfileModule::ParsePerfSample(
int64_t ts,
PacketSequenceStateGeneration* sequence_state,
const TracePacket::Decoder& decoder) { … }
void ProfileModule::ParseProfilePacket(
int64_t ts,
PacketSequenceStateGeneration* sequence_state,
ConstBytes blob) { … }
void ProfileModule::ParseModuleSymbols(ConstBytes blob) { … }
void ProfileModule::ParseDeobfuscationMapping(int64_t,
PacketSequenceStateGeneration*,
uint32_t ,
ConstBytes blob) { … }
void ProfileModule::ParseSmapsPacket(int64_t ts, ConstBytes blob) { … }
void ProfileModule::NotifyEndOfFile() { … }
}
}