0001
0002 #ifndef __PERF_EVSEL_FPRINTF_H
0003 #define __PERF_EVSEL_FPRINTF_H 1
0004
0005 #include <stdio.h>
0006 #include <stdbool.h>
0007
0008 struct evsel;
0009
0010 struct perf_attr_details {
0011 bool freq;
0012 bool verbose;
0013 bool event_group;
0014 bool force;
0015 bool trace_fields;
0016 };
0017
0018 int evsel__fprintf(struct evsel *evsel, struct perf_attr_details *details, FILE *fp);
0019
0020 #define EVSEL__PRINT_IP (1<<0)
0021 #define EVSEL__PRINT_SYM (1<<1)
0022 #define EVSEL__PRINT_DSO (1<<2)
0023 #define EVSEL__PRINT_SYMOFFSET (1<<3)
0024 #define EVSEL__PRINT_ONELINE (1<<4)
0025 #define EVSEL__PRINT_SRCLINE (1<<5)
0026 #define EVSEL__PRINT_UNKNOWN_AS_ADDR (1<<6)
0027 #define EVSEL__PRINT_CALLCHAIN_ARROW (1<<7)
0028 #define EVSEL__PRINT_SKIP_IGNORED (1<<8)
0029
0030 struct addr_location;
0031 struct perf_event_attr;
0032 struct perf_sample;
0033 struct callchain_cursor;
0034 struct strlist;
0035
0036 int sample__fprintf_callchain(struct perf_sample *sample, int left_alignment,
0037 unsigned int print_opts, struct callchain_cursor *cursor,
0038 struct strlist *bt_stop_list, FILE *fp);
0039
0040 int sample__fprintf_sym(struct perf_sample *sample, struct addr_location *al,
0041 int left_alignment, unsigned int print_opts,
0042 struct callchain_cursor *cursor,
0043 struct strlist *bt_stop_list, FILE *fp);
0044
0045 typedef int (*attr__fprintf_f)(FILE *, const char *, const char *, void *);
0046
0047 int perf_event_attr__fprintf(FILE *fp, struct perf_event_attr *attr,
0048 attr__fprintf_f attr__fprintf, void *priv);
0049 #endif