48210fab07008553775f08522d0d4b9d7f996162
2 * Copyright (C) - 2017 Francis Deslauriers <francis.deslauriers@efficios.com>
4 * This library is free software; you can redistribute it and/or modify it
5 * under the terms of the GNU Lesser General Public License as published by the
6 * Free Software Foundation; version 2.1 of the License.
8 * This library is distributed in the hope that it will be useful, but WITHOUT
9 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
10 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
13 * You should have received a copy of the GNU Lesser General Public License
14 * along with this library; if not, write to the Free Software Foundation,
15 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
24 #include <sys/syscall.h>
25 #include <sys/types.h>
31 * The process waits for the creation of a file passed as argument from an
32 * external processes to execute a syscall and exiting. This is useful for tests
33 * in combinaison with LTTng's PID tracker feature where we can trace the kernel
34 * events generated by our test process only.
39 long __attribute__ ((noinline
))
49 : "cc", "rcx", "r11", "memory"
57 : "cc", "edi", "esi", "memory"
60 #error "Userspace callstack test not supported for this architecture."
65 int __attribute__ ((noinline
))
71 int __attribute__ ((noinline
))
78 int __attribute__ ((noinline
))
85 int main(int argc
, char **argv
)
91 fprintf(stderr
, "Error: Missing argument\n");
92 fprintf(stderr
, "USAGE: %s PATH_WAIT_FILE\n", argv
[0]);
100 * Wait for the start_file to be created by an external process
101 * (typically the test script) before executing the syscall
103 ret
= wait_on_file(start_file
);
108 /* Start the callchain to the syscall */
This page took 0.038523 seconds and 4 git commands to generate.