record.h 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. #ifndef _PERF_RECORD_H
  3. #define _PERF_RECORD_H
  4. #include <time.h>
  5. #include <stdbool.h>
  6. #include <linux/types.h>
  7. #include <linux/stddef.h>
  8. #include <linux/perf_event.h>
  9. #include "util/target.h"
  10. struct option;
  11. struct record_opts {
  12. struct target target;
  13. bool group;
  14. bool inherit_stat;
  15. bool no_buffering;
  16. bool no_inherit;
  17. bool no_inherit_set;
  18. bool no_samples;
  19. bool raw_samples;
  20. bool sample_address;
  21. bool sample_phys_addr;
  22. bool sample_weight;
  23. bool sample_time;
  24. bool sample_time_set;
  25. bool sample_cpu;
  26. bool period;
  27. bool period_set;
  28. bool running_time;
  29. bool full_auxtrace;
  30. bool auxtrace_snapshot_mode;
  31. bool auxtrace_snapshot_on_exit;
  32. bool record_namespaces;
  33. bool record_switch_events;
  34. bool all_kernel;
  35. bool all_user;
  36. bool kernel_callchains;
  37. bool user_callchains;
  38. bool tail_synthesize;
  39. bool overwrite;
  40. bool ignore_missing_thread;
  41. bool strict_freq;
  42. bool sample_id;
  43. bool no_bpf_event;
  44. unsigned int freq;
  45. unsigned int mmap_pages;
  46. unsigned int auxtrace_mmap_pages;
  47. unsigned int user_freq;
  48. u64 branch_stack;
  49. u64 sample_intr_regs;
  50. u64 sample_user_regs;
  51. u64 default_interval;
  52. u64 user_interval;
  53. size_t auxtrace_snapshot_size;
  54. const char *auxtrace_snapshot_opts;
  55. bool sample_transaction;
  56. unsigned initial_delay;
  57. bool use_clockid;
  58. clockid_t clockid;
  59. u64 clockid_res_ns;
  60. int nr_cblocks;
  61. int affinity;
  62. int mmap_flush;
  63. unsigned int comp_level;
  64. };
  65. extern const char * const *record_usage;
  66. extern struct option *record_options;
  67. int record__parse_freq(const struct option *opt, const char *str, int unset);
  68. #endif // _PERF_RECORD_H