X-Git-Url: http://git.lttng.org./?a=blobdiff_plain;f=probes%2Flttng-probe-syscalls.c;h=6bc65fcf1be6ecba15c022febfc5ac5a96c7d1f4;hb=054f2ed356b2616742a8e507f679d499c7e2bafa;hp=ee196e41b547a9155d315e1eb93e79a3493e1ad0;hpb=16830439da76b21133251d1fc15c970aba99730d;p=lttng-modules.git diff --git a/probes/lttng-probe-syscalls.c b/probes/lttng-probe-syscalls.c index ee196e41..6bc65fcf 100644 --- a/probes/lttng-probe-syscalls.c +++ b/probes/lttng-probe-syscalls.c @@ -10,6 +10,8 @@ #include +#ifndef SYSCALL_DETAIL + /* * Create the tracepoint static inlines from the kernel to validate that our * trace event macros match the kernel we run on. @@ -21,12 +23,45 @@ */ #define LTTNG_PACKAGE_BUILD #define CREATE_TRACE_POINTS -//test #define TRACE_INCLUDE_PATH ../instrumentation/syscalls/headers #define TRACE_INCLUDE_PATH ../instrumentation/events/lttng-module -//test #include "../instrumentation/syscalls/headers/syscalls.h" #include "../instrumentation/events/lttng-module/syscalls.h" +#else /* SYSCALL_DETAIL */ + +/* + * Create LTTng tracepoint probes. + */ +#define LTTNG_PACKAGE_BUILD +#define CREATE_TRACE_POINTS + +#define TRACE_INCLUDE_PATH ../instrumentation/syscalls/headers + +#define TRACE_SYSCALL_TABLE(_name, _nr, _nrargs) + +#include "../instrumentation/syscalls/headers/syscalls.h" + +#undef LTTNG_PACKAGE_BUILD +#undef CREATE_TRACE_POINTS + +struct trace_syscall_entry { + void *func; + unsigned int nrargs; +}; + +#define CREATE_SYSCALL_TABLE + +#undef TRACE_SYSCALL_TABLE +#define TRACE_SYSCALL_TABLE(_name, _nr, _nrargs) \ + [ _nr ] = { .func = __event_probe__##_name, .nrargs = (_nrargs) }, + +static struct trace_syscall_entry sc_table[] = { +#include "../instrumentation/syscalls/headers/syscalls.h" +}; +#undef CREATE_SYSCALL_TABLE + +#endif /* SYSCALL_DETAIL */ + MODULE_LICENSE("GPL and additional rights"); MODULE_AUTHOR("Mathieu Desnoyers "); MODULE_DESCRIPTION("LTTng sched probes");