#include "src/trace_processor/importers/common/track_tracker.h"
#include <cstdint>
#include <optional>
#include <string>
#include <utility>
#include "src/trace_processor/importers/common/args_tracker.h"
#include "src/trace_processor/importers/common/cpu_tracker.h"
#include "src/trace_processor/importers/common/process_track_translation_table.h"
#include "src/trace_processor/storage/trace_storage.h"
#include "src/trace_processor/tables/profiler_tables_py.h"
#include "src/trace_processor/tables/track_tables_py.h"
#include "src/trace_processor/types/trace_processor_context.h"
#include "src/trace_processor/types/variadic.h"
namespace perfetto {
namespace trace_processor {
namespace {
const char* GetNameForGroup(TrackTracker::Group group) { … }
const char* GetTrackName(TrackTracker::GlobalTrackType type) { … }
std::string GetTrackName(TrackTracker::CpuTrackType type, uint32_t cpu) { … }
std::string GetTrackName(TrackTracker::CpuCounterTrackType type, uint32_t cpu) { … }
const char* GetTrackName(TrackTracker::GpuCounterTrackType type) { … }
const char* GetTrackName(TrackTracker::IrqCounterTrackType type) { … }
const char* GetTrackName(TrackTracker::SoftIrqCounterTrackType type) { … }
}
TrackTracker::TrackTracker(TraceProcessorContext* context)
: … { … }
TrackId TrackTracker::InternThreadTrack(UniqueTid utid) { … }
TrackId TrackTracker::InternProcessTrack(UniquePid upid) { … }
TrackId TrackTracker::InternCpuTrack(CpuTrackType type, uint32_t cpu) { … }
TrackId TrackTracker::InternGlobalTrack(GlobalTrackType type) { … }
TrackId TrackTracker::InternFuchsiaAsyncTrack(StringId name,
uint32_t upid,
int64_t correlation_id) { … }
TrackId TrackTracker::InternGpuTrack(const tables::GpuTrackTable::Row& row) { … }
TrackId TrackTracker::InternGpuWorkPeriodTrack(
const tables::GpuWorkPeriodTrackTable::Row& row) { … }
TrackId TrackTracker::InternLegacyChromeAsyncTrack(
StringId raw_name,
uint32_t upid,
int64_t trace_id,
bool trace_id_is_process_scoped,
StringId source_scope) { … }
TrackId TrackTracker::CreateGlobalAsyncTrack(StringId name, StringId source) { … }
TrackId TrackTracker::CreateProcessAsyncTrack(StringId raw_name,
UniquePid upid,
StringId source) { … }
TrackId TrackTracker::InternLegacyChromeProcessInstantTrack(UniquePid upid) { … }
TrackId TrackTracker::InternGlobalCounterTrack(TrackTracker::Group group,
StringId name,
SetArgsCallback callback,
StringId unit,
StringId description) { … }
TrackId TrackTracker::InternCpuCounterTrack(CpuCounterTrackTuple tuple) { … }
TrackId TrackTracker::InternCpuCounterTrack(CpuCounterTrackType track_type,
uint32_t cpu) { … }
TrackId TrackTracker::InternCpuIdleStateTrack(uint32_t cpu, StringId state) { … }
TrackId TrackTracker::InternThreadCounterTrack(StringId name, UniqueTid utid) { … }
TrackId TrackTracker::InternProcessCounterTrack(StringId raw_name,
UniquePid upid,
StringId unit,
StringId description) { … }
TrackId TrackTracker::InternIrqCounterTrack(IrqCounterTrackType type,
int32_t irq) { … }
TrackId TrackTracker::InternSoftirqCounterTrack(SoftIrqCounterTrackType type,
int32_t softirq) { … }
TrackId TrackTracker::InternGpuCounterTrack(GpuCounterTrackType type,
uint32_t gpu_id) { … }
TrackId TrackTracker::InternEnergyCounterTrack(StringId name,
int32_t consumer_id,
StringId consumer_type,
int32_t ordinal) { … }
TrackId TrackTracker::InternEnergyPerUidCounterTrack(StringId name,
int32_t consumer_id,
int32_t uid) { … }
TrackId TrackTracker::InternLinuxDeviceTrack(StringId name) { … }
TrackId TrackTracker::CreateGpuCounterTrack(StringId name,
uint32_t gpu_id,
StringId description,
StringId unit) { … }
TrackId TrackTracker::CreatePerfCounterTrack(
StringId name,
tables::PerfSessionTable::Id perf_session_id,
uint32_t cpu,
bool is_timebase) { … }
TrackId TrackTracker::InternTrackForGroup(TrackTracker::Group group) { … }
}
}