mirror of
https://github.com/torvalds/linux.git
synced 2026-07-31 11:37:06 +02:00
sched/walt: allow reference to walt debug capabilities
Debug capabilities are needed throughout walt files, while the walt-specific debug/dumping capabilities are strictly in walt.c and dependent upon local variables. Support the ability to cause a crash across all walt functionality. Change-Id: I10fffcf028e39964f92b4a5c05dfd35f0eff63fb Signed-off-by: Stephen Dickey <dickey@codeaurora.org>
This commit is contained in:
parent
61cf79010e
commit
55bfad9a22
|
|
@ -175,7 +175,7 @@ __read_mostly unsigned int walt_scale_demand_divisor;
|
|||
#define SCHED_PRINT(arg) printk_deferred("%s=%llu", #arg, arg)
|
||||
#define STRG(arg) #arg
|
||||
|
||||
static inline void walt_task_dump(struct task_struct *p)
|
||||
void walt_task_dump(struct task_struct *p)
|
||||
{
|
||||
char buff[WALT_NR_CPUS * 16];
|
||||
int i, j = 0;
|
||||
|
|
@ -216,7 +216,7 @@ static inline void walt_task_dump(struct task_struct *p)
|
|||
SCHED_PRINT(p->on_rq);
|
||||
}
|
||||
|
||||
static inline void walt_rq_dump(int cpu)
|
||||
void walt_rq_dump(int cpu)
|
||||
{
|
||||
struct rq *rq = cpu_rq(cpu);
|
||||
struct task_struct *tsk = cpu_curr(cpu);
|
||||
|
|
@ -260,7 +260,7 @@ static inline void walt_rq_dump(int cpu)
|
|||
SCHED_PRINT(sched_capacity_margin_down[cpu]);
|
||||
}
|
||||
|
||||
static inline void walt_dump(void)
|
||||
void walt_dump(void)
|
||||
{
|
||||
int cpu;
|
||||
|
||||
|
|
@ -275,15 +275,7 @@ static inline void walt_dump(void)
|
|||
printk_deferred("============ WALT RQ DUMP END ==============\n");
|
||||
}
|
||||
|
||||
static int in_sched_bug;
|
||||
#define SCHED_BUG_ON(condition) \
|
||||
({ \
|
||||
if (unlikely(!!(condition)) && !in_sched_bug) { \
|
||||
in_sched_bug = 1; \
|
||||
walt_dump(); \
|
||||
BUG_ON(condition); \
|
||||
} \
|
||||
})
|
||||
int in_sched_bug;
|
||||
|
||||
static inline void
|
||||
fixup_cumulative_runnable_avg(struct rq *rq,
|
||||
|
|
|
|||
|
|
@ -901,4 +901,19 @@ struct compute_energy_output {
|
|||
u16 cost[MAX_CLUSTERS];
|
||||
unsigned int cluster_first_cpu[MAX_CLUSTERS];
|
||||
};
|
||||
|
||||
extern void walt_task_dump(struct task_struct *p);
|
||||
extern void walt_rq_dump(int cpu);
|
||||
extern void walt_dump(void);
|
||||
extern int in_sched_bug;
|
||||
|
||||
#define SCHED_BUG_ON(condition) \
|
||||
({ \
|
||||
if (unlikely(!!(condition)) && !in_sched_bug) { \
|
||||
in_sched_bug = 1; \
|
||||
walt_dump(); \
|
||||
BUG_ON(condition); \
|
||||
} \
|
||||
})
|
||||
|
||||
#endif /* _WALT_H */
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user