blob: 7dc4d6fbeddee5bdc4b0f0316f8b6a1814fa2c6b [file] [log] [blame]
Jiri Olsa43d69762019-07-21 13:25:01 +02001// SPDX-License-Identifier: GPL-2.0
Jiri Olsa379dd982019-09-02 10:33:09 +02002#include <stdarg.h>
3#include <stdio.h>
Jiri Olsa43d69762019-07-21 13:25:01 +02004#include <perf/threadmap.h>
5#include <internal/tests.h>
6
Jiri Olsa379dd982019-09-02 10:33:09 +02007static int libperf_print(enum libperf_print_level level,
8 const char *fmt, va_list ap)
9{
10 return vfprintf(stderr, fmt, ap);
11}
12
Jiri Olsa43d69762019-07-21 13:25:01 +020013int main(int argc, char **argv)
14{
15 struct perf_thread_map *threads;
16
17 __T_START;
18
Jiri Olsa379dd982019-09-02 10:33:09 +020019 libperf_init(libperf_print);
20
Jiri Olsa43d69762019-07-21 13:25:01 +020021 threads = perf_thread_map__new_dummy();
22 if (!threads)
23 return -1;
24
25 perf_thread_map__get(threads);
26 perf_thread_map__put(threads);
27 perf_thread_map__put(threads);
28
Jiri Olsa301a89f2019-10-17 12:59:16 +020029 __T_END;
Jiri Olsa43d69762019-07-21 13:25:01 +020030 return 0;
31}