Mirror of strace – the linux syscall tracer
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

perf_event_struct.h 1.9KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. /*
  2. * Copyright (c) 2016-2018 Eugene Syromyatnikov <evgsyr@gmail.com>
  3. * Copyright (c) 2016-2020 The strace developers.
  4. * All rights reserved.
  5. *
  6. * SPDX-License-Identifier: LGPL-2.1-or-later
  7. */
  8. #ifndef STRACE_LINUX_PERF_EVENT_STRUCT_H
  9. # define STRACE_LINUX_PERF_EVENT_STRUCT_H
  10. # include <stdint.h>
  11. struct perf_event_attr {
  12. uint32_t type;
  13. uint32_t size;
  14. uint64_t config;
  15. union {
  16. uint64_t sample_period;
  17. uint64_t sample_freq;
  18. };
  19. uint64_t sample_type;
  20. uint64_t read_format;
  21. uint64_t disabled :1,
  22. inherit :1,
  23. pinned :1,
  24. exclusive :1,
  25. exclude_user :1,
  26. exclude_kernel :1,
  27. exclude_hv :1,
  28. exclude_idle :1,
  29. mmap :1,
  30. comm :1,
  31. freq :1,
  32. inherit_stat :1,
  33. enable_on_exec :1,
  34. task :1,
  35. watermark :1,
  36. precise_ip :2,
  37. mmap_data :1,
  38. sample_id_all :1,
  39. exclude_host :1,
  40. exclude_guest :1,
  41. exclude_callchain_kernel :1,
  42. exclude_callchain_user :1,
  43. mmap2 :1,
  44. comm_exec :1,
  45. use_clockid :1,
  46. context_switch :1,
  47. write_backward :1,
  48. namespaces :1,
  49. __reserved_1 :35;
  50. union {
  51. uint32_t wakeup_events;
  52. uint32_t wakeup_watermark;
  53. };
  54. uint32_t bp_type;
  55. union {
  56. uint64_t bp_addr;
  57. uint64_t config1;
  58. };
  59. /* End of ver 0 - 64 bytes */
  60. union {
  61. uint64_t bp_len;
  62. uint64_t config2;
  63. };
  64. /* End of ver 1 - 72 bytes */
  65. uint64_t branch_sample_type;
  66. /* End of ver 2 - 80 bytes */
  67. uint64_t sample_regs_user;
  68. uint32_t sample_stack_user;
  69. int32_t clockid;
  70. /* End of ver 3 - 96 bytes */
  71. uint64_t sample_regs_intr;
  72. /* End of ver 4 - 104 bytes */
  73. uint32_t aux_watermark;
  74. uint16_t sample_max_stack;
  75. uint16_t __reserved_2;
  76. /* End of ver 5 - 112 bytes */
  77. uint32_t aux_sample_size;
  78. uint32_t __reserved_3;
  79. /* End of ver 6 - 120 bytes */
  80. };
  81. struct perf_event_query_bpf {
  82. uint32_t ids_len;
  83. uint32_t prog_cnt;
  84. uint32_t ids[0];
  85. };
  86. #endif /* !STRACE_LINUX_PERF_EVENT_STRUCT_H */