top.h 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  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. const char *target_pid, *target_tid;
  24. uid_t uid;
  25. bool hide_kernel_symbols, hide_user_symbols, zero;
  26. bool system_wide;
  27. bool use_tui, use_stdio;
  28. bool sort_has_symbols;
  29. bool dont_use_callchains;
  30. bool kptr_restrict_warned;
  31. bool vmlinux_warned;
  32. bool inherit;
  33. bool group;
  34. bool sample_id_all_missing;
  35. bool exclude_guest_missing;
  36. bool dump_symtab;
  37. const char *cpu_list;
  38. struct hist_entry *sym_filter_entry;
  39. struct perf_evsel *sym_evsel;
  40. struct perf_session *session;
  41. struct winsize winsize;
  42. unsigned int mmap_pages;
  43. int default_interval;
  44. int realtime_prio;
  45. int sym_pcnt_filter;
  46. const char *sym_filter;
  47. const char *uid_str;
  48. };
  49. size_t perf_top__header_snprintf(struct perf_top *top, char *bf, size_t size);
  50. void perf_top__reset_sample_counters(struct perf_top *top);
  51. #endif /* __PERF_TOP_H */