#include "src/trace_processor/importers/ftrace/ftrace_sched_event_tracker.h"
#include <limits>
#include "perfetto/ext/base/string_view.h"
#include "src/trace_processor/importers/common/args_tracker.h"
#include "src/trace_processor/importers/common/event_tracker.h"
#include "src/trace_processor/importers/common/process_tracker.h"
#include "src/trace_processor/importers/common/sched_event_state.h"
#include "src/trace_processor/importers/common/sched_event_tracker.h"
#include "src/trace_processor/importers/common/system_info_tracker.h"
#include "src/trace_processor/importers/common/thread_state_tracker.h"
#include "src/trace_processor/importers/ftrace/ftrace_descriptors.h"
#include "src/trace_processor/storage/stats.h"
#include "src/trace_processor/storage/trace_storage.h"
#include "src/trace_processor/types/task_state.h"
#include "src/trace_processor/types/trace_processor_context.h"
#include "src/trace_processor/types/variadic.h"
#include "protos/perfetto/trace/ftrace/ftrace_event.pbzero.h"
#include "protos/perfetto/trace/ftrace/sched.pbzero.h"
namespace perfetto {
namespace trace_processor {
FtraceSchedEventTracker::FtraceSchedEventTracker(TraceProcessorContext* context)
: … { … }
FtraceSchedEventTracker::~FtraceSchedEventTracker() = default;
void FtraceSchedEventTracker::PushSchedSwitch(uint32_t cpu,
int64_t ts,
uint32_t prev_pid,
base::StringView prev_comm,
int32_t prev_prio,
int64_t prev_state,
uint32_t next_pid,
base::StringView next_comm,
int32_t next_prio) { … }
void FtraceSchedEventTracker::PushSchedSwitchCompact(uint32_t cpu,
int64_t ts,
int64_t prev_state,
uint32_t next_pid,
int32_t next_prio,
StringId next_comm_id,
bool parse_only_into_raw) { … }
void FtraceSchedEventTracker::PushSchedWakingCompact(uint32_t cpu,
int64_t ts,
uint32_t wakee_pid,
uint16_t target_cpu,
uint16_t prio,
StringId comm_id,
uint16_t common_flags,
bool parse_only_into_raw) { … }
void FtraceSchedEventTracker::AddRawSchedSwitchEvent(uint32_t cpu,
int64_t ts,
UniqueTid prev_utid,
uint32_t prev_pid,
StringId prev_comm_id,
int32_t prev_prio,
int64_t prev_state,
uint32_t next_pid,
StringId next_comm_id,
int32_t next_prio) { … }
StringId FtraceSchedEventTracker::TaskStateToStringId(int64_t task_state_int) { … }
}
}