mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Wysocki, Rafael J" <rafael.j.wysocki@intel.com>
To: Steven Rostedt <rostedt@goodmis.org>,
	Linux Trace Kernel <linux-trace-kernel@vger.kernel.org>
Cc: "Mario Limonciello (AMD)" <superm1@kernel.org>,
	Eiichi Tsukata <eiichi.tsukata@nutanix.com>,
	Julia Lawall <Julia.Lawall@inria.fr>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] cpuidle: haltpoll: Only define guest_halt_poll_ns tracepoint when used
Date: Thu, 22 Oct 2026 21:54:09 +0200	[thread overview]
Message-ID: <ae46d1e7-6e49-405c-b4ba-9f659f5fdab3@intel.com> (raw)
In-Reply-To: <20261022153359.2433474b@gandalf.local.home>


On 10/22/2026 9:33 PM, Steven Rostedt wrote:
> From: Steven Rostedt <rostedt@goodmis.org>
>
> 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@goodmis.org>

Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>

Thanks!


> ---
>   include/trace/events/power.h | 3 +++
>   1 file changed, 3 insertions(+)
>
> diff --git a/include/trace/events/power.h b/include/trace/events/power.h
> index 370f8df2fdb4..4d17eb307b6a 100644
> --- a/include/trace/events/power.h
> +++ b/include/trace/events/power.h
> @@ -497,6 +497,7 @@ DEFINE_EVENT(dev_pm_qos_request, dev_pm_qos_remove_request,
>   	TP_ARGS(name, type, new_value)
>   );
>   
> +#ifdef CONFIG_CPU_IDLE_GOV_HALTPOLL
>   TRACE_EVENT(guest_halt_poll_ns,
>   
>   	TP_PROTO(bool grow, unsigned int new, unsigned int old),
> @@ -525,6 +526,8 @@ TRACE_EVENT(guest_halt_poll_ns,
>   	trace_guest_halt_poll_ns(true, new, old)
>   #define trace_guest_halt_poll_ns_shrink(new, old) \
>   	trace_guest_halt_poll_ns(false, new, old)
> +#endif /* CONFIG_CPU_IDLE_GOV_HALTPOLL */
> +
>   #endif /* _TRACE_POWER_H */
>   
>   /* This part must be outside protection */

  reply	other threads:[~2026-10-22 19:54 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-22 19:33 Steven Rostedt
2026-10-22 19:54 ` Wysocki, Rafael J [this message]
2026-10-22 20:00   ` Steven Rostedt
2026-10-22 20:02     ` Wysocki, Rafael J

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ae46d1e7-6e49-405c-b4ba-9f659f5fdab3@intel.com \
    --to=rafael.j.wysocki@intel.com \
    --cc=Julia.Lawall@inria.fr \
    --cc=eiichi.tsukata@nutanix.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-trace-kernel@vger.kernel.org \
    --cc=rostedt@goodmis.org \
    --cc=superm1@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®