Refactor: test: wrapper for destroy_lttng_session
[lttng-tools.git] / tests / regression / ust / multi-session / gen-nevents.c
CommitLineData
00eb21af
DG
1/*
2 * Copyright (C) - 2009 Pierre-Marc Fournier
3 * Copyright (C) - 2011 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
4 * Copyright (C) - 2012 David Goulet <dgoulet@efficios.com>
5 *
6 * This library is free software; you can redistribute it and/or modify it
7 * under the terms of the GNU Lesser General Public License as published by the
8 * Free Software Foundation; version 2.1 of the License.
9 *
10 * This library is distributed in the hope that it will be useful, but WITHOUT
11 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
13 * for more details.
14 *
15 * You should have received a copy of the GNU Lesser General Public License
16 * along with this library; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18 */
19
70dac0d7 20#define _LGPL_SOURCE
00eb21af
DG
21#include <arpa/inet.h>
22#include <fcntl.h>
23#include <signal.h>
24#include <stdarg.h>
25#include <stdio.h>
26#include <stdlib.h>
27#include <string.h>
28#include <sys/mman.h>
29#include <sys/stat.h>
30#include <sys/types.h>
31#include <unistd.h>
32
33#define TRACEPOINT_DEFINE
34#include "ust_gen_nevents.h"
35
36int main(int argc, char **argv)
37{
38 int i, nr_iter = 100;
39 long value = 42;
40
41 if (argc == 2) {
42 nr_iter = atoi(argv[1]);
43 }
44
45 for (i = 0; i < nr_iter; i++) {
46 tracepoint(ust_gen_nevents, tptest0, i, value);
47 tracepoint(ust_gen_nevents, tptest1, i, value);
48 tracepoint(ust_gen_nevents, tptest2, i, value);
49 tracepoint(ust_gen_nevents, tptest3, i, value);
50 }
51
52 return 0;
53}
This page took 0.032097 seconds and 4 git commands to generate.