#ifndef _KERNEL_STATS_H
#define _KERNEL_STATS_H
#ifdef CONFIG_SCHEDSTATS
extern struct static_key_false sched_schedstats;
static inline void
rq_sched_info_arrive(struct rq *rq, unsigned long long delta)
{ … }
static inline void
rq_sched_info_depart(struct rq *rq, unsigned long long delta)
{ … }
static inline void
rq_sched_info_dequeue(struct rq *rq, unsigned long long delta)
{ … }
#define schedstat_enabled() …
#define __schedstat_inc(var) …
#define schedstat_inc(var) …
#define __schedstat_add(var, amt) …
#define schedstat_add(var, amt) …
#define __schedstat_set(var, val) …
#define schedstat_set(var, val) …
#define schedstat_val(var) …
#define schedstat_val_or_zero(var) …
void __update_stats_wait_start(struct rq *rq, struct task_struct *p,
struct sched_statistics *stats);
void __update_stats_wait_end(struct rq *rq, struct task_struct *p,
struct sched_statistics *stats);
void __update_stats_enqueue_sleeper(struct rq *rq, struct task_struct *p,
struct sched_statistics *stats);
static inline void
check_schedstat_required(void)
{ … }
#else
static inline void rq_sched_info_arrive (struct rq *rq, unsigned long long delta) { }
static inline void rq_sched_info_dequeue(struct rq *rq, unsigned long long delta) { }
static inline void rq_sched_info_depart (struct rq *rq, unsigned long long delta) { }
#define schedstat_enabled …
#define __schedstat_inc …
#define schedstat_inc …
#define __schedstat_add …
#define schedstat_add …
#define __schedstat_set …
#define schedstat_set …
#define schedstat_val …
#define schedstat_val_or_zero …
#define __update_stats_wait_start …
#define __update_stats_wait_end …
#define __update_stats_enqueue_sleeper …
#define check_schedstat_required …
#endif
#ifdef CONFIG_FAIR_GROUP_SCHED
struct sched_entity_stats { … } __no_randomize_layout;
#endif
static inline struct sched_statistics *
__schedstats_from_se(struct sched_entity *se)
{ … }
#ifdef CONFIG_PSI
void psi_task_change(struct task_struct *task, int clear, int set);
void psi_task_switch(struct task_struct *prev, struct task_struct *next,
bool sleep);
#ifdef CONFIG_IRQ_TIME_ACCOUNTING
void psi_account_irqtime(struct rq *rq, struct task_struct *curr, struct task_struct *prev);
#else
static inline void psi_account_irqtime(struct rq *rq, struct task_struct *curr,
struct task_struct *prev) {}
#endif
static inline void psi_enqueue(struct task_struct *p, bool wakeup)
{ … }
static inline void psi_dequeue(struct task_struct *p, bool sleep)
{ … }
static inline void psi_ttwu_dequeue(struct task_struct *p)
{ … }
static inline void psi_sched_switch(struct task_struct *prev,
struct task_struct *next,
bool sleep)
{ … }
#else
static inline void psi_enqueue(struct task_struct *p, bool wakeup) {}
static inline void psi_dequeue(struct task_struct *p, bool sleep) {}
static inline void psi_ttwu_dequeue(struct task_struct *p) {}
static inline void psi_sched_switch(struct task_struct *prev,
struct task_struct *next,
bool sleep) {}
static inline void psi_account_irqtime(struct rq *rq, struct task_struct *curr,
struct task_struct *prev) {}
#endif
#ifdef CONFIG_SCHED_INFO
static inline void sched_info_dequeue(struct rq *rq, struct task_struct *t)
{ … }
static void sched_info_arrive(struct rq *rq, struct task_struct *t)
{ … }
static inline void sched_info_enqueue(struct rq *rq, struct task_struct *t)
{ … }
static inline void sched_info_depart(struct rq *rq, struct task_struct *t)
{ … }
static inline void
sched_info_switch(struct rq *rq, struct task_struct *prev, struct task_struct *next)
{ … }
#else
#define sched_info_enqueue …
#define sched_info_dequeue …
#define sched_info_switch …
#endif
#endif