Re: [PATCH] sched/cpufreq: Align trace event behavior of fast switching

From: Peter Zijlstra
Date: Mon Aug 26 2019 - 07:24:14 EST

On Mon, Aug 26, 2019 at 11:51:17AM +0200, Dietmar Eggemann wrote:

> Not sure about the extra 'if trace_cpu_frequency_enabled()' but I guess
> it doesn't hurt.

Without that you do that for_each_cpu() iteration unconditionally, even
if the tracepoint is disabled.