hv-24x7-catalog.h 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. #ifndef LINUX_POWERPC_PERF_HV_24X7_CATALOG_H_
  2. #define LINUX_POWERPC_PERF_HV_24X7_CATALOG_H_
  3. #include <linux/types.h>
  4. /* From document "24x7 Event and Group Catalog Formats Proposal" v0.15 */
  5. struct hv_24x7_catalog_page_0 {
  6. #define HV_24X7_CATALOG_MAGIC 0x32347837 /* "24x7" in ASCII */
  7. __be32 magic;
  8. __be32 length; /* In 4096 byte pages */
  9. __be64 version; /* XXX: arbitrary? what's the meaning/useage/purpose? */
  10. __u8 build_time_stamp[16]; /* "YYYYMMDDHHMMSS\0\0" */
  11. __u8 reserved2[32];
  12. __be16 schema_data_offs; /* in 4096 byte pages */
  13. __be16 schema_data_len; /* in 4096 byte pages */
  14. __be16 schema_entry_count;
  15. __u8 reserved3[2];
  16. __be16 event_data_offs;
  17. __be16 event_data_len;
  18. __be16 event_entry_count;
  19. __u8 reserved4[2];
  20. __be16 group_data_offs; /* in 4096 byte pages */
  21. __be16 group_data_len; /* in 4096 byte pages */
  22. __be16 group_entry_count;
  23. __u8 reserved5[2];
  24. __be16 formula_data_offs; /* in 4096 byte pages */
  25. __be16 formula_data_len; /* in 4096 byte pages */
  26. __be16 formula_entry_count;
  27. __u8 reserved6[2];
  28. } __packed;
  29. struct hv_24x7_event_data {
  30. __be16 length; /* in bytes, must be a multiple of 16 */
  31. __u8 reserved1[2];
  32. __u8 domain; /* Chip = 1, Core = 2 */
  33. __u8 reserved2[1];
  34. __be16 event_group_record_offs; /* in bytes, must be 8 byte aligned */
  35. __be16 event_group_record_len; /* in bytes */
  36. /* in bytes, offset from event_group_record */
  37. __be16 event_counter_offs;
  38. /* verified_state, unverified_state, caveat_state, broken_state, ... */
  39. __be32 flags;
  40. __be16 primary_group_ix;
  41. __be16 group_count;
  42. __be16 event_name_len;
  43. __u8 remainder[];
  44. /* __u8 event_name[event_name_len - 2]; */
  45. /* __be16 event_description_len; */
  46. /* __u8 event_desc[event_description_len - 2]; */
  47. /* __be16 detailed_desc_len; */
  48. /* __u8 detailed_desc[detailed_desc_len - 2]; */
  49. } __packed;
  50. #endif