Skip to content

Commit b5ca66f

Browse files
committed
tracing, thermal: Hide devfreq trace events when not in use
As trace events when defined create data structures and functions to process them, defining trace events when not using them is a waste of memory. The trace events thermal_power_devfreq_get_power and thermal_power_devfreq_limit are only used when CONFIG_DEVFREQ_THERMAL is set. Make those events only defined when that is set as well. Link: http://lkml.kernel.org/r/[email protected] Acked-by: Javi Merino <[email protected]> Signed-off-by: Steven Rostedt (VMware) <[email protected]>
1 parent b3a8880 commit b5ca66f

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

include/trace/events/thermal.h

+2
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,7 @@ TRACE_EVENT(thermal_power_cpu_limit,
148148
__entry->power)
149149
);
150150

151+
#ifdef CONFIG_DEVFREQ_THERMAL
151152
TRACE_EVENT(thermal_power_devfreq_get_power,
152153
TP_PROTO(struct thermal_cooling_device *cdev,
153154
struct devfreq_dev_status *status, unsigned long freq,
@@ -203,6 +204,7 @@ TRACE_EVENT(thermal_power_devfreq_limit,
203204
__get_str(type), __entry->freq, __entry->cdev_state,
204205
__entry->power)
205206
);
207+
#endif /* CONFIG_DEVFREQ_THERMAL */
206208
#endif /* _TRACE_THERMAL_H */
207209

208210
/* This part must be outside protection */

0 commit comments

Comments
 (0)