Re: [PATCH] cpuidle: Add cpu_idle_miss trace event

From: Steven Rostedt
Date: Tue Jul 26 2022 - 10:08:23 EST


On Tue, 26 Jul 2022 11:24:04 +0100
Kajetan Puchalski <kajetan.puchalski@xxxxxxx> wrote:

> --- a/include/trace/events/power.h
> +++ b/include/trace/events/power.h
> @@ -40,6 +40,28 @@ DEFINE_EVENT(cpu, cpu_idle,
> TP_ARGS(state, cpu_id)
> );
>
> +TRACE_EVENT(cpu_idle_miss,
> +
> + TP_PROTO(unsigned int cpu_id, unsigned int state, bool below),
> +
> + TP_ARGS(cpu_id, state, below),
> +
> + TP_STRUCT__entry(
> + __field(u32, cpu_id)
> + __field(u32, state)
> + __field(bool, below)
> + ),
> +
> + TP_fast_assign(
> + __entry->cpu_id = cpu_id;
> + __entry->state = state;
> + __entry->below = below;
> + ),
> +
> + TP_printk("cpu_id=%lu state=%lu type=%s", (unsigned long)__entry->cpu_id,
> + (unsigned long)__entry->state, (__entry->below)?"below":"above")
> +);
> +
> TRACE_EVENT(powernv_throttle,
>
> TP_PROTO(int chip_id, const char *reason, int pmax),

For the tracing POV,

Reviewed-by: Steven Rostedt (Google) <rostedt@xxxxxxxxxxx>

-- Steve