#include "src/trace_redaction/redact_sched_events.h"
#include "perfetto/protozero/scattered_heap_buffer.h"
#include "src/trace_processor/util/status_macros.h"
#include "src/trace_redaction/proto_util.h"
#include "protos/perfetto/trace/ftrace/ftrace_event.pbzero.h"
#include "protos/perfetto/trace/ftrace/ftrace_event_bundle.pbzero.h"
#include "protos/perfetto/trace/ftrace/sched.pbzero.h"
namespace perfetto::trace_redaction {
namespace {
bool IsTrue(bool value) { … }
bool Passthrough(protozero::ProtoDecoder& decoder,
uint32_t field_id,
protozero::Message* message) { … }
}
int64_t InternTable::Push(const char* data, size_t size) { … }
std::string_view InternTable::Find(size_t index) const { … }
base::Status RedactSchedEvents::Transform(const Context& context,
std::string* packet) const { … }
base::Status RedactSchedEvents::OnFtraceEvents(
const Context& context,
protozero::Field ftrace_events,
protos::pbzero::FtraceEventBundle* message) const { … }
base::Status RedactSchedEvents::OnFtraceEvent(
const Context& context,
int32_t cpu,
protozero::Field ftrace_event,
protos::pbzero::FtraceEvent* message) const { … }
base::Status RedactSchedEvents::OnFtraceEventSwitch(
const Context& context,
uint64_t ts,
int32_t cpu,
protos::pbzero::SchedSwitchFtraceEvent::Decoder& sched_switch,
std::string* scratch_str,
protos::pbzero::SchedSwitchFtraceEvent* message) const { … }
base::Status RedactSchedEvents::OnFtraceEventWaking(
const Context& context,
uint64_t ts,
int32_t cpu,
protos::pbzero::SchedWakingFtraceEvent::Decoder& sched_waking,
std::string* scratch_str,
protos::pbzero::FtraceEvent* parent_message) const { … }
base::Status RedactSchedEvents::OnCompSched(
const Context& context,
int32_t cpu,
protos::pbzero::FtraceEventBundle::CompactSched::Decoder& comp_sched,
protos::pbzero::FtraceEventBundle::CompactSched* message) const { … }
base::Status RedactSchedEvents::OnCompSchedSwitch(
const Context& context,
int32_t cpu,
protos::pbzero::FtraceEventBundle::CompactSched::Decoder& comp_sched,
InternTable* intern_table,
protos::pbzero::FtraceEventBundle::CompactSched* message) const { … }
base::Status RedactSchedEvents::OnCompactSchedWaking(
const Context& context,
protos::pbzero::FtraceEventBundle::CompactSched::Decoder& compact_sched,
InternTable* intern_table,
protos::pbzero::FtraceEventBundle::CompactSched* compact_sched_message)
const { … }
}