/* * Must include the event header that the custom event will attach to, * from the C file, and not in the custom header file.
*/ #include <trace/events/sched.h>
/* Declare CREATE_CUSTOM_TRACE_EVENTS before including custom header */ #define CREATE_CUSTOM_TRACE_EVENTS
#include"trace_custom_sched.h"
/* * As the trace events are not exported to modules, the use of * for_each_kernel_tracepoint() is needed to find the trace event * to attach to. The fct() function below, is a callback that * will be called for every event. * * Helper functions are created by the TRACE_CUSTOM_EVENT() macro * update the event. Those are of the form: * * trace_custom_event_<event>_update() * * Where <event> is the event to attach.
*/ staticvoid fct(struct tracepoint *tp, void *priv)
{
trace_custom_event_sched_switch_update(tp);
trace_custom_event_sched_waking_update(tp);
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.