2 * probes/lttng-probe-sched.c
4 * Copyright 2010 (c) - Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
8 * Dual LGPL v2.1/GPL v2 license.
11 #include <linux/module.h>
13 #ifndef SYSCALL_DETAIL
16 * Create the tracepoint static inlines from the kernel to validate that our
17 * trace event macros match the kernel we run on.
19 #include <trace/events/syscalls.h>
22 * Create LTTng tracepoint probes.
24 #define LTTNG_PACKAGE_BUILD
25 #define CREATE_TRACE_POINTS
26 #define TRACE_INCLUDE_PATH ../instrumentation/events/lttng-module
28 #include "../instrumentation/events/lttng-module/syscalls.h"
30 #else /* SYSCALL_DETAIL */
33 * Create LTTng tracepoint probes.
35 #define LTTNG_PACKAGE_BUILD
36 #define CREATE_TRACE_POINTS
38 #define TRACE_INCLUDE_PATH ../instrumentation/syscalls/headers
40 #define TRACE_SYSCALL_TABLE(_name, _nr, _nrargs)
42 #include "../instrumentation/syscalls/headers/syscalls.h"
44 #undef LTTNG_PACKAGE_BUILD
45 #undef CREATE_TRACE_POINTS
47 struct trace_syscall_entry
{
52 #define CREATE_SYSCALL_TABLE
54 #undef TRACE_SYSCALL_TABLE
55 #define TRACE_SYSCALL_TABLE(_name, _nr, _nrargs) \
56 [ _nr ] = { .func = __event_probe__##_name, .nrargs = (_nrargs) },
58 static struct trace_syscall_entry sc_table
[] = {
59 #include "../instrumentation/syscalls/headers/syscalls.h"
61 #undef CREATE_SYSCALL_TABLE
63 #endif /* SYSCALL_DETAIL */
65 MODULE_LICENSE("GPL and additional rights");
66 MODULE_AUTHOR("Mathieu Desnoyers <mathieu.desnoyers@efficios.com>");
67 MODULE_DESCRIPTION("LTTng sched probes");