File: sample.c

package info (click to toggle)
ust 2.15.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 19,444 kB
  • sloc: xml: 78,798; ansic: 48,233; sh: 5,806; java: 2,202; makefile: 1,832; python: 727; cpp: 384
file content (26 lines) | stat: -rw-r--r-- 567 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
/*
 * SPDX-License-Identifier: MIT
 *
 * Copyright (C) 2011-2012 Matthew Khouzam <matthew.khouzam@ericsson.com>
 * Copyright (C) 2012 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
 */

#include <unistd.h>

/*
 * We need to define LTTNG_UST_TRACEPOINT_DEFINE in one C file in the program
 * before including provider headers.
 */
#define LTTNG_UST_TRACEPOINT_DEFINE
#include "sample_component_provider.h"

int main(void)
{
	int i = 0;

	for (i = 0; i < 100000; i++) {
		lttng_ust_tracepoint(sample_component, message, "Hello World");
		usleep(1);
	}
	return 0;
}