trace_synth.h 892 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. // SPDX-License-Identifier: GPL-2.0
  2. #ifndef __TRACE_SYNTH_H
  3. #define __TRACE_SYNTH_H
  4. #include "trace_dynevent.h"
  5. #define SYNTH_SYSTEM "synthetic"
  6. #define SYNTH_FIELDS_MAX 64
  7. #define STR_VAR_LEN_MAX MAX_FILTER_STR_VAL /* must be multiple of sizeof(u64) */
  8. struct synth_field {
  9. char *type;
  10. char *name;
  11. size_t size;
  12. unsigned int offset;
  13. unsigned int field_pos;
  14. bool is_signed;
  15. bool is_string;
  16. bool is_dynamic;
  17. bool is_stack;
  18. };
  19. struct synth_event {
  20. struct dyn_event devent;
  21. int ref;
  22. char *name;
  23. struct synth_field **fields;
  24. unsigned int n_fields;
  25. struct synth_field **dynamic_fields;
  26. unsigned int n_dynamic_fields;
  27. unsigned int n_u64;
  28. struct trace_event_class class;
  29. struct trace_event_call call;
  30. struct tracepoint *tp;
  31. struct module *mod;
  32. };
  33. extern struct synth_event *find_synth_event(const char *name);
  34. #endif /* __TRACE_SYNTH_H */