Re: [PATCH] cpuidle: haltpoll: Only define guest_halt_poll_ns tracepoint when used

From: Wysocki, Rafael J

Date: Thu Oct 22 2026 - 16:02:29 EST



On 10/22/2026 10:00 PM, Steven Rostedt wrote:
On Thu, 22 Oct 2026 21:54:09 +0200
"Wysocki, Rafael J" <rafael.j.wysocki@xxxxxxxxx> wrote:

On 10/22/2026 9:33 PM, Steven Rostedt wrote:
From: Steven Rostedt <rostedt@xxxxxxxxxxx>

Tracepoints that are defined take up around 5K each, even if they are not
used. When a tracepoint is used only in code when a specific config is
enabled, their definition must also be only defined when the same config
is enabled otherwise it wastes memory.

The tracepoint guest_halt_poll_ns is only used when CONFIG_CPU_IDLE_GOV_HALTPOLL
is enabled. Guard the definition of that tracepoint with the same config.

Fixes: 0da11bf0cab90 ("cpuidle: haltpoll: Add trace points for guest_halt_poll_ns grow/shrink")
Signed-off-by: Steven Rostedt <rostedt@xxxxxxxxxxx>
Acked-by: Rafael J. Wysocki <rafael.j.wysocki@xxxxxxxxx>

Thanks!
Want me to take this through my tree, or do you want to take it?

Please feel free to take it.

Rafael