ANDROID: sched: Gate sched_stat tracepoint exports on CONFIG_SCHEDSTATS

When CONFIG_SCHEDSTATS is not set, the build breaks because
DEFINE_EVENT_SCHEDSTAT evaluates to DEFINE_EVENT_NOP, which only defines
trace_<name>, not __tracepoint_<name>, __traceiter_<name>, and
_SCK__tp_func_<name> like DEFINE_EVENT.

Gate these exports on CONFIG_SCHEDSTATS so all of the exported symbols
are defined.

Change-Id: I38056ee1446e6c149686ce1905c2ba6e4ea5e59e
Fixes: a6bb1af39d ("ANDROID: vendor_hooks: Export the tracepoints sched_stat_iowait, sched_stat_blocked, sched_stat_wait to let modules probe them")
Link: https://github.com/ClangBuiltLinux/continuous-integration2/runs/2724257445?check_suite_focus=true
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
This commit is contained in:
Nathan Chancellor 2021-06-02 13:55:29 -07:00
commit 196f1975a8
No known key found for this signature in database
GPG key ID: 1D6B269171C01A96

View file

@ -45,9 +45,11 @@ EXPORT_TRACEPOINT_SYMBOL_GPL(sched_util_est_cfs_tp);
EXPORT_TRACEPOINT_SYMBOL_GPL(sched_util_est_se_tp);
EXPORT_TRACEPOINT_SYMBOL_GPL(sched_update_nr_running_tp);
EXPORT_TRACEPOINT_SYMBOL_GPL(sched_switch);
#ifdef CONFIG_SCHEDSTATS
EXPORT_TRACEPOINT_SYMBOL_GPL(sched_stat_wait);
EXPORT_TRACEPOINT_SYMBOL_GPL(sched_stat_iowait);
EXPORT_TRACEPOINT_SYMBOL_GPL(sched_stat_blocked);
#endif
DEFINE_PER_CPU_SHARED_ALIGNED(struct rq, runqueues);
EXPORT_SYMBOL_GPL(runqueues);