Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8460b806 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "sched: Update tracepoint to include task info"

parents 6ee75e91 01cfae20
Loading
Loading
Loading
Loading
+10 −6
Original line number Diff line number Diff line
@@ -162,9 +162,9 @@ TRACE_EVENT(sched_update_history,

TRACE_EVENT(sched_get_task_cpu_cycles,

	TP_PROTO(int cpu, int event, u64 cycles, u64 exec_time),
	TP_PROTO(int cpu, int event, u64 cycles, u64 exec_time, struct task_struct *p),

	TP_ARGS(cpu, event, cycles, exec_time),
	TP_ARGS(cpu, event, cycles, exec_time, p),

	TP_STRUCT__entry(
		__field(int,		cpu		)
@@ -173,6 +173,8 @@ TRACE_EVENT(sched_get_task_cpu_cycles,
		__field(u64,		exec_time	)
		__field(u32,		freq		)
		__field(u32,		legacy_freq	)
		__field(pid_t,		pid		)
		__array(char,	comm, TASK_COMM_LEN	)
	),

	TP_fast_assign(
@@ -180,13 +182,15 @@ TRACE_EVENT(sched_get_task_cpu_cycles,
		__entry->event		= event;
		__entry->cycles		= cycles;
		__entry->exec_time	= exec_time;
		__entry->freq		= 0;//cpu_cycles_to_freq(cycles, exec_time);
		__entry->freq		= cpu_cycles_to_freq(cycles, exec_time);
		__entry->legacy_freq	= cpu_cur_freq(cpu);
		__entry->pid		= p->pid;
		memcpy(__entry->comm, p->comm, TASK_COMM_LEN);
	),

	TP_printk("cpu=%d event=%d cycles=%llu exec_time=%llu freq=%u legacy_freq=%u",
	TP_printk("cpu=%d event=%d cycles=%llu exec_time=%llu freq=%u legacy_freq=%u task=%d (%s)",
		  __entry->cpu, __entry->event, __entry->cycles,
		  __entry->exec_time, __entry->freq, __entry->legacy_freq)
		  __entry->exec_time, __entry->freq, __entry->legacy_freq, __entry->pid, __entry->comm)
);

TRACE_EVENT(sched_update_task_ravg,
@@ -238,7 +242,7 @@ TRACE_EVENT(sched_update_task_ravg,
		__entry->evt            = evt;
		__entry->cpu            = rq->cpu;
		__entry->cur_pid        = rq->curr->pid;
		__entry->cur_freq       = 0;//cpu_cycles_to_freq(cycles, exec_time);
		__entry->cur_freq       = cpu_cycles_to_freq(cycles, exec_time);
		memcpy(__entry->comm, p->comm, TASK_COMM_LEN);
		__entry->pid            = p->pid;
		__entry->mark_start     = p->ravg.mark_start;
+1 −1
Original line number Diff line number Diff line
@@ -44,7 +44,7 @@ static void boost_kick_cpus(void)
	if (boost_policy != SCHED_BOOST_ON_BIG)
		return;

	cpumask_copy(&kick_mask, cpu_online_mask);
	cpumask_andnot(&kick_mask, cpu_online_mask, cpu_isolated_mask);

	for_each_cpu(i, &kick_mask) {
		if (cpu_capacity(i) != max_capacity)
+3 −3
Original line number Diff line number Diff line
@@ -1873,7 +1873,7 @@ update_task_rq_cpu_cycles(struct task_struct *p, struct rq *rq, int event,

	p->cpu_cycles = cur_cycles;

	trace_sched_get_task_cpu_cycles(cpu, event, rq->cc.cycles, rq->cc.time);
	trace_sched_get_task_cpu_cycles(cpu, event, rq->cc.cycles, rq->cc.time, p);
}

static inline void run_walt_irq_work(u64 old_window_start, struct rq *rq)
@@ -2805,7 +2805,7 @@ static unsigned long thermal_cap_cpu[NR_CPUS];

unsigned long thermal_cap(int cpu)
{
	return thermal_cap_cpu[cpu] ?: cpu_rq(cpu)->cpu_capacity_orig;
	return thermal_cap_cpu[cpu] ?: SCHED_CAPACITY_SCALE;
}

unsigned long do_thermal_cap(int cpu, unsigned long thermal_max_freq)
@@ -3033,7 +3033,7 @@ int walt_proc_update_handler(struct ctl_table *table, int write,
			     void __user *buffer, size_t *lenp,
			     loff_t *ppos)
{
	int ret, cpu;
	int ret;
	unsigned int *data = (unsigned int *)table->data;
	static DEFINE_MUTEX(mutex);

+1 −1
Original line number Diff line number Diff line
@@ -219,7 +219,7 @@ static inline unsigned int max_task_load(void)
	return sched_ravg_window;
}

static inline u32 cpu_cycles_to_freq(u64 cycles, u32 period)
static inline u32 cpu_cycles_to_freq(u64 cycles, u64 period)
{
	return div64_u64(cycles, period);
}
+2 −2

File changed.

Contains only whitespace changes.