Orange Pi5 kernel

Deprecated Linux kernel 5.10.110 for OrangePi 5/5B/5+ boards

3 Commits   0 Branches   0 Tags
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   1) // SPDX-License-Identifier: GPL-2.0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   2) #include <inttypes.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   3) #include <stdio.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   4) #include <stdbool.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   5) #include <traceevent/event-parse.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   6) #include "evsel.h"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   7) #include "util/evsel_fprintf.h"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   8) #include "util/event.h"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   9) #include "callchain.h"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  10) #include "map.h"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  11) #include "strlist.h"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  12) #include "symbol.h"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  13) #include "srcline.h"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  14) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  15) static int comma_fprintf(FILE *fp, bool *first, const char *fmt, ...)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  16) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  17) 	va_list args;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  18) 	int ret = 0;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  19) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  20) 	if (!*first) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  21) 		ret += fprintf(fp, ",");
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  22) 	} else {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  23) 		ret += fprintf(fp, ":");
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  24) 		*first = false;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  25) 	}
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  26) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  27) 	va_start(args, fmt);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  28) 	ret += vfprintf(fp, fmt, args);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  29) 	va_end(args);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  30) 	return ret;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  31) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  32) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  33) static int __print_attr__fprintf(FILE *fp, const char *name, const char *val, void *priv)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  34) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  35) 	return comma_fprintf(fp, (bool *)priv, " %s: %s", name, val);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  36) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  37) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  38) int evsel__fprintf(struct evsel *evsel, struct perf_attr_details *details, FILE *fp)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  39) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  40) 	bool first = true;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  41) 	int printed = 0;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  42) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  43) 	if (details->event_group) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  44) 		struct evsel *pos;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  45) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  46) 		if (!evsel__is_group_leader(evsel))
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  47) 			return 0;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  48) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  49) 		if (evsel->core.nr_members > 1)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  50) 			printed += fprintf(fp, "%s{", evsel->group_name ?: "");
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  51) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  52) 		printed += fprintf(fp, "%s", evsel__name(evsel));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  53) 		for_each_group_member(pos, evsel)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  54) 			printed += fprintf(fp, ",%s", evsel__name(pos));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  55) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  56) 		if (evsel->core.nr_members > 1)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  57) 			printed += fprintf(fp, "}");
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  58) 		goto out;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  59) 	}
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  60) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  61) 	printed += fprintf(fp, "%s", evsel__name(evsel));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  62) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  63) 	if (details->verbose) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  64) 		printed += perf_event_attr__fprintf(fp, &evsel->core.attr,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  65) 						    __print_attr__fprintf, &first);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  66) 	} else if (details->freq) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  67) 		const char *term = "sample_freq";
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  68) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  69) 		if (!evsel->core.attr.freq)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  70) 			term = "sample_period";
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  71) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  72) 		printed += comma_fprintf(fp, &first, " %s=%" PRIu64,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  73) 					 term, (u64)evsel->core.attr.sample_freq);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  74) 	}
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  75) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  76) 	if (details->trace_fields) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  77) 		struct tep_format_field *field;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  78) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  79) 		if (evsel->core.attr.type != PERF_TYPE_TRACEPOINT) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  80) 			printed += comma_fprintf(fp, &first, " (not a tracepoint)");
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  81) 			goto out;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  82) 		}
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  83) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  84) 		field = evsel->tp_format->format.fields;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  85) 		if (field == NULL) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  86) 			printed += comma_fprintf(fp, &first, " (no trace field)");
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  87) 			goto out;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  88) 		}
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  89) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  90) 		printed += comma_fprintf(fp, &first, " trace_fields: %s", field->name);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  91) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  92) 		field = field->next;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  93) 		while (field) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  94) 			printed += comma_fprintf(fp, &first, "%s", field->name);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  95) 			field = field->next;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  96) 		}
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  97) 	}
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  98) out:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  99) 	fputc('\n', fp);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 100) 	return ++printed;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 101) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 102) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 103) int sample__fprintf_callchain(struct perf_sample *sample, int left_alignment,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 104) 			      unsigned int print_opts, struct callchain_cursor *cursor,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 105) 			      struct strlist *bt_stop_list, FILE *fp)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 106) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 107) 	int printed = 0;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 108) 	struct callchain_cursor_node *node;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 109) 	int print_ip = print_opts & EVSEL__PRINT_IP;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 110) 	int print_sym = print_opts & EVSEL__PRINT_SYM;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 111) 	int print_dso = print_opts & EVSEL__PRINT_DSO;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 112) 	int print_symoffset = print_opts & EVSEL__PRINT_SYMOFFSET;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 113) 	int print_oneline = print_opts & EVSEL__PRINT_ONELINE;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 114) 	int print_srcline = print_opts & EVSEL__PRINT_SRCLINE;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 115) 	int print_unknown_as_addr = print_opts & EVSEL__PRINT_UNKNOWN_AS_ADDR;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 116) 	int print_arrow = print_opts & EVSEL__PRINT_CALLCHAIN_ARROW;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 117) 	int print_skip_ignored = print_opts & EVSEL__PRINT_SKIP_IGNORED;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 118) 	char s = print_oneline ? ' ' : '\t';
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 119) 	bool first = true;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 120) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 121) 	if (sample->callchain) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 122) 		struct addr_location node_al;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 123) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 124) 		callchain_cursor_commit(cursor);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 125) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 126) 		while (1) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 127) 			struct symbol *sym;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 128) 			struct map *map;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 129) 			u64 addr = 0;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 130) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 131) 			node = callchain_cursor_current(cursor);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 132) 			if (!node)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 133) 				break;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 134) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 135) 			sym = node->ms.sym;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 136) 			map = node->ms.map;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 137) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 138) 			if (sym && sym->ignore && print_skip_ignored)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 139) 				goto next;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 140) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 141) 			printed += fprintf(fp, "%-*.*s", left_alignment, left_alignment, " ");
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 142) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 143) 			if (print_arrow && !first)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 144) 				printed += fprintf(fp, " <-");
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 145) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 146) 			if (print_ip)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 147) 				printed += fprintf(fp, "%c%16" PRIx64, s, node->ip);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 148) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 149) 			if (map)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 150) 				addr = map->map_ip(map, node->ip);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 151) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 152) 			if (print_sym) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 153) 				printed += fprintf(fp, " ");
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 154) 				node_al.addr = addr;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 155) 				node_al.map  = map;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 156) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 157) 				if (print_symoffset) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 158) 					printed += __symbol__fprintf_symname_offs(sym, &node_al,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 159) 										  print_unknown_as_addr,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 160) 										  true, fp);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 161) 				} else {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 162) 					printed += __symbol__fprintf_symname(sym, &node_al,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 163) 									     print_unknown_as_addr, fp);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 164) 				}
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 165) 			}
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 166) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 167) 			if (print_dso && (!sym || !sym->inlined)) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 168) 				printed += fprintf(fp, " (");
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 169) 				printed += map__fprintf_dsoname(map, fp);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 170) 				printed += fprintf(fp, ")");
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 171) 			}
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 172) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 173) 			if (print_srcline)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 174) 				printed += map__fprintf_srcline(map, addr, "\n  ", fp);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 175) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 176) 			if (sym && sym->inlined)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 177) 				printed += fprintf(fp, " (inlined)");
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 178) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 179) 			if (!print_oneline)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 180) 				printed += fprintf(fp, "\n");
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 181) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 182) 			/* Add srccode here too? */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 183) 			if (bt_stop_list && sym &&
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 184) 			    strlist__has_entry(bt_stop_list, sym->name)) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 185) 				break;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 186) 			}
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 187) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 188) 			first = false;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 189) next:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 190) 			callchain_cursor_advance(cursor);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 191) 		}
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 192) 	}
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 193) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 194) 	return printed;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 195) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 196) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 197) int sample__fprintf_sym(struct perf_sample *sample, struct addr_location *al,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 198) 			int left_alignment, unsigned int print_opts,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 199) 			struct callchain_cursor *cursor, struct strlist *bt_stop_list, FILE *fp)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 200) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 201) 	int printed = 0;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 202) 	int print_ip = print_opts & EVSEL__PRINT_IP;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 203) 	int print_sym = print_opts & EVSEL__PRINT_SYM;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 204) 	int print_dso = print_opts & EVSEL__PRINT_DSO;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 205) 	int print_symoffset = print_opts & EVSEL__PRINT_SYMOFFSET;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 206) 	int print_srcline = print_opts & EVSEL__PRINT_SRCLINE;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 207) 	int print_unknown_as_addr = print_opts & EVSEL__PRINT_UNKNOWN_AS_ADDR;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 208) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 209) 	if (cursor != NULL) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 210) 		printed += sample__fprintf_callchain(sample, left_alignment, print_opts,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 211) 						     cursor, bt_stop_list, fp);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 212) 	} else {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 213) 		printed += fprintf(fp, "%-*.*s", left_alignment, left_alignment, " ");
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 214) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 215) 		if (print_ip)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 216) 			printed += fprintf(fp, "%16" PRIx64, sample->ip);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 217) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 218) 		if (print_sym) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 219) 			printed += fprintf(fp, " ");
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 220) 			if (print_symoffset) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 221) 				printed += __symbol__fprintf_symname_offs(al->sym, al,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 222) 									  print_unknown_as_addr,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 223) 									  true, fp);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 224) 			} else {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 225) 				printed += __symbol__fprintf_symname(al->sym, al,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 226) 								     print_unknown_as_addr, fp);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 227) 			}
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 228) 		}
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 229) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 230) 		if (print_dso) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 231) 			printed += fprintf(fp, " (");
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 232) 			printed += map__fprintf_dsoname(al->map, fp);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 233) 			printed += fprintf(fp, ")");
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 234) 		}
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 235) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 236) 		if (print_srcline)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 237) 			printed += map__fprintf_srcline(al->map, al->addr, "\n  ", fp);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 238) 	}
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 239) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 240) 	return printed;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 241) }