| 1 | /* |
| 2 | * Copyright (C) 2009 Pierre-Marc Fournier |
| 3 | * Copyright (C) 2011 Mathieu Desnoyers <mathieu.desnoyers@efficios.com> |
| 4 | * Copyright (C) 2012 David Goulet <dgoulet@efficios.com> |
| 5 | * |
| 6 | * SPDX-License-Identifier: LGPL-2.1-only |
| 7 | * |
| 8 | */ |
| 9 | |
| 10 | #define _LGPL_SOURCE |
| 11 | #include <arpa/inet.h> |
| 12 | #include <fcntl.h> |
| 13 | #include <signal.h> |
| 14 | #include <stdarg.h> |
| 15 | #include <stdio.h> |
| 16 | #include <stdlib.h> |
| 17 | #include <string.h> |
| 18 | #include <sys/mman.h> |
| 19 | #include <sys/stat.h> |
| 20 | #include <sys/types.h> |
| 21 | #include <unistd.h> |
| 22 | |
| 23 | #define TRACEPOINT_DEFINE |
| 24 | #include "ust_gen_nevents.h" |
| 25 | |
| 26 | int main(int argc, char **argv) |
| 27 | { |
| 28 | int i, nr_iter = 100; |
| 29 | long value = 42; |
| 30 | |
| 31 | if (argc == 2) { |
| 32 | nr_iter = atoi(argv[1]); |
| 33 | } |
| 34 | |
| 35 | for (i = 0; i < nr_iter; i++) { |
| 36 | tracepoint(ust_gen_nevents, tptest0, i, value); |
| 37 | tracepoint(ust_gen_nevents, tptest1, i, value); |
| 38 | tracepoint(ust_gen_nevents, tptest2, i, value); |
| 39 | tracepoint(ust_gen_nevents, tptest3, i, value); |
| 40 | } |
| 41 | |
| 42 | return 0; |
| 43 | } |