[PATCH v3 6/6] sched: export the newly added tracepoints

From: Qais Yousef
Date: Tue Jun 04 2019 - 07:19:22 EST

So that external modules can hook into them and extract the info they
need. Since these new tracepoints have no events associated with them
exporting these tracepoints make them useful for external modules to
perform testing and debugging. There's no other way otherwise to access

BPF doesn't have infrastructure to access these bare tracepoints either.

Signed-off-by: Qais Yousef <qais.yousef@xxxxxxx>
kernel/sched/core.c | 11 +++++++++++
1 file changed, 11 insertions(+)

diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index 874c427742a9..bc831d913088 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -23,6 +23,17 @@
#include <trace/events/sched.h>

+ * Export tracepoints that act as a bare tracehook (ie: have no trace event
+ * associated with them) to allow external modules to probe them.
+ */
DEFINE_PER_CPU_SHARED_ALIGNED(struct rq, runqueues);