X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=tests%2Fregression%2Fust%2Ffork%2Fust_tests_fork.h;fp=tests%2Fregression%2Fust%2Ffork%2Fust_tests_fork.h;h=b034f9fab9584090d61b59122afa19190ca73ed7;hp=0000000000000000000000000000000000000000;hb=37bd6c8e4c4a3d7054d97627e4fb4bef1d4612a6;hpb=ee28adfb4b4f5a6b24f4d23024ed256af37060c6 diff --git a/tests/regression/ust/fork/ust_tests_fork.h b/tests/regression/ust/fork/ust_tests_fork.h new file mode 100644 index 000000000..b034f9fab --- /dev/null +++ b/tests/regression/ust/fork/ust_tests_fork.h @@ -0,0 +1,66 @@ +#undef TRACEPOINT_PROVIDER +#define TRACEPOINT_PROVIDER ust_tests_fork + +#if !defined(_TRACEPOINT_UST_TESTS_FORK_H) || defined(TRACEPOINT_HEADER_MULTI_READ) +#define _TRACEPOINT_UST_TESTS_FORK_H + +/* + * Copyright (C) 2011 Mathieu Desnoyers + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +#include +#include + +TRACEPOINT_EVENT(ust_tests_fork, before_fork, + TP_ARGS(pid_t, pid), + TP_FIELDS( + ctf_integer(pid_t, pid, pid) + ) +) + +TRACEPOINT_EVENT(ust_tests_fork, after_fork_child, + TP_ARGS(pid_t, pid), + TP_FIELDS( + ctf_integer(pid_t, pid, pid) + ) +) + +TRACEPOINT_EVENT(ust_tests_fork, after_fork_parent, + TP_ARGS(pid_t, pid), + TP_FIELDS( + ctf_integer(pid_t, pid, pid) + ) +) + +TRACEPOINT_EVENT(ust_tests_fork, after_exec, + TP_ARGS(pid_t, pid), + TP_FIELDS( + ctf_integer(pid_t, pid, pid) + ) +) + +#endif /* _TRACEPOINT_UST_TESTS_FORK_H */ + +#undef TRACEPOINT_INCLUDE +#define TRACEPOINT_INCLUDE "./ust_tests_fork.h" + +/* This part must be outside ifdef protection */ +#include