2 * Copyright (C) 2009 Pierre-Marc Fournier
3 * Copyright (C) 2011 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
5 * SPDX-License-Identifier: LGPL-2.1-only
18 #include <sys/types.h>
21 #define TRACEPOINT_DEFINE
24 static void inthandler(int sig
__attribute__((unused
)))
28 static int init_int_handler(void)
33 memset(&act
, 0, sizeof(act
));
34 result
= sigemptyset(&act
.sa_mask
);
36 perror("sigemptyset");
40 act
.sa_handler
= inthandler
;
41 act
.sa_flags
= SA_RESTART
;
43 /* Only defer ourselves. Also, try to restart interrupted
44 * syscalls to disturb the traced program as little as possible.
46 result
= sigaction(SIGUSR1
, &act
, NULL
);
55 int main(int argc
, char **argv
)
58 long values
[] = { 1, 2, 3 };
59 char text
[10] = "test";
67 delay
= atoi(argv
[1]);
71 for (i
= 0; i
< 1000000; i
++) {
73 tracepoint(tp
, tptest
, i
, netint
, values
, text
, strlen(text
), dbl
, flt
);
This page took 0.030035 seconds and 4 git commands to generate.