* [PATCH] alarmtimer: Hide alarmtimer_suspend event when RTC_CLASS is not configured
@ 2025-06-12 13:58 Steven Rostedt
2025-06-13 16:44 ` Thomas Gleixner
0 siblings, 1 reply; 3+ messages in thread
From: Steven Rostedt @ 2025-06-12 13:58 UTC (permalink / raw)
To: LKML, Linux trace kernel
Cc: Masami Hiramatsu, Mathieu Desnoyers, Thomas Gleixner,
Peter Zijlstra
From: Steven Rostedt <rostedt@goodmis.org>
The trace event alarmtimer_suspend is only called when RTC_CLASS is not
defined. As every event created can create up to 5K of text and meta data
regardless if it is called or not it should not be created and waste
memory. Hide the event when CONFIG_RTC_CLASS is not defined.
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
---
Note, I will be adding code soon that will make unused events cause a warning.
include/trace/events/alarmtimer.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/include/trace/events/alarmtimer.h b/include/trace/events/alarmtimer.h
index 13483c7ca70b..8e9c76a7f21b 100644
--- a/include/trace/events/alarmtimer.h
+++ b/include/trace/events/alarmtimer.h
@@ -20,6 +20,7 @@ TRACE_DEFINE_ENUM(ALARM_BOOTTIME_FREEZER);
{ 1 << ALARM_REALTIME_FREEZER, "REALTIME Freezer" }, \
{ 1 << ALARM_BOOTTIME_FREEZER, "BOOTTIME Freezer" })
+#ifdef CONFIG_RTC_CLASS
TRACE_EVENT(alarmtimer_suspend,
TP_PROTO(ktime_t expires, int flag),
@@ -41,6 +42,7 @@ TRACE_EVENT(alarmtimer_suspend,
__entry->expires
)
);
+#endif /* CONFIG_RTC_CLASS */
DECLARE_EVENT_CLASS(alarm_class,
--
2.47.2
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] alarmtimer: Hide alarmtimer_suspend event when RTC_CLASS is not configured
2025-06-12 13:58 [PATCH] alarmtimer: Hide alarmtimer_suspend event when RTC_CLASS is not configured Steven Rostedt
@ 2025-06-13 16:44 ` Thomas Gleixner
2025-06-16 18:49 ` Steven Rostedt
0 siblings, 1 reply; 3+ messages in thread
From: Thomas Gleixner @ 2025-06-13 16:44 UTC (permalink / raw)
To: Steven Rostedt, LKML, Linux trace kernel
Cc: Masami Hiramatsu, Mathieu Desnoyers, Peter Zijlstra
On Thu, Jun 12 2025 at 09:58, Steven Rostedt wrote:
> From: Steven Rostedt <rostedt@goodmis.org>
>
> The trace event alarmtimer_suspend is only called when RTC_CLASS is not
> defined.
s/not//
No?
> As every event created can create up to 5K of text and meta data
> regardless if it is called or not it should not be created and waste
> memory. Hide the event when CONFIG_RTC_CLASS is not defined.
>
> Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
Other than that:
Acked-by: Thomas Gleixner <tglx@linutronix.de>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] alarmtimer: Hide alarmtimer_suspend event when RTC_CLASS is not configured
2025-06-13 16:44 ` Thomas Gleixner
@ 2025-06-16 18:49 ` Steven Rostedt
0 siblings, 0 replies; 3+ messages in thread
From: Steven Rostedt @ 2025-06-16 18:49 UTC (permalink / raw)
To: Thomas Gleixner
Cc: LKML, Linux trace kernel, Masami Hiramatsu, Mathieu Desnoyers,
Peter Zijlstra
On Fri, 13 Jun 2025 18:44:33 +0200
Thomas Gleixner <tglx@linutronix.de> wrote:
> On Thu, Jun 12 2025 at 09:58, Steven Rostedt wrote:
> > From: Steven Rostedt <rostedt@goodmis.org>
> >
> > The trace event alarmtimer_suspend is only called when RTC_CLASS is not
> > defined.
>
> s/not//
>
> No?
Ah yeah.
>
> > As every event created can create up to 5K of text and meta data
> > regardless if it is called or not it should not be created and waste
> > memory. Hide the event when CONFIG_RTC_CLASS is not defined.
> >
> > Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
>
> Other than that:
>
> Acked-by: Thomas Gleixner <tglx@linutronix.de>
Thanks!
-- Steve
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2025-06-16 18:49 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-06-12 13:58 [PATCH] alarmtimer: Hide alarmtimer_suspend event when RTC_CLASS is not configured Steven Rostedt
2025-06-13 16:44 ` Thomas Gleixner
2025-06-16 18:49 ` Steven Rostedt
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).