thread_map.h 1.2 KB

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