fix: relayd: unaligned access in trace_chunk_registry_ht_key_hash
[lttng-tools.git] / doc / examples / trigger-condition-event-matches / instrumented-app.c
1 /*
2 * Copyright (C) 2020 Jérémie Galarneau <jeremie.galarneau@efficios.com>
3 *
4 * SPDX-License-Identifier: MIT
5 *
6 */
7
8 #include "tracepoint-trigger-example.h"
9
10 #include <lttng/tracepoint.h>
11
12 #include <stdio.h>
13 #include <sys/time.h>
14 #include <time.h>
15 #include <unistd.h>
16
17 int main(void)
18 {
19 uint64_t i;
20
21 for (i = 0; i < UINT64_MAX; i++) {
22 char time_str[64];
23 struct timeval tv;
24 time_t the_time;
25
26 gettimeofday(&tv, NULL);
27 the_time = tv.tv_sec;
28
29 strftime(time_str, sizeof(time_str), "[%m-%d-%Y] %T", localtime(&the_time));
30 printf("%s.%ld - Tracing event \"trigger_example:my_event\"\n",
31 time_str,
32 tv.tv_usec);
33
34 tracepoint(trigger_example, my_event, i);
35 sleep(2);
36 }
37 return 0;
38 }
This page took 0.033459 seconds and 5 git commands to generate.