#include "src/trace_processor/importers/proto/system_probes_parser.h"
#include <cstdint>
#include <optional>
#include "perfetto/base/logging.h"
#include "perfetto/ext/base/string_utils.h"
#include "perfetto/ext/base/string_view.h"
#include "perfetto/ext/traced/sys_stats_counters.h"
#include "perfetto/protozero/proto_decoder.h"
#include "src/trace_processor/importers/common/clock_tracker.h"
#include "src/trace_processor/importers/common/cpu_tracker.h"
#include "src/trace_processor/importers/common/event_tracker.h"
#include "src/trace_processor/importers/common/metadata_tracker.h"
#include "src/trace_processor/importers/common/process_tracker.h"
#include "src/trace_processor/importers/common/system_info_tracker.h"
#include "src/trace_processor/importers/common/track_tracker.h"
#include "src/trace_processor/importers/syscalls/syscall_tracker.h"
#include "src/trace_processor/storage/metadata.h"
#include "src/trace_processor/types/trace_processor_context.h"
#include "protos/perfetto/common/builtin_clock.pbzero.h"
#include "protos/perfetto/trace/ps/process_stats.pbzero.h"
#include "protos/perfetto/trace/ps/process_tree.pbzero.h"
#include "protos/perfetto/trace/system_info.pbzero.h"
#include "protos/perfetto/trace/system_info/cpu_info.pbzero.h"
namespace {
bool IsSupportedDiskStatDevice(const std::string& device_name) { … }
}
namespace perfetto {
namespace trace_processor {
namespace {
std::optional<int> VersionStringToSdkVersion(const std::string& version) { … }
std::optional<int> FingerprintToSdkVersion(const std::string& fingerprint) { … }
struct CpuInfo { … };
struct CpuMaxFrequency { … };
}
SystemProbesParser::SystemProbesParser(TraceProcessorContext* context)
: … { … }
void SystemProbesParser::ParseDiskStats(int64_t ts, ConstBytes blob) { … }
void SystemProbesParser::ParseSysStats(int64_t ts, ConstBytes blob) { … }
void SystemProbesParser::ParseCpuIdleStats(int64_t ts, ConstBytes blob) { … }
void SystemProbesParser::ParseProcessTree(ConstBytes blob) { … }
void SystemProbesParser::ParseProcessStats(int64_t ts, ConstBytes blob) { … }
void SystemProbesParser::ParseThreadStats(int64_t,
uint32_t pid,
ConstBytes blob) { … }
void SystemProbesParser::ParseProcessFds(int64_t ts,
uint32_t pid,
ConstBytes blob) { … }
void SystemProbesParser::ParseSystemInfo(ConstBytes blob) { … }
void SystemProbesParser::ParseCpuInfo(ConstBytes blob) { … }
}
}