All of lore.kernel.org
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@kernel.org>
To: linux-kernel@vger.kernel.org
Cc: Masami Hiramatsu <mhiramat@kernel.org>,
	Mark Rutland <mark.rutland@arm.com>,
	Mathieu Desnoyers <mathieu.desnoyers@efficios.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	Viresh Kumar <viresh.kumar@linaro.org>,
	Madhavan Srinivasan <maddy@linux.ibm.com>,
	Michael Ellerman <mpe@ellerman.id.au>,
	"Rafael J. Wysocki" <rafael@kernel.org>
Subject: [for-next][PATCH 5/9] PM: tracing: Hide device_pm_callback events under PM_SLEEP
Date: Fri, 25 Jul 2025 08:41:50 -0400	[thread overview]
Message-ID: <20250725124211.106711710@kernel.org> (raw)
In-Reply-To: 20250725124145.391996103@kernel.org

From: Steven Rostedt <rostedt@goodmis.org>

The events device_pm_callback_start and device_pm_callback_end events are
only called when CONFIG_PM_SLEEP is defined. As each event can take up to
5K regardless if they are used or not, it's best not to define them when
they are not used. Add #ifdef around these events when they are not used.

Cc: Masami Hiramatsu <mhiramat@kernel.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Viresh Kumar <viresh.kumar@linaro.org>
Cc: Madhavan Srinivasan <maddy@linux.ibm.com>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/20250612145408.246703478@goodmis.org
Acked-by: Rafael J. Wysocki <rafael@kernel.org>
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
---
 include/trace/events/power.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/include/trace/events/power.h b/include/trace/events/power.h
index a10ad300d660..5b1df5e1e092 100644
--- a/include/trace/events/power.h
+++ b/include/trace/events/power.h
@@ -212,6 +212,7 @@ TRACE_EVENT(cpu_frequency_limits,
 		  (unsigned long)__entry->cpu_id)
 );
 
+#ifdef CONFIG_PM_SLEEP
 TRACE_EVENT(device_pm_callback_start,
 
 	TP_PROTO(struct device *dev, const char *pm_ops, int event),
@@ -260,6 +261,7 @@ TRACE_EVENT(device_pm_callback_end,
 	TP_printk("%s %s, err=%d",
 		__get_str(driver), __get_str(device), __entry->error)
 );
+#endif
 
 TRACE_EVENT(suspend_resume,
 
-- 
2.47.2



  parent reply	other threads:[~2025-07-25 12:42 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-25 12:41 [for-next][PATCH 0/9] tracing: Fixes for unused tracepoints for 6.17 Steven Rostedt
2025-07-25 12:41 ` [for-next][PATCH 1/9] tracing, AER: Hide PCIe AER event when PCIEAER is not configured Steven Rostedt
2025-07-25 12:41 ` [for-next][PATCH 2/9] alarmtimer: Hide alarmtimer_suspend event when RTC_CLASS " Steven Rostedt
2025-07-25 12:41 ` [for-next][PATCH 3/9] PM: cpufreq: powernv/tracing: Move powernv_throttle trace event Steven Rostedt
2025-07-25 12:41 ` [for-next][PATCH 4/9] PM: tracing: Hide psci_domain_idle events under ARM_PSCI_CPUIDLE Steven Rostedt
2025-07-25 12:41 ` Steven Rostedt [this message]
2025-07-25 12:41 ` [for-next][PATCH 6/9] PM: tracing: Hide power_domain_target event under ARCH_OMAP2PLUS Steven Rostedt
2025-07-25 12:41 ` [for-next][PATCH 7/9] binder: Remove unused binder lock events Steven Rostedt
2025-07-25 12:41 ` [for-next][PATCH 8/9] tracing: arm: arm64: Hide trace events ipi_raise, ipi_entry and ipi_exit Steven Rostedt
2025-07-25 12:41 ` [for-next][PATCH 9/9] tracing: Call trace_ftrace_test_filter() for the event Steven Rostedt

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=20250725124211.106711710@kernel.org \
    --to=rostedt@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maddy@linux.ibm.com \
    --cc=mark.rutland@arm.com \
    --cc=mathieu.desnoyers@efficios.com \
    --cc=mhiramat@kernel.org \
    --cc=mpe@ellerman.id.au \
    --cc=rafael@kernel.org \
    --cc=viresh.kumar@linaro.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.