Skip to content

Commit e688490

Browse files
committed
PM: tracing: Hide device_pm_callback events under PM_SLEEP
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 <[email protected]> Cc: Mark Rutland <[email protected]> Cc: Mathieu Desnoyers <[email protected]> Cc: Andrew Morton <[email protected]> Cc: Viresh Kumar <[email protected]> Cc: Madhavan Srinivasan <[email protected]> Cc: Michael Ellerman <[email protected]> Link: https://lore.kernel.org/[email protected] Acked-by: Rafael J. Wysocki <[email protected]> Signed-off-by: Steven Rostedt (Google) <[email protected]>
1 parent e64397f commit e688490

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

include/trace/events/power.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,7 @@ TRACE_EVENT(cpu_frequency_limits,
212212
(unsigned long)__entry->cpu_id)
213213
);
214214

215+
#ifdef CONFIG_PM_SLEEP
215216
TRACE_EVENT(device_pm_callback_start,
216217

217218
TP_PROTO(struct device *dev, const char *pm_ops, int event),
@@ -260,6 +261,7 @@ TRACE_EVENT(device_pm_callback_end,
260261
TP_printk("%s %s, err=%d",
261262
__get_str(driver), __get_str(device), __entry->error)
262263
);
264+
#endif
263265

264266
TRACE_EVENT(suspend_resume,
265267

0 commit comments

Comments
 (0)