| 1 | /* |
| 2 | * Copyright (C) 2011-2012 Matthew Khouzam <matthew.khouzam@ericsson.com> |
| 3 | * Copyright (C) 2012 Mathieu Desnoyers <mathieu.desnoyers@efficios.com> |
| 4 | * |
| 5 | * THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED |
| 6 | * OR IMPLIED. ANY USE IS AT YOUR OWN RISK. |
| 7 | * |
| 8 | * Permission is hereby granted to use or copy this program for any |
| 9 | * purpose, provided the above notices are retained on all copies. |
| 10 | * Permission to modify the code and to distribute modified code is |
| 11 | * granted, provided the above notices are retained, and a notice that |
| 12 | * the code was modified is included with the above copyright notice. |
| 13 | */ |
| 14 | |
| 15 | #include <unistd.h> |
| 16 | |
| 17 | /* |
| 18 | * We need to define TRACEPOINT_DEFINE in one C file in the program |
| 19 | * before including provider headers. |
| 20 | */ |
| 21 | #define TRACEPOINT_DEFINE |
| 22 | #include "sample_component_provider.h" |
| 23 | |
| 24 | int main(int argc, char **argv) |
| 25 | { |
| 26 | int i = 0; |
| 27 | |
| 28 | for (i = 0; i < 100000; i++) { |
| 29 | tracepoint(sample_component, message, "Hello World\n"); |
| 30 | usleep(1); |
| 31 | } |
| 32 | return 0; |
| 33 | } |