Jiri Olsa | 43d6976 | 2019-07-21 13:25:01 +0200 | [diff] [blame] | 1 | // SPDX-License-Identifier: GPL-2.0 |
Jiri Olsa | 379dd98 | 2019-09-02 10:33:09 +0200 | [diff] [blame] | 2 | #include <stdarg.h> |
| 3 | #include <stdio.h> |
Jiri Olsa | 43d6976 | 2019-07-21 13:25:01 +0200 | [diff] [blame] | 4 | #include <perf/threadmap.h> |
| 5 | #include <internal/tests.h> |
| 6 | |
Jiri Olsa | 379dd98 | 2019-09-02 10:33:09 +0200 | [diff] [blame] | 7 | static 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 Olsa | 43d6976 | 2019-07-21 13:25:01 +0200 | [diff] [blame] | 13 | int main(int argc, char **argv) |
| 14 | { |
| 15 | struct perf_thread_map *threads; |
| 16 | |
| 17 | __T_START; |
| 18 | |
Jiri Olsa | 379dd98 | 2019-09-02 10:33:09 +0200 | [diff] [blame] | 19 | libperf_init(libperf_print); |
| 20 | |
Jiri Olsa | 43d6976 | 2019-07-21 13:25:01 +0200 | [diff] [blame] | 21 | 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 Olsa | 301a89f | 2019-10-17 12:59:16 +0200 | [diff] [blame] | 29 | __T_END; |
Jiri Olsa | 43d6976 | 2019-07-21 13:25:01 +0200 | [diff] [blame] | 30 | return 0; |
| 31 | } |