5 #include <traceevent/event-parse.h> 19 ret += fprintf(fp,
",");
21 ret += fprintf(fp,
":");
26 ret += vfprintf(fp, fmt, args);
49 printed += fprintf(fp,
"%s{", evsel->
group_name ?:
"");
56 printed += fprintf(fp,
"}");
65 }
else if (details->
freq) {
66 const char *
term =
"sample_freq";
68 if (!evsel->
attr.freq)
69 term =
"sample_period";
72 term, (u64)evsel->
attr.sample_freq);
76 struct format_field *
field;
78 if (evsel->
attr.type != PERF_TYPE_TRACEPOINT) {
89 printed +=
comma_fprintf(fp, &first,
" trace_fields: %s", field->name);
117 char s = print_oneline ?
' ' :
'\t';
132 if (node->
sym && node->
sym->
ignore && print_skip_ignored)
135 printed += fprintf(fp,
"%-*.*s", left_alignment, left_alignment,
" ");
137 if (print_arrow && !first)
138 printed += fprintf(fp,
" <-");
141 printed += fprintf(fp,
"%c%16" PRIx64, s, node->
ip);
147 printed += fprintf(fp,
" ");
151 if (print_symoffset) {
153 print_unknown_as_addr,
157 print_unknown_as_addr, fp);
162 printed += fprintf(fp,
" (");
164 printed += fprintf(fp,
")");
171 printed += fprintf(fp,
" (inlined)");
174 printed += fprintf(fp,
"\n");
193 int left_alignment,
unsigned int print_opts,
204 if (cursor != NULL) {
206 print_opts, cursor, fp);
208 printed += fprintf(fp,
"%-*.*s", left_alignment, left_alignment,
" ");
211 printed += fprintf(fp,
"%16" PRIx64, sample->
ip);
214 printed += fprintf(fp,
" ");
215 if (print_symoffset) {
217 print_unknown_as_addr,
221 print_unknown_as_addr, fp);
226 printed += fprintf(fp,
" (");
228 printed += fprintf(fp,
")");
u64(* map_ip)(struct map *, u64)
#define EVSEL__PRINT_ONELINE
int perf_evsel__fprintf(struct perf_evsel *evsel, struct perf_attr_details *details, FILE *fp)
#define EVSEL__PRINT_SYMOFFSET
#define EVSEL__PRINT_UNKNOWN_AS_ADDR
struct ip_callchain * callchain
int perf_event_attr__fprintf(FILE *fp, struct perf_event_attr *attr, attr__fprintf_f attr__fprintf, void *priv)
static int term(yyscan_t scanner, int type)
static void callchain_cursor_commit(struct callchain_cursor *cursor)
int map__fprintf_srcline(struct map *map, u64 addr, const char *prefix, FILE *fp)
#define EVSEL__PRINT_SRCLINE
#define EVSEL__PRINT_CALLCHAIN_ARROW
static void callchain_cursor_advance(struct callchain_cursor *cursor)
int sample__fprintf_sym(struct perf_sample *sample, struct addr_location *al, int left_alignment, unsigned int print_opts, struct callchain_cursor *cursor, FILE *fp)
static int __print_attr__fprintf(FILE *fp, const char *name, const char *val, void *priv)
struct event_format * tp_format
int sample__fprintf_callchain(struct perf_sample *sample, int left_alignment, unsigned int print_opts, struct callchain_cursor *cursor, FILE *fp)
size_t __symbol__fprintf_symname(const struct symbol *sym, const struct addr_location *al, bool unknown_as_addr, FILE *fp)
const char * perf_evsel__name(struct perf_evsel *evsel)
#define EVSEL__PRINT_SKIP_IGNORED
#define for_each_group_member(_evsel, _leader)
size_t map__fprintf_dsoname(struct map *map, FILE *fp)
static bool perf_evsel__is_group_leader(const struct perf_evsel *evsel)
size_t __symbol__fprintf_symname_offs(const struct symbol *sym, const struct addr_location *al, bool unknown_as_addr, bool print_offsets, FILE *fp)
struct strlist * bt_stop_list
static int comma_fprintf(FILE *fp, bool *first, const char *fmt,...)
static bool strlist__has_entry(struct strlist *slist, const char *entry)
struct perf_event_attr attr
static struct callchain_cursor_node * callchain_cursor_current(struct callchain_cursor *cursor)