top.h 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. #ifndef __PERF_TOP_H
  2. #define __PERF_TOP_H 1
  3. #include "tool.h"
  4. #include "types.h"
  5. #include <stddef.h>
  6. #include <stdbool.h>
  7. struct perf_evlist;
  8. struct perf_evsel;
  9. struct perf_session;
  10. struct perf_top {
  11. struct perf_tool tool;
  12. struct perf_evlist *evlist;
  13. /*
  14. * Symbols will be added here in perf_event__process_sample and will
  15. * get out after decayed.
  16. */
  17. u64 samples;
  18. u64 kernel_samples, us_samples;
  19. u64 exact_samples;
  20. u64 guest_us_samples, guest_kernel_samples;
  21. int print_entries, count_filter, delay_secs;
  22. int freq;
  23. pid_t target_pid, target_tid;
  24. bool hide_kernel_symbols, hide_user_symbols, zero;
  25. bool system_wide;
  26. bool use_tui, use_stdio;
  27. bool sort_has_symbols;
  28. bool dont_use_callchains;
  29. bool kptr_restrict_warned;
  30. bool vmlinux_warned;
  31. bool inherit;
  32. bool group;
  33. bool sample_id_all_avail;
  34. bool dump_symtab;
  35. const char *cpu_list;
  36. struct hist_entry *sym_filter_entry;
  37. struct perf_evsel *sym_evsel;
  38. struct perf_session *session;
  39. struct winsize winsize;
  40. unsigned int mmap_pages;
  41. int default_interval;
  42. int realtime_prio;
  43. int sym_pcnt_filter;
  44. const char *sym_filter;
  45. };
  46. size_t perf_top__header_snprintf(struct perf_top *top, char *bf, size_t size);
  47. void perf_top__reset_sample_counters(struct perf_top *top);
  48. #endif /* __PERF_TOP_H */