Skip to content

Commit a96a503

Browse files
committed
tracing, thermal: Hide cpu cooling 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_cpu_get_power and thermal_power_cpu_limit are only used when CONFIG_CPU_THERMAL is set. Make those events only defined when that is set as well. Link: http://lkml.kernel.org/r/[email protected] Cc: Eduardo Valentin <[email protected]> Acked-by: Javi Merino <[email protected]> Signed-off-by: Steven Rostedt (VMware) <[email protected]>
1 parent b5ca66f commit a96a503

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
@@ -90,6 +90,7 @@ TRACE_EVENT(thermal_zone_trip,
9090
show_tzt_type(__entry->trip_type))
9191
);
9292

93+
#ifdef CONFIG_CPU_THERMAL
9394
TRACE_EVENT(thermal_power_cpu_get_power,
9495
TP_PROTO(const struct cpumask *cpus, unsigned long freq, u32 *load,
9596
size_t load_len, u32 dynamic_power, u32 static_power),
@@ -147,6 +148,7 @@ TRACE_EVENT(thermal_power_cpu_limit,
147148
__get_bitmask(cpumask), __entry->freq, __entry->cdev_state,
148149
__entry->power)
149150
);
151+
#endif /* CONFIG_CPU_THERMAL */
150152

151153
#ifdef CONFIG_DEVFREQ_THERMAL
152154
TRACE_EVENT(thermal_power_devfreq_get_power,

0 commit comments

Comments
 (0)