evsel_fprintf.h 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. // SPDX-License-Identifier: GPL-2.0
  2. #ifndef __PERF_EVSEL_FPRINTF_H
  3. #define __PERF_EVSEL_FPRINTF_H 1
  4. #include <stdio.h>
  5. #include <stdbool.h>
  6. struct evsel;
  7. struct perf_attr_details {
  8. bool freq;
  9. bool verbose;
  10. bool event_group;
  11. bool force;
  12. bool trace_fields;
  13. };
  14. int evsel__fprintf(struct evsel *evsel, struct perf_attr_details *details, FILE *fp);
  15. #define EVSEL__PRINT_IP (1<<0)
  16. #define EVSEL__PRINT_SYM (1<<1)
  17. #define EVSEL__PRINT_DSO (1<<2)
  18. #define EVSEL__PRINT_SYMOFFSET (1<<3)
  19. #define EVSEL__PRINT_ONELINE (1<<4)
  20. #define EVSEL__PRINT_SRCLINE (1<<5)
  21. #define EVSEL__PRINT_UNKNOWN_AS_ADDR (1<<6)
  22. #define EVSEL__PRINT_CALLCHAIN_ARROW (1<<7)
  23. #define EVSEL__PRINT_SKIP_IGNORED (1<<8)
  24. #define EVSEL__PRINT_DSOFF (1<<9)
  25. struct addr_location;
  26. struct perf_event_attr;
  27. struct perf_sample;
  28. struct callchain_cursor;
  29. struct strlist;
  30. int sample__fprintf_callchain(struct perf_sample *sample, int left_alignment,
  31. unsigned int print_opts, struct callchain_cursor *cursor,
  32. struct strlist *bt_stop_list, FILE *fp);
  33. int sample__fprintf_sym(struct perf_sample *sample, struct addr_location *al,
  34. int left_alignment, unsigned int print_opts,
  35. struct callchain_cursor *cursor,
  36. struct strlist *bt_stop_list, FILE *fp);
  37. typedef int (*attr__fprintf_f)(FILE *, const char *, const char *, void *);
  38. int perf_event_attr__fprintf(FILE *fp, struct perf_event_attr *attr,
  39. attr__fprintf_f attr__fprintf, void *priv);
  40. #endif // __PERF_EVSEL_H