| 1 | /* |
| 2 | * Copyright (C) 2014 Geneviève Bastien <gbastien@versatic.net> |
| 3 | * |
| 4 | * This library is free software; you can redistribute it and/or |
| 5 | * modify it under the terms of the GNU Lesser General Public |
| 6 | * License as published by the Free Software Foundation; version 2.1 of |
| 7 | * the License. |
| 8 | * |
| 9 | * This library is distributed in the hope that it will be useful, |
| 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 12 | * Lesser General Public License for more details. |
| 13 | * |
| 14 | * You should have received a copy of the GNU Lesser General Public |
| 15 | * License along with this library; if not, write to the Free Software |
| 16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
| 17 | */ |
| 18 | |
| 19 | #include <unistd.h> |
| 20 | |
| 21 | #define TRACEPOINT_DEFINE |
| 22 | #include "ust_tests_ctf_types.h" |
| 23 | |
| 24 | int main(int argc, char **argv) |
| 25 | { |
| 26 | int i; |
| 27 | int delay = 0; |
| 28 | |
| 29 | if (argc == 2) |
| 30 | delay = atoi(argv[1]); |
| 31 | |
| 32 | fprintf(stderr, "Hello, World!\n"); |
| 33 | |
| 34 | sleep(delay); |
| 35 | |
| 36 | fprintf(stderr, "Tracing... "); |
| 37 | for (i = 0; i < 100; i++) { |
| 38 | tracepoint(ust_tests_ctf_types, tptest, i, i % 6, |
| 39 | i % 21); |
| 40 | } |
| 41 | |
| 42 | for (i = 0; i < 10; i++) { |
| 43 | tracepoint(ust_tests_ctf_types, tptest_bis, i, i % 6); |
| 44 | } |
| 45 | fprintf(stderr, " done.\n"); |
| 46 | return 0; |
| 47 | } |