From 5a48aeb06c504302abaec157664a6f3a6205b2cd Mon Sep 17 00:00:00 2001 From: Olav Haugan Date: Mon, 24 Nov 2014 16:54:59 -0800 Subject: sched: Add temperature to cpu_load trace point Add the current CPU temperature to the sched_cpu_load trace point. This will allow us to track the CPU temperature. CRs-Fixed: 764788 Change-Id: Ib2e3559bbbe3fe07a6b7c8115db606828bc36254 Signed-off-by: Olav Haugan --- include/trace/events/sched.h | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'include') diff --git a/include/trace/events/sched.h b/include/trace/events/sched.h index 7294f44da319..6f4a8f0d45e3 100644 --- a/include/trace/events/sched.h +++ b/include/trace/events/sched.h @@ -158,9 +158,9 @@ TRACE_EVENT(sched_task_load, TRACE_EVENT(sched_cpu_load, TP_PROTO(struct rq *rq, int idle, int mostly_idle, u64 irqload, - unsigned int power_cost), + unsigned int power_cost, int temp), - TP_ARGS(rq, idle, mostly_idle, irqload, power_cost), + TP_ARGS(rq, idle, mostly_idle, irqload, power_cost, temp), TP_STRUCT__entry( __field(unsigned int, cpu ) @@ -177,6 +177,7 @@ TRACE_EVENT(sched_cpu_load, __field(unsigned int, max_freq ) __field(unsigned int, power_cost ) __field( int, cstate ) + __field( int, temp ) ), TP_fast_assign( @@ -194,15 +195,16 @@ TRACE_EVENT(sched_cpu_load, __entry->max_freq = rq->max_freq; __entry->power_cost = power_cost; __entry->cstate = rq->cstate; + __entry->temp = temp; ), - TP_printk("cpu %u idle %d mostly_idle %d nr_run %u nr_big %u nr_small %u lsf %u capacity %u cr_avg %llu irqload %llu fcur %u fmax %u power_cost %u cstate %d", + TP_printk("cpu %u idle %d mostly_idle %d nr_run %u nr_big %u nr_small %u lsf %u capacity %u cr_avg %llu irqload %llu fcur %u fmax %u power_cost %u cstate %d temp %d", __entry->cpu, __entry->idle, __entry->mostly_idle, __entry->nr_running, __entry->nr_big_tasks, __entry->nr_small_tasks, __entry->load_scale_factor, __entry->capacity, __entry->cumulative_runnable_avg, __entry->irqload, __entry->cur_freq, __entry->max_freq, - __entry->power_cost, __entry->cstate) + __entry->power_cost, __entry->cstate, __entry->temp) ); TRACE_EVENT(sched_set_boost, -- cgit v1.2.3