b59c9241f3bdc3e9b6dacda2eb364223ef97d169
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
24 void inthandler(int sig
)
28 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
,
74 strlen(text
), dbl
, flt
);
This page took 0.03405 seconds and 4 git commands to generate.