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
13 #include <sys/types.h>
18 #include <arpa/inet.h>
21 #define TRACEPOINT_DEFINE
25 void inthandler(int sig
)
30 int init_int_handler(void)
35 memset(&act
, 0, sizeof(act
));
36 result
= sigemptyset(&act
.sa_mask
);
38 perror("sigemptyset");
42 act
.sa_handler
= inthandler
;
43 act
.sa_flags
= SA_RESTART
;
45 /* Only defer ourselves. Also, try to restart interrupted
46 * syscalls to disturb the traced program as little as possible.
48 result
= sigaction(SIGUSR1
, &act
, NULL
);
57 int main(int argc
, char **argv
)
60 long values
[] = { 1, 2, 3 };
61 char text
[10] = "test";
69 delay
= atoi(argv
[1]);
73 for (i
= 0; i
< 1000000; i
++) {
75 tracepoint(tp
, tptest
, i
, netint
, values
, text
,
76 strlen(text
), dbl
, flt
);
This page took 0.031217 seconds and 4 git commands to generate.