#include "src/trace_processor/importers/perf/features.h"
#include <cstdint>
#include <utility>
#include "perfetto/base/logging.h"
#include "perfetto/base/status.h"
#include "perfetto/ext/base/string_utils.h"
#include "perfetto/ext/base/string_view.h"
#include "perfetto/trace_processor/status.h"
#include "perfetto/trace_processor/trace_blob_view.h"
#include "src/trace_processor/importers/perf/perf_event.h"
#include "src/trace_processor/importers/perf/reader.h"
#include "src/trace_processor/util/status_macros.h"
namespace perfetto::trace_processor::perf_importer::feature {
namespace {
struct BuildIdRecord { … };
uint8_t CountTrailingZeros(const BuildIdRecord& build_id) { … }
uint8_t GuessBuildIdSize(const BuildIdRecord& build_id) { … }
bool ParseString(Reader& reader, std::string& out) { … }
bool ParseBuildId(const perf_event_header& header,
TraceBlobView blob,
BuildId& out) { … }
util::Status ParseEventTypeInfo(std::string value, SimpleperfMetaInfo& out) { … }
util::Status ParseSimpleperfMetaInfoEntry(
std::pair<std::string, std::string> entry,
SimpleperfMetaInfo& out) { … }
}
util::Status BuildId::Parse(TraceBlobView bytes,
std::function<util::Status(BuildId)> cb) { … }
util::Status SimpleperfMetaInfo::Parse(const TraceBlobView& bytes,
SimpleperfMetaInfo& out) { … }
util::Status EventDescription::Parse(
TraceBlobView bytes,
std::function<util::Status(EventDescription)> cb) { … }
util::Status ParseSimpleperfFile2(TraceBlobView bytes,
std::function<void(TraceBlobView)> cb) { … }
util::Status HeaderGroupDesc::Parse(TraceBlobView bytes, HeaderGroupDesc& out) { … }
base::StatusOr<std::vector<std::string>> ParseCmdline(TraceBlobView bytes) { … }
}