File: ust-fields.c

package info (click to toggle)
ust 2.14.0-1.1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 19,368 kB
  • sloc: xml: 78,798; ansic: 47,114; sh: 5,806; java: 2,202; makefile: 1,833; python: 727; cpp: 384
file content (35 lines) | stat: -rw-r--r-- 648 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
/*
 * SPDX-License-Identifier: LGPL-2.1-only
 *
 * Copyright (C) 2014 Geneviève Bastien <gbastien@versatic.net>
 */

#include <unistd.h>

#define LTTNG_UST_TRACEPOINT_DEFINE
#include "ust_tests_ust_fields.h"

int main(int argc, char **argv)
{
	int i;
	int delay = 0;

	if (argc == 2)
		delay = atoi(argv[1]);

	fprintf(stderr, "Hello, World!\n");

	sleep(delay);

	fprintf(stderr, "Tracing... ");
	for (i = 0; i < 100; i++) {
		lttng_ust_tracepoint(ust_tests_ust_fields, tptest, i, i % 6,
			i % 21);
	}

	for (i = 0; i < 10; i++) {
		lttng_ust_tracepoint(ust_tests_ust_fields, tptest_bis, i, i % 6);
	}
	fprintf(stderr, " done.\n");
	return 0;
}