Skip to content

Commit 06cc77a

Browse files
committed
alarmtimer: Hide alarmtimer_suspend event when RTC_CLASS is not configured
The trace event alarmtimer_suspend is only called when RTC_CLASS is 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. Cc: Masami Hiramatsu <[email protected]> Cc: Mathieu Desnoyers <[email protected]> Cc: Peter Zijlstra <[email protected]> Link: https://lore.kernel.org/[email protected] Acked-by: Thomas Gleixner <[email protected]> Signed-off-by: Steven Rostedt (Google) <[email protected]>
1 parent a3b366d commit 06cc77a

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

include/trace/events/alarmtimer.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ TRACE_DEFINE_ENUM(ALARM_BOOTTIME_FREEZER);
2020
{ 1 << ALARM_REALTIME_FREEZER, "REALTIME Freezer" }, \
2121
{ 1 << ALARM_BOOTTIME_FREEZER, "BOOTTIME Freezer" })
2222

23+
#ifdef CONFIG_RTC_CLASS
2324
TRACE_EVENT(alarmtimer_suspend,
2425

2526
TP_PROTO(ktime_t expires, int flag),
@@ -41,6 +42,7 @@ TRACE_EVENT(alarmtimer_suspend,
4142
__entry->expires
4243
)
4344
);
45+
#endif /* CONFIG_RTC_CLASS */
4446

4547
DECLARE_EVENT_CLASS(alarm_class,
4648

0 commit comments

Comments
 (0)