1/* SPDX-License-Identifier: GPL-2.0 */ 2#ifndef __PERF_THREAD_MAP_H 3#define __PERF_THREAD_MAP_H 4 5#include <sys/types.h> 6#include <stdio.h> 7#include <perf/threadmap.h> 8 9struct perf_record_thread_map; 10 11struct perf_thread_map *thread_map__new_dummy(void); 12struct perf_thread_map *thread_map__new_by_pid(pid_t pid); 13struct perf_thread_map *thread_map__new_by_tid(pid_t tid); 14struct perf_thread_map *thread_map__new_by_uid(uid_t uid); 15struct perf_thread_map *thread_map__new_all_cpus(void); 16struct perf_thread_map *thread_map__new(pid_t pid, pid_t tid, uid_t uid); 17struct perf_thread_map *thread_map__new_event(struct perf_record_thread_map *event); 18 19struct perf_thread_map *thread_map__new_str(const char *pid, 20 const char *tid, uid_t uid, bool all_threads); 21 22struct perf_thread_map *thread_map__new_by_tid_str(const char *tid_str); 23 24size_t thread_map__fprintf(struct perf_thread_map *threads, FILE *fp); 25 26void thread_map__read_comms(struct perf_thread_map *threads); 27bool thread_map__has(struct perf_thread_map *threads, pid_t pid); 28int thread_map__remove(struct perf_thread_map *threads, int idx); 29#endif /* __PERF_THREAD_MAP_H */ 30