+#ifndef TRACEPOINT_EVENT
+/*
+ * For use with the TRACEPOINT_EVENT macro:
+ *
+ * We define a tracepoint, its arguments, its printf format
+ * and its 'fast binary record' layout.
+ *
+ * Firstly, name your tracepoint via TRACEPOINT_EVENT(name : the
+ * 'subsystem_event' notation is fine.
+ *
+ * Think about this whole construct as the
+ * 'trace_sched_switch() function' from now on.
+ *
+ *
+ * TRACEPOINT_EVENT(sched_switch,
+ *
+ * *
+ * * A function has a regular function arguments
+ * * prototype, declare it via TP_PROTO():
+ * *
+ *
+ * TP_PROTO(struct rq *rq, struct task_struct *prev,
+ * struct task_struct *next),
+ *
+ * *
+ * * Define the call signature of the 'function'.
+ * * (Design sidenote: we use this instead of a
+ * * TP_PROTO1/TP_PROTO2/TP_PROTO3 ugliness.)
+ * *
+ *
+ * TP_ARGS(rq, prev, next),
+ *
+ * *
+ * * Fast binary tracing: define the trace record via
+ * * TP_FIELDS(). You can think about it like a
+ * * regular C structure local variable definition.
+ * *
+ * * This is how the trace record is structured and will
+ * * be saved into the ring buffer. These are the fields
+ * * that will be exposed to readers.
+ * *
+ * * tp_field(pid_t, prev_pid, prev->pid) is equivalent
+ * * to a standard declaraton:
+ * *
+ * * pid_t prev_pid;
+ * *
+ * * followed by an assignment:
+ * *
+ * * prev_pid = prev->pid;
+ * *
+ * * tp_array(char, prev_comm, TASK_COMM_LEN, prev->comm) is
+ * * equivalent to:
+ * *
+ * * char prev_comm[TASK_COMM_LEN];
+ * *
+ * * followed by an assignment:
+ * *
+ * * memcpy(prev_comm, prev->comm, TASK_COMM_LEN);
+ * *
+ *
+ * TP_FIELDS(
+ * tp_array(char, prev_comm, TASK_COMM_LEN, prev->comm)
+ * tp_field(pid_t, prev_pid, prev->pid)
+ * tp_field(int, prev_prio, prev->prio)
+ * tp_array(char, next_comm, TASK_COMM_LEN, next->comm)
+ * tp_field(pid_t, next_pid, next->pid)
+ * tp_field(int, next_prio, next->prio)
+ * )
+ * );
+ */