Lines Matching +full:full +full:- +full:hd
1 // SPDX-License-Identifier: GPL-2.0
25 #include <traceevent/event-parse.h>
26 #include "mem-events.h"
28 #include "time-utils.h"
52 * -t, --field-separator
78 return size - 1; in repsep_snprintf()
87 return -1; in cmp_null()
92 /* --sort pid */
97 return right->thread->tid - left->thread->tid; in sort__thread_cmp()
103 const char *comm = thread__comm_str(he->thread); in hist_entry__thread_snprintf()
105 width = max(7U, width) - 8; in hist_entry__thread_snprintf()
106 return repsep_snprintf(bf, size, "%7d:%-*.*s", he->thread->tid, in hist_entry__thread_snprintf()
115 return -1; in hist_entry__thread_filter()
117 return th && he->thread != th; in hist_entry__thread_filter()
128 /* --sort comm */
138 return strcmp(comm__str(right->comm), comm__str(left->comm)); in sort__comm_cmp()
144 return strcmp(comm__str(right->comm), comm__str(left->comm)); in sort__comm_collapse()
150 return strcmp(comm__str(right->comm), comm__str(left->comm)); in sort__comm_sort()
156 return repsep_snprintf(bf, size, "%-*.*s", width, width, comm__str(he->comm)); in hist_entry__comm_snprintf()
169 /* --sort dso */
173 struct dso *dso_l = map_l ? map_l->dso : NULL; in _sort__dso_cmp()
174 struct dso *dso_r = map_r ? map_r->dso : NULL; in _sort__dso_cmp()
181 dso_name_l = dso_l->long_name; in _sort__dso_cmp()
182 dso_name_r = dso_r->long_name; in _sort__dso_cmp()
184 dso_name_l = dso_l->short_name; in _sort__dso_cmp()
185 dso_name_r = dso_r->short_name; in _sort__dso_cmp()
194 return _sort__dso_cmp(right->ms.map, left->ms.map); in sort__dso_cmp()
200 if (map && map->dso) { in _hist_entry__dso_snprintf()
201 const char *dso_name = verbose > 0 ? map->dso->long_name : in _hist_entry__dso_snprintf()
202 map->dso->short_name; in _hist_entry__dso_snprintf()
203 return repsep_snprintf(bf, size, "%-*.*s", width, width, dso_name); in _hist_entry__dso_snprintf()
206 return repsep_snprintf(bf, size, "%-*.*s", width, width, "[unknown]"); in _hist_entry__dso_snprintf()
212 return _hist_entry__dso_snprintf(he->ms.map, bf, size, width); in hist_entry__dso_snprintf()
220 return -1; in hist_entry__dso_filter()
222 return dso && (!he->ms.map || he->ms.map->dso != dso); in hist_entry__dso_filter()
233 /* --sort symbol */
237 return (int64_t)(right_ip - left_ip); in _sort__addr_cmp()
248 if (sym_l->inlined || sym_r->inlined) { in _sort__sym_cmp()
249 int ret = strcmp(sym_l->name, sym_r->name); in _sort__sym_cmp()
253 if ((sym_l->start <= sym_r->end) && (sym_l->end >= sym_r->start)) in _sort__sym_cmp()
257 if (sym_l->start != sym_r->start) in _sort__sym_cmp()
258 return (int64_t)(sym_r->start - sym_l->start); in _sort__sym_cmp()
260 return (int64_t)(sym_r->end - sym_l->end); in _sort__sym_cmp()
268 if (!left->ms.sym && !right->ms.sym) in sort__sym_cmp()
269 return _sort__addr_cmp(left->ip, right->ip); in sort__sym_cmp()
275 if (!hists__has(left->hists, dso) || hists__has(right->hists, dso)) { in sort__sym_cmp()
281 return _sort__sym_cmp(left->ms.sym, right->ms.sym); in sort__sym_cmp()
287 if (!left->ms.sym || !right->ms.sym) in sort__sym_sort()
288 return cmp_null(left->ms.sym, right->ms.sym); in sort__sym_sort()
290 return strcmp(right->ms.sym->name, left->ms.sym->name); in sort__sym_sort()
297 struct symbol *sym = ms->sym; in _hist_entry__sym_snprintf()
298 struct map *map = ms->map; in _hist_entry__sym_snprintf()
302 char o = map ? dso__symtab_origin(map->dso) : '!'; in _hist_entry__sym_snprintf()
305 if (map && map->dso && map->dso->kernel in _hist_entry__sym_snprintf()
306 && map->dso->adjust_symbols) in _hist_entry__sym_snprintf()
307 rip = map->unmap_ip(map, ip); in _hist_entry__sym_snprintf()
309 ret += repsep_snprintf(bf, size, "%-#*llx %c ", in _hist_entry__sym_snprintf()
313 ret += repsep_snprintf(bf + ret, size - ret, "[%c] ", level); in _hist_entry__sym_snprintf()
315 if (sym->type == STT_OBJECT) { in _hist_entry__sym_snprintf()
316 ret += repsep_snprintf(bf + ret, size - ret, "%s", sym->name); in _hist_entry__sym_snprintf()
317 ret += repsep_snprintf(bf + ret, size - ret, "+0x%llx", in _hist_entry__sym_snprintf()
318 ip - map->unmap_ip(map, sym->start)); in _hist_entry__sym_snprintf()
320 ret += repsep_snprintf(bf + ret, size - ret, "%.*s", in _hist_entry__sym_snprintf()
321 width - ret, in _hist_entry__sym_snprintf()
322 sym->name); in _hist_entry__sym_snprintf()
323 if (sym->inlined) in _hist_entry__sym_snprintf()
324 ret += repsep_snprintf(bf + ret, size - ret, in _hist_entry__sym_snprintf()
329 ret += repsep_snprintf(bf + ret, size - ret, "%-#.*llx", in _hist_entry__sym_snprintf()
338 return _hist_entry__sym_snprintf(&he->ms, he->ip, in hist_entry__sym_snprintf()
339 he->level, bf, size, width); in hist_entry__sym_snprintf()
347 return -1; in hist_entry__sym_filter()
349 return sym && (!he->ms.sym || !strstr(he->ms.sym->name, sym)); in hist_entry__sym_filter()
361 /* --sort srcline */
365 return map__srcline(he->ms.map, he->ip, he->ms.sym); in hist_entry__srcline()
371 if (!left->srcline) in sort__srcline_cmp()
372 left->srcline = hist_entry__srcline(left); in sort__srcline_cmp()
373 if (!right->srcline) in sort__srcline_cmp()
374 right->srcline = hist_entry__srcline(right); in sort__srcline_cmp()
376 return strcmp(right->srcline, left->srcline); in sort__srcline_cmp()
382 if (!he->srcline) in hist_entry__srcline_snprintf()
383 he->srcline = hist_entry__srcline(he); in hist_entry__srcline_snprintf()
385 return repsep_snprintf(bf, size, "%-.*s", width, he->srcline); in hist_entry__srcline_snprintf()
395 /* --sort srcline_from */
399 return map__srcline(ams->ms.map, ams->al_addr, ams->ms.sym); in addr_map_symbol__srcline()
405 if (!left->branch_info->srcline_from) in sort__srcline_from_cmp()
406 left->branch_info->srcline_from = addr_map_symbol__srcline(&left->branch_info->from); in sort__srcline_from_cmp()
408 if (!right->branch_info->srcline_from) in sort__srcline_from_cmp()
409 right->branch_info->srcline_from = addr_map_symbol__srcline(&right->branch_info->from); in sort__srcline_from_cmp()
411 return strcmp(right->branch_info->srcline_from, left->branch_info->srcline_from); in sort__srcline_from_cmp()
417 return repsep_snprintf(bf, size, "%-*.*s", width, width, he->branch_info->srcline_from); in hist_entry__srcline_from_snprintf()
427 /* --sort srcline_to */
432 if (!left->branch_info->srcline_to) in sort__srcline_to_cmp()
433 left->branch_info->srcline_to = addr_map_symbol__srcline(&left->branch_info->to); in sort__srcline_to_cmp()
435 if (!right->branch_info->srcline_to) in sort__srcline_to_cmp()
436 right->branch_info->srcline_to = addr_map_symbol__srcline(&right->branch_info->to); in sort__srcline_to_cmp()
438 return strcmp(right->branch_info->srcline_to, left->branch_info->srcline_to); in sort__srcline_to_cmp()
444 return repsep_snprintf(bf, size, "%-*.*s", width, width, he->branch_info->srcline_to); in hist_entry__srcline_to_snprintf()
458 struct symbol *sym = he->ms.sym; in hist_entry__sym_ipc_snprintf()
464 return repsep_snprintf(bf, size, "%-*s", width, "-"); in hist_entry__sym_ipc_snprintf()
468 if (notes->hit_cycles) in hist_entry__sym_ipc_snprintf()
469 ipc = notes->hit_insn / ((double)notes->hit_cycles); in hist_entry__sym_ipc_snprintf()
471 if (notes->total_insn) { in hist_entry__sym_ipc_snprintf()
472 coverage = notes->cover_insn * 100.0 / in hist_entry__sym_ipc_snprintf()
473 ((double)notes->total_insn); in hist_entry__sym_ipc_snprintf()
476 snprintf(tmp, sizeof(tmp), "%-5.2f [%5.1f%%]", ipc, coverage); in hist_entry__sym_ipc_snprintf()
477 return repsep_snprintf(bf, size, "%-*s", width, tmp); in hist_entry__sym_ipc_snprintf()
494 snprintf(tmp, sizeof(tmp), "%-5s %2s", "-", "-"); in hist_entry__sym_ipc_null_snprintf()
495 return repsep_snprintf(bf, size, "%-*s", width, tmp); in hist_entry__sym_ipc_null_snprintf()
505 /* --sort srcfile */
512 struct map *map = e->ms.map; in hist_entry__get_srcfile()
517 sf = __get_srcline(map->dso, map__rip_2objdump(map, e->ip), in hist_entry__get_srcfile()
518 e->ms.sym, false, true, true, e->ip); in hist_entry__get_srcfile()
533 if (!left->srcfile) in sort__srcfile_cmp()
534 left->srcfile = hist_entry__get_srcfile(left); in sort__srcfile_cmp()
535 if (!right->srcfile) in sort__srcfile_cmp()
536 right->srcfile = hist_entry__get_srcfile(right); in sort__srcfile_cmp()
538 return strcmp(right->srcfile, left->srcfile); in sort__srcfile_cmp()
544 if (!he->srcfile) in hist_entry__srcfile_snprintf()
545 he->srcfile = hist_entry__get_srcfile(he); in hist_entry__srcfile_snprintf()
547 return repsep_snprintf(bf, size, "%-.*s", width, he->srcfile); in hist_entry__srcfile_snprintf()
557 /* --sort parent */
562 struct symbol *sym_l = left->parent; in sort__parent_cmp()
563 struct symbol *sym_r = right->parent; in sort__parent_cmp()
568 return strcmp(sym_r->name, sym_l->name); in sort__parent_cmp()
574 return repsep_snprintf(bf, size, "%-*.*s", width, width, in hist_entry__parent_snprintf()
575 he->parent ? he->parent->name : "[other]"); in hist_entry__parent_snprintf()
585 /* --sort cpu */
590 return right->cpu - left->cpu; in sort__cpu_cmp()
596 return repsep_snprintf(bf, size, "%*.*d", width, width, he->cpu); in hist_entry__cpu_snprintf()
606 /* --sort cgroup_id */
610 return (int64_t)(right_dev - left_dev); in _sort__cgroup_dev_cmp()
615 return (int64_t)(right_ino - left_ino); in _sort__cgroup_inode_cmp()
623 ret = _sort__cgroup_dev_cmp(right->cgroup_id.dev, left->cgroup_id.dev); in sort__cgroup_id_cmp()
627 return _sort__cgroup_inode_cmp(right->cgroup_id.ino, in sort__cgroup_id_cmp()
628 left->cgroup_id.ino); in sort__cgroup_id_cmp()
635 return repsep_snprintf(bf, size, "%lu/0x%lx", he->cgroup_id.dev, in hist_entry__cgroup_id_snprintf()
636 he->cgroup_id.ino); in hist_entry__cgroup_id_snprintf()
646 /* --sort cgroup */
651 return right->cgroup - left->cgroup; in sort__cgroup_cmp()
660 if (he->cgroup) { in hist_entry__cgroup_snprintf()
661 struct cgroup *cgrp = cgroup__find(he->ms.maps->machine->env, in hist_entry__cgroup_snprintf()
662 he->cgroup); in hist_entry__cgroup_snprintf()
664 cgrp_name = cgrp->name; in hist_entry__cgroup_snprintf()
679 /* --sort socket */
684 return right->socket - left->socket; in sort__socket_cmp()
690 return repsep_snprintf(bf, size, "%*.*d", width, width-3, he->socket); in hist_entry__socket_snprintf()
698 return -1; in hist_entry__socket_filter()
700 return sk >= 0 && he->socket != sk; in hist_entry__socket_filter()
711 /* --sort time */
716 return right->time - left->time; in sort__time_cmp()
725 timestamp__scnprintf_nsec(he->time, he_time, in hist_entry__time_snprintf()
728 timestamp__scnprintf_usec(he->time, he_time, in hist_entry__time_snprintf()
731 return repsep_snprintf(bf, size, "%-.*s", width, he_time); in hist_entry__time_snprintf()
741 /* --sort trace */
748 .data = he->raw_data, in get_trace_output()
749 .size = he->raw_size, in get_trace_output()
752 evsel = hists_to_evsel(he->hists); in get_trace_output()
756 tep_print_fields(&seq, he->raw_data, he->raw_size, in get_trace_output()
757 evsel->tp_format); in get_trace_output()
759 tep_print_event(evsel->tp_format->tep, in get_trace_output()
774 evsel = hists_to_evsel(left->hists); in sort__trace_cmp()
775 if (evsel->core.attr.type != PERF_TYPE_TRACEPOINT) in sort__trace_cmp()
778 if (left->trace_output == NULL) in sort__trace_cmp()
779 left->trace_output = get_trace_output(left); in sort__trace_cmp()
780 if (right->trace_output == NULL) in sort__trace_cmp()
781 right->trace_output = get_trace_output(right); in sort__trace_cmp()
783 return strcmp(right->trace_output, left->trace_output); in sort__trace_cmp()
791 evsel = hists_to_evsel(he->hists); in hist_entry__trace_snprintf()
792 if (evsel->core.attr.type != PERF_TYPE_TRACEPOINT) in hist_entry__trace_snprintf()
793 return scnprintf(bf, size, "%-.*s", width, "N/A"); in hist_entry__trace_snprintf()
795 if (he->trace_output == NULL) in hist_entry__trace_snprintf()
796 he->trace_output = get_trace_output(he); in hist_entry__trace_snprintf()
797 return repsep_snprintf(bf, size, "%-.*s", width, he->trace_output); in hist_entry__trace_snprintf()
812 if (!left->branch_info || !right->branch_info) in sort__dso_from_cmp()
813 return cmp_null(left->branch_info, right->branch_info); in sort__dso_from_cmp()
815 return _sort__dso_cmp(left->branch_info->from.ms.map, in sort__dso_from_cmp()
816 right->branch_info->from.ms.map); in sort__dso_from_cmp()
822 if (he->branch_info) in hist_entry__dso_from_snprintf()
823 return _hist_entry__dso_snprintf(he->branch_info->from.ms.map, in hist_entry__dso_from_snprintf()
826 return repsep_snprintf(bf, size, "%-*.*s", width, width, "N/A"); in hist_entry__dso_from_snprintf()
835 return -1; in hist_entry__dso_from_filter()
837 return dso && (!he->branch_info || !he->branch_info->from.ms.map || in hist_entry__dso_from_filter()
838 he->branch_info->from.ms.map->dso != dso); in hist_entry__dso_from_filter()
844 if (!left->branch_info || !right->branch_info) in sort__dso_to_cmp()
845 return cmp_null(left->branch_info, right->branch_info); in sort__dso_to_cmp()
847 return _sort__dso_cmp(left->branch_info->to.ms.map, in sort__dso_to_cmp()
848 right->branch_info->to.ms.map); in sort__dso_to_cmp()
854 if (he->branch_info) in hist_entry__dso_to_snprintf()
855 return _hist_entry__dso_snprintf(he->branch_info->to.ms.map, in hist_entry__dso_to_snprintf()
858 return repsep_snprintf(bf, size, "%-*.*s", width, width, "N/A"); in hist_entry__dso_to_snprintf()
867 return -1; in hist_entry__dso_to_filter()
869 return dso && (!he->branch_info || !he->branch_info->to.ms.map || in hist_entry__dso_to_filter()
870 he->branch_info->to.ms.map->dso != dso); in hist_entry__dso_to_filter()
876 struct addr_map_symbol *from_l = &left->branch_info->from; in sort__sym_from_cmp()
877 struct addr_map_symbol *from_r = &right->branch_info->from; in sort__sym_from_cmp()
879 if (!left->branch_info || !right->branch_info) in sort__sym_from_cmp()
880 return cmp_null(left->branch_info, right->branch_info); in sort__sym_from_cmp()
882 from_l = &left->branch_info->from; in sort__sym_from_cmp()
883 from_r = &right->branch_info->from; in sort__sym_from_cmp()
885 if (!from_l->ms.sym && !from_r->ms.sym) in sort__sym_from_cmp()
886 return _sort__addr_cmp(from_l->addr, from_r->addr); in sort__sym_from_cmp()
888 return _sort__sym_cmp(from_l->ms.sym, from_r->ms.sym); in sort__sym_from_cmp()
896 if (!left->branch_info || !right->branch_info) in sort__sym_to_cmp()
897 return cmp_null(left->branch_info, right->branch_info); in sort__sym_to_cmp()
899 to_l = &left->branch_info->to; in sort__sym_to_cmp()
900 to_r = &right->branch_info->to; in sort__sym_to_cmp()
902 if (!to_l->ms.sym && !to_r->ms.sym) in sort__sym_to_cmp()
903 return _sort__addr_cmp(to_l->addr, to_r->addr); in sort__sym_to_cmp()
905 return _sort__sym_cmp(to_l->ms.sym, to_r->ms.sym); in sort__sym_to_cmp()
911 if (he->branch_info) { in hist_entry__sym_from_snprintf()
912 struct addr_map_symbol *from = &he->branch_info->from; in hist_entry__sym_from_snprintf()
914 return _hist_entry__sym_snprintf(&from->ms, from->al_addr, in hist_entry__sym_from_snprintf()
915 he->level, bf, size, width); in hist_entry__sym_from_snprintf()
918 return repsep_snprintf(bf, size, "%-*.*s", width, width, "N/A"); in hist_entry__sym_from_snprintf()
924 if (he->branch_info) { in hist_entry__sym_to_snprintf()
925 struct addr_map_symbol *to = &he->branch_info->to; in hist_entry__sym_to_snprintf()
927 return _hist_entry__sym_snprintf(&to->ms, to->al_addr, in hist_entry__sym_to_snprintf()
928 he->level, bf, size, width); in hist_entry__sym_to_snprintf()
931 return repsep_snprintf(bf, size, "%-*.*s", width, width, "N/A"); in hist_entry__sym_to_snprintf()
940 return -1; in hist_entry__sym_from_filter()
942 return sym && !(he->branch_info && he->branch_info->from.ms.sym && in hist_entry__sym_from_filter()
943 strstr(he->branch_info->from.ms.sym->name, sym)); in hist_entry__sym_from_filter()
952 return -1; in hist_entry__sym_to_filter()
954 return sym && !(he->branch_info && he->branch_info->to.ms.sym && in hist_entry__sym_to_filter()
955 strstr(he->branch_info->to.ms.sym->name, sym)); in hist_entry__sym_to_filter()
995 if (!left->branch_info || !right->branch_info) in sort__mispredict_cmp()
996 return cmp_null(left->branch_info, right->branch_info); in sort__mispredict_cmp()
998 mp = left->branch_info->flags.mispred != right->branch_info->flags.mispred; in sort__mispredict_cmp()
999 p = left->branch_info->flags.predicted != right->branch_info->flags.predicted; in sort__mispredict_cmp()
1007 if (he->branch_info) { in hist_entry__mispredict_snprintf()
1008 if (he->branch_info->flags.predicted) in hist_entry__mispredict_snprintf()
1010 else if (he->branch_info->flags.mispred) in hist_entry__mispredict_snprintf()
1014 return repsep_snprintf(bf, size, "%-*.*s", width, width, out); in hist_entry__mispredict_snprintf()
1020 if (!left->branch_info || !right->branch_info) in sort__cycles_cmp()
1021 return cmp_null(left->branch_info, right->branch_info); in sort__cycles_cmp()
1023 return left->branch_info->flags.cycles - in sort__cycles_cmp()
1024 right->branch_info->flags.cycles; in sort__cycles_cmp()
1030 if (!he->branch_info) in hist_entry__cycles_snprintf()
1031 return scnprintf(bf, size, "%-.*s", width, "N/A"); in hist_entry__cycles_snprintf()
1032 if (he->branch_info->flags.cycles == 0) in hist_entry__cycles_snprintf()
1033 return repsep_snprintf(bf, size, "%-*s", width, "-"); in hist_entry__cycles_snprintf()
1034 return repsep_snprintf(bf, size, "%-*hd", width, in hist_entry__cycles_snprintf()
1035 he->branch_info->flags.cycles); in hist_entry__cycles_snprintf()
1045 /* --sort daddr_sym */
1051 if (left->mem_info) in sort__daddr_cmp()
1052 l = left->mem_info->daddr.addr; in sort__daddr_cmp()
1053 if (right->mem_info) in sort__daddr_cmp()
1054 r = right->mem_info->daddr.addr; in sort__daddr_cmp()
1056 return (int64_t)(r - l); in sort__daddr_cmp()
1065 if (he->mem_info) { in hist_entry__daddr_snprintf()
1066 addr = he->mem_info->daddr.addr; in hist_entry__daddr_snprintf()
1067 ms = &he->mem_info->daddr.ms; in hist_entry__daddr_snprintf()
1069 return _hist_entry__sym_snprintf(ms, addr, he->level, bf, size, width); in hist_entry__daddr_snprintf()
1077 if (left->mem_info) in sort__iaddr_cmp()
1078 l = left->mem_info->iaddr.addr; in sort__iaddr_cmp()
1079 if (right->mem_info) in sort__iaddr_cmp()
1080 r = right->mem_info->iaddr.addr; in sort__iaddr_cmp()
1082 return (int64_t)(r - l); in sort__iaddr_cmp()
1091 if (he->mem_info) { in hist_entry__iaddr_snprintf()
1092 addr = he->mem_info->iaddr.addr; in hist_entry__iaddr_snprintf()
1093 ms = &he->mem_info->iaddr.ms; in hist_entry__iaddr_snprintf()
1095 return _hist_entry__sym_snprintf(ms, addr, he->level, bf, size, width); in hist_entry__iaddr_snprintf()
1104 if (left->mem_info) in sort__dso_daddr_cmp()
1105 map_l = left->mem_info->daddr.ms.map; in sort__dso_daddr_cmp()
1106 if (right->mem_info) in sort__dso_daddr_cmp()
1107 map_r = right->mem_info->daddr.ms.map; in sort__dso_daddr_cmp()
1117 if (he->mem_info) in hist_entry__dso_daddr_snprintf()
1118 map = he->mem_info->daddr.ms.map; in hist_entry__dso_daddr_snprintf()
1129 if (left->mem_info) in sort__locked_cmp()
1130 data_src_l = left->mem_info->data_src; in sort__locked_cmp()
1134 if (right->mem_info) in sort__locked_cmp()
1135 data_src_r = right->mem_info->data_src; in sort__locked_cmp()
1139 return (int64_t)(data_src_r.mem_lock - data_src_l.mem_lock); in sort__locked_cmp()
1147 perf_mem__lck_scnprintf(out, sizeof(out), he->mem_info); in hist_entry__locked_snprintf()
1157 if (left->mem_info) in sort__tlb_cmp()
1158 data_src_l = left->mem_info->data_src; in sort__tlb_cmp()
1162 if (right->mem_info) in sort__tlb_cmp()
1163 data_src_r = right->mem_info->data_src; in sort__tlb_cmp()
1167 return (int64_t)(data_src_r.mem_dtlb - data_src_l.mem_dtlb); in sort__tlb_cmp()
1175 perf_mem__tlb_scnprintf(out, sizeof(out), he->mem_info); in hist_entry__tlb_snprintf()
1176 return repsep_snprintf(bf, size, "%-*s", width, out); in hist_entry__tlb_snprintf()
1185 if (left->mem_info) in sort__lvl_cmp()
1186 data_src_l = left->mem_info->data_src; in sort__lvl_cmp()
1190 if (right->mem_info) in sort__lvl_cmp()
1191 data_src_r = right->mem_info->data_src; in sort__lvl_cmp()
1195 return (int64_t)(data_src_r.mem_lvl - data_src_l.mem_lvl); in sort__lvl_cmp()
1203 perf_mem__lvl_scnprintf(out, sizeof(out), he->mem_info); in hist_entry__lvl_snprintf()
1204 return repsep_snprintf(bf, size, "%-*s", width, out); in hist_entry__lvl_snprintf()
1213 if (left->mem_info) in sort__snoop_cmp()
1214 data_src_l = left->mem_info->data_src; in sort__snoop_cmp()
1218 if (right->mem_info) in sort__snoop_cmp()
1219 data_src_r = right->mem_info->data_src; in sort__snoop_cmp()
1223 return (int64_t)(data_src_r.mem_snoop - data_src_l.mem_snoop); in sort__snoop_cmp()
1231 perf_mem__snp_scnprintf(out, sizeof(out), he->mem_info); in hist_entry__snoop_snprintf()
1232 return repsep_snprintf(bf, size, "%-*s", width, out); in hist_entry__snoop_snprintf()
1242 if (!left->mem_info) return -1; in sort__dcacheline_cmp()
1243 if (!right->mem_info) return 1; in sort__dcacheline_cmp()
1246 if (left->cpumode > right->cpumode) return -1; in sort__dcacheline_cmp()
1247 if (left->cpumode < right->cpumode) return 1; in sort__dcacheline_cmp()
1249 l_map = left->mem_info->daddr.ms.map; in sort__dcacheline_cmp()
1250 r_map = right->mem_info->daddr.ms.map; in sort__dcacheline_cmp()
1256 if (!l_map) return -1; in sort__dcacheline_cmp()
1259 rc = dso__cmp_id(l_map->dso, r_map->dso); in sort__dcacheline_cmp()
1266 * The kernel and non-zero major/minor mapped areas are in sort__dcacheline_cmp()
1270 if ((left->cpumode != PERF_RECORD_MISC_KERNEL) && in sort__dcacheline_cmp()
1271 (!(l_map->flags & MAP_SHARED)) && in sort__dcacheline_cmp()
1272 !l_map->dso->id.maj && !l_map->dso->id.min && in sort__dcacheline_cmp()
1273 !l_map->dso->id.ino && !l_map->dso->id.ino_generation) { in sort__dcacheline_cmp()
1276 if (left->thread->pid_ > right->thread->pid_) return -1; in sort__dcacheline_cmp()
1277 if (left->thread->pid_ < right->thread->pid_) return 1; in sort__dcacheline_cmp()
1281 /* al_addr does all the right addr - start + offset calculations */ in sort__dcacheline_cmp()
1282 l = cl_address(left->mem_info->daddr.al_addr); in sort__dcacheline_cmp()
1283 r = cl_address(right->mem_info->daddr.al_addr); in sort__dcacheline_cmp()
1285 if (l > r) return -1; in sort__dcacheline_cmp()
1297 char level = he->level; in hist_entry__dcacheline_snprintf()
1299 if (he->mem_info) { in hist_entry__dcacheline_snprintf()
1300 struct map *map = he->mem_info->daddr.ms.map; in hist_entry__dcacheline_snprintf()
1302 addr = cl_address(he->mem_info->daddr.al_addr); in hist_entry__dcacheline_snprintf()
1303 ms = &he->mem_info->daddr.ms; in hist_entry__dcacheline_snprintf()
1306 if ((he->cpumode != PERF_RECORD_MISC_KERNEL) && in hist_entry__dcacheline_snprintf()
1307 map && !(map->prot & PROT_EXEC) && in hist_entry__dcacheline_snprintf()
1308 (map->flags & MAP_SHARED) && in hist_entry__dcacheline_snprintf()
1309 (map->dso->id.maj || map->dso->id.min || in hist_entry__dcacheline_snprintf()
1310 map->dso->id.ino || map->dso->id.ino_generation)) in hist_entry__dcacheline_snprintf()
1327 return he->stat.nr_events ? he->stat.weight / he->stat.nr_events : 0; in he_weight()
1333 return he_weight(left) - he_weight(right); in sort__local_weight_cmp()
1339 return repsep_snprintf(bf, size, "%-*llu", width, he_weight(he)); in hist_entry__local_weight_snprintf()
1352 return left->stat.weight - right->stat.weight; in sort__global_weight_cmp()
1358 return repsep_snprintf(bf, size, "%-*llu", width, he->stat.weight); in hist_entry__global_weight_snprintf()
1429 if (left->mem_info) in sort__phys_daddr_cmp()
1430 l = left->mem_info->daddr.phys_addr; in sort__phys_daddr_cmp()
1431 if (right->mem_info) in sort__phys_daddr_cmp()
1432 r = right->mem_info->daddr.phys_addr; in sort__phys_daddr_cmp()
1434 return (int64_t)(r - l); in sort__phys_daddr_cmp()
1444 addr = he->mem_info->daddr.phys_addr; in hist_entry__phys_daddr_snprintf()
1446 ret += repsep_snprintf(bf + ret, size - ret, "[%c] ", he->level); in hist_entry__phys_daddr_snprintf()
1448 ret += repsep_snprintf(bf + ret, size - ret, "%-#.*llx", len, addr); in hist_entry__phys_daddr_snprintf()
1450 ret += repsep_snprintf(bf + ret, size - ret, "%-*s", width - ret, ""); in hist_entry__phys_daddr_snprintf()
1468 if (!left->branch_info || !right->branch_info) in sort__abort_cmp()
1469 return cmp_null(left->branch_info, right->branch_info); in sort__abort_cmp()
1471 return left->branch_info->flags.abort != in sort__abort_cmp()
1472 right->branch_info->flags.abort; in sort__abort_cmp()
1480 if (he->branch_info) { in hist_entry__abort_snprintf()
1481 if (he->branch_info->flags.abort) in hist_entry__abort_snprintf()
1487 return repsep_snprintf(bf, size, "%-*s", width, out); in hist_entry__abort_snprintf()
1500 if (!left->branch_info || !right->branch_info) in sort__in_tx_cmp()
1501 return cmp_null(left->branch_info, right->branch_info); in sort__in_tx_cmp()
1503 return left->branch_info->flags.in_tx != in sort__in_tx_cmp()
1504 right->branch_info->flags.in_tx; in sort__in_tx_cmp()
1512 if (he->branch_info) { in hist_entry__in_tx_snprintf()
1513 if (he->branch_info->flags.in_tx) in hist_entry__in_tx_snprintf()
1519 return repsep_snprintf(bf, size, "%-*s", width, out); in hist_entry__in_tx_snprintf()
1532 return left->transaction - right->transaction; in sort__transaction_cmp()
1552 { PERF_TXN_CAPACITY_WRITE, "CAP-WRITE ", 1 },
1553 { PERF_TXN_CAPACITY_READ, "CAP-READ ", 0 },
1573 u64 t = he->transaction; in hist_entry__transaction_snprintf()
1591 return repsep_snprintf(bf, size, "%-*s", width, buf); in hist_entry__transaction_snprintf()
1601 /* --sort symbol_size */
1608 return size_l < size_r ? -1 : in _sort__sym_size_cmp()
1615 return _sort__sym_size_cmp(right->ms.sym, left->ms.sym); in sort__sym_size_cmp()
1630 return _hist_entry__sym_size_snprintf(he->ms.sym, bf, size, width); in hist_entry__sym_size_snprintf()
1640 /* --sort dso_size */
1647 return size_l < size_r ? -1 : in _sort__dso_size_cmp()
1654 return _sort__dso_size_cmp(right->ms.map, left->ms.map); in sort__dso_size_cmp()
1660 if (map && map->dso) in _hist_entry__dso_size_snprintf()
1670 return _hist_entry__dso_size_snprintf(he->ms.map, bf, size, width); in hist_entry__dso_size_snprintf()
1713 #define DIM(d, n, func) [d - __SORT_BRANCH_STACK] = { .name = n, .entry = &(func) }
1731 #define DIM(d, n, func) [d - __SORT_MEMORY_MODE] = { .name = n, .entry = &(func) }
1781 hists__new_col_len(hists, hse->se->se_width_idx, strlen(fmt->name)); in perf_hpp__reset_sort_width()
1789 size_t len = fmt->user_len; in __sort__hpp_header()
1794 len = hists__col_len(hists, hse->se->se_width_idx); in __sort__hpp_header()
1796 return scnprintf(hpp->buf, hpp->size, "%-*.*s", len, len, fmt->name); in __sort__hpp_header()
1804 size_t len = fmt->user_len; in __sort__hpp_width()
1809 len = hists__col_len(hists, hse->se->se_width_idx); in __sort__hpp_width()
1818 size_t len = fmt->user_len; in __sort__hpp_entry()
1823 len = hists__col_len(he->hists, hse->se->se_width_idx); in __sort__hpp_entry()
1825 return hse->se->se_snprintf(he, hpp->buf, hpp->size, len); in __sort__hpp_entry()
1834 return hse->se->se_cmp(a, b); in __sort__hpp_cmp()
1844 collapse_fn = hse->se->se_collapse ?: hse->se->se_cmp; in __sort__hpp_collapse()
1855 sort_fn = hse->se->se_sort ?: hse->se->se_cmp; in __sort__hpp_sort()
1861 return format->header == __sort__hpp_header; in perf_hpp__is_sort_entry()
1873 return hse->se == &sort_ ## key ; \
1896 return hse_a->se == hse_b->se; in MK_SORT_ENTRY_CHK()
1918 hse->se = sd->entry; in __sort_dimension__alloc_hpp()
1919 hse->hpp.name = sd->entry->se_header; in __sort_dimension__alloc_hpp()
1920 hse->hpp.header = __sort__hpp_header; in __sort_dimension__alloc_hpp()
1921 hse->hpp.width = __sort__hpp_width; in __sort_dimension__alloc_hpp()
1922 hse->hpp.entry = __sort__hpp_entry; in __sort_dimension__alloc_hpp()
1923 hse->hpp.color = NULL; in __sort_dimension__alloc_hpp()
1925 hse->hpp.cmp = __sort__hpp_cmp; in __sort_dimension__alloc_hpp()
1926 hse->hpp.collapse = __sort__hpp_collapse; in __sort_dimension__alloc_hpp()
1927 hse->hpp.sort = __sort__hpp_sort; in __sort_dimension__alloc_hpp()
1928 hse->hpp.equal = __sort__hpp_equal; in __sort_dimension__alloc_hpp()
1929 hse->hpp.free = hse_free; in __sort_dimension__alloc_hpp()
1931 INIT_LIST_HEAD(&hse->hpp.list); in __sort_dimension__alloc_hpp()
1932 INIT_LIST_HEAD(&hse->hpp.sort_list); in __sort_dimension__alloc_hpp()
1933 hse->hpp.elide = false; in __sort_dimension__alloc_hpp()
1934 hse->hpp.len = 0; in __sort_dimension__alloc_hpp()
1935 hse->hpp.user_len = 0; in __sort_dimension__alloc_hpp()
1936 hse->hpp.level = level; in __sort_dimension__alloc_hpp()
1946 static struct perf_hpp_fmt *__hpp_dimension__alloc_hpp(struct hpp_dimension *hd, in __hpp_dimension__alloc_hpp() argument
1951 fmt = memdup(hd->fmt, sizeof(*fmt)); in __hpp_dimension__alloc_hpp()
1953 INIT_LIST_HEAD(&fmt->list); in __hpp_dimension__alloc_hpp()
1954 INIT_LIST_HEAD(&fmt->sort_list); in __hpp_dimension__alloc_hpp()
1955 fmt->free = hpp_free; in __hpp_dimension__alloc_hpp()
1956 fmt->level = level; in __hpp_dimension__alloc_hpp()
1966 int ret = -1; in hist_entry__filter()
1969 perf_hpp_list__for_each_format(he->hpp_list, fmt) { in hist_entry__filter()
1974 if (hse->se->se_filter == NULL) in hist_entry__filter()
1979 * is applied. But it should skip non-matched filter types. in hist_entry__filter()
1981 r = hse->se->se_filter(he, type, arg); in hist_entry__filter()
1999 return -1; in __sort_dimension__add_hpp_sort()
2001 perf_hpp_list__register_sort_field(list, &hse->hpp); in __sort_dimension__add_hpp_sort()
2011 return -1; in __sort_dimension__add_hpp_output()
2013 perf_hpp_list__column_register(list, &hse->hpp); in __sort_dimension__add_hpp_output()
2027 if (!hde->hpp.len) { in hde_width()
2028 int len = hde->dynamic_len; in hde_width()
2029 int namelen = strlen(hde->field->name); in hde_width()
2030 int fieldlen = hde->field->size; in hde_width()
2035 if (!(hde->field->flags & TEP_FIELD_IS_STRING)) { in hde_width()
2037 fieldlen = hde->field->size * 2 + 2; in hde_width()
2042 hde->hpp.len = len; in hde_width()
2044 return hde->hpp.len; in hde_width()
2051 struct tep_format_field *field = hde->field; in update_dynamic_len()
2055 if (hde->raw_trace) in update_dynamic_len()
2059 if (!he->trace_output) in update_dynamic_len()
2060 he->trace_output = get_trace_output(he); in update_dynamic_len()
2062 namelen = strlen(field->name); in update_dynamic_len()
2063 str = he->trace_output; in update_dynamic_len()
2072 if (!strncmp(str, field->name, namelen)) { in update_dynamic_len()
2076 len = pos - str; in update_dynamic_len()
2078 if (len > hde->dynamic_len) in update_dynamic_len()
2079 hde->dynamic_len = len; in update_dynamic_len()
2096 size_t len = fmt->user_len; in __sort__hde_header()
2103 return scnprintf(hpp->buf, hpp->size, "%*.*s", len, len, hde->field->name); in __sort__hde_header()
2111 size_t len = fmt->user_len; in __sort__hde_width()
2127 return hists_to_evsel(hists) == hde->evsel; in perf_hpp__defined_dynamic_entry()
2134 size_t len = fmt->user_len; in __sort__hde_entry()
2146 if (hde->raw_trace) in __sort__hde_entry()
2149 if (!he->trace_output) in __sort__hde_entry()
2150 he->trace_output = get_trace_output(he); in __sort__hde_entry()
2152 field = hde->field; in __sort__hde_entry()
2153 namelen = strlen(field->name); in __sort__hde_entry()
2154 str = he->trace_output; in __sort__hde_entry()
2163 if (!strncmp(str, field->name, namelen)) { in __sort__hde_entry()
2165 str = strndup(str, pos - str); in __sort__hde_entry()
2168 return scnprintf(hpp->buf, hpp->size, in __sort__hde_entry()
2183 tep_print_field(&seq, he->raw_data, hde->field); in __sort__hde_entry()
2187 ret = scnprintf(hpp->buf, hpp->size, "%*.*s", len, len, str); in __sort__hde_entry()
2206 field = hde->field; in __sort__hde_cmp()
2207 if (field->flags & TEP_FIELD_IS_DYNAMIC) { in __sort__hde_cmp()
2210 tep_read_number_field(field, a->raw_data, &dyn); in __sort__hde_cmp()
2215 if (size > hde->dynamic_len) in __sort__hde_cmp()
2216 hde->dynamic_len = size; in __sort__hde_cmp()
2218 offset = field->offset; in __sort__hde_cmp()
2219 size = field->size; in __sort__hde_cmp()
2222 return memcmp(a->raw_data + offset, b->raw_data + offset, size); in __sort__hde_cmp()
2227 return fmt->cmp == __sort__hde_cmp; in perf_hpp__is_dynamic_entry()
2241 return hde_a->field == hde_b->field; in __sort__hde_equal()
2264 hde->evsel = evsel; in __alloc_dynamic_entry()
2265 hde->field = field; in __alloc_dynamic_entry()
2266 hde->dynamic_len = 0; in __alloc_dynamic_entry()
2268 hde->hpp.name = field->name; in __alloc_dynamic_entry()
2269 hde->hpp.header = __sort__hde_header; in __alloc_dynamic_entry()
2270 hde->hpp.width = __sort__hde_width; in __alloc_dynamic_entry()
2271 hde->hpp.entry = __sort__hde_entry; in __alloc_dynamic_entry()
2272 hde->hpp.color = NULL; in __alloc_dynamic_entry()
2274 hde->hpp.cmp = __sort__hde_cmp; in __alloc_dynamic_entry()
2275 hde->hpp.collapse = __sort__hde_cmp; in __alloc_dynamic_entry()
2276 hde->hpp.sort = __sort__hde_cmp; in __alloc_dynamic_entry()
2277 hde->hpp.equal = __sort__hde_equal; in __alloc_dynamic_entry()
2278 hde->hpp.free = hde_free; in __alloc_dynamic_entry()
2280 INIT_LIST_HEAD(&hde->hpp.list); in __alloc_dynamic_entry()
2281 INIT_LIST_HEAD(&hde->hpp.sort_list); in __alloc_dynamic_entry()
2282 hde->hpp.elide = false; in __alloc_dynamic_entry()
2283 hde->hpp.len = 0; in __alloc_dynamic_entry()
2284 hde->hpp.user_len = 0; in __alloc_dynamic_entry()
2285 hde->hpp.level = level; in __alloc_dynamic_entry()
2300 new_fmt = &new_hse->hpp; in perf_hpp_fmt__dup()
2307 new_fmt = &new_hde->hpp; in perf_hpp_fmt__dup()
2312 INIT_LIST_HEAD(&new_fmt->list); in perf_hpp_fmt__dup()
2313 INIT_LIST_HEAD(&new_fmt->sort_list); in perf_hpp_fmt__dup()
2345 * 2. full event name (e.g. sched:sched_switch)
2358 if (nr > evlist->core.nr_entries) in find_evsel()
2362 while (--nr > 0) in find_evsel()
2371 if (full_name && !strcmp(pos->name, event_name)) in find_evsel()
2374 if (!full_name && strstr(pos->name, event_name)) { in find_evsel()
2377 event_name, evsel->name, pos->name); in find_evsel()
2395 return -ENOMEM; in __dynamic_dimension__add()
2397 hde->raw_trace = raw_trace; in __dynamic_dimension__add()
2399 perf_hpp__register_sort_field(&hde->hpp); in __dynamic_dimension__add()
2408 field = evsel->tp_format->format.fields; in add_evsel_fields()
2414 field = field->next; in add_evsel_fields()
2426 if (evsel->core.attr.type != PERF_TYPE_TRACEPOINT) in add_all_dynamic_fields()
2439 int ret = -ESRCH; in add_all_matching_fields()
2444 if (evsel->core.attr.type != PERF_TYPE_TRACEPOINT) in add_all_matching_fields()
2447 field = tep_find_any_field(evsel->tp_format, field_name); in add_all_matching_fields()
2468 return -ENOENT; in add_dynamic_entry()
2472 return -ENOMEM; in add_dynamic_entry()
2475 ret = -EINVAL; in add_dynamic_entry()
2482 ret = -EINVAL; in add_dynamic_entry()
2501 ret = -ENOENT; in add_dynamic_entry()
2505 if (evsel->core.attr.type != PERF_TYPE_TRACEPOINT) { in add_dynamic_entry()
2507 ret = -EINVAL; in add_dynamic_entry()
2514 field = tep_find_any_field(evsel->tp_format, field_name); in add_dynamic_entry()
2518 return -ENOENT; in add_dynamic_entry()
2533 if (sd->taken) in __sort_dimension__add()
2537 return -1; in __sort_dimension__add()
2539 if (sd->entry->se_collapse) in __sort_dimension__add()
2540 list->need_collapse = 1; in __sort_dimension__add()
2542 sd->taken = 1; in __sort_dimension__add()
2547 static int __hpp_dimension__add(struct hpp_dimension *hd, in __hpp_dimension__add() argument
2553 if (hd->taken) in __hpp_dimension__add()
2556 fmt = __hpp_dimension__alloc_hpp(hd, level); in __hpp_dimension__add()
2558 return -1; in __hpp_dimension__add()
2560 hd->taken = 1; in __hpp_dimension__add()
2568 if (sd->taken) in __sort_dimension__add_output()
2572 return -1; in __sort_dimension__add_output()
2574 sd->taken = 1; in __sort_dimension__add_output()
2579 struct hpp_dimension *hd) in __hpp_dimension__add_output() argument
2583 if (hd->taken) in __hpp_dimension__add_output()
2586 fmt = __hpp_dimension__alloc_hpp(hd, 0); in __hpp_dimension__add_output()
2588 return -1; in __hpp_dimension__add_output()
2590 hd->taken = 1; in __hpp_dimension__add_output()
2610 if (strncasecmp(tok, sd->name, strlen(tok))) in sort_dimension__add()
2613 if (sd->entry == &sort_parent) { in sort_dimension__add()
2620 return -EINVAL; in sort_dimension__add()
2622 list->parent = 1; in sort_dimension__add()
2623 } else if (sd->entry == &sort_sym) { in sort_dimension__add()
2624 list->sym = 1; in sort_dimension__add()
2632 sd->entry->se_collapse = sort__sym_sort; in sort_dimension__add()
2634 } else if (sd->entry == &sort_dso) { in sort_dimension__add()
2635 list->dso = 1; in sort_dimension__add()
2636 } else if (sd->entry == &sort_socket) { in sort_dimension__add()
2637 list->socket = 1; in sort_dimension__add()
2638 } else if (sd->entry == &sort_thread) { in sort_dimension__add()
2639 list->thread = 1; in sort_dimension__add()
2640 } else if (sd->entry == &sort_comm) { in sort_dimension__add()
2641 list->comm = 1; in sort_dimension__add()
2648 struct hpp_dimension *hd = &hpp_sort_dimensions[i]; in sort_dimension__add() local
2650 if (strncasecmp(tok, hd->name, strlen(tok))) in sort_dimension__add()
2653 return __hpp_dimension__add(hd, list, level); in sort_dimension__add()
2659 if (strncasecmp(tok, sd->name, strlen(tok))) in sort_dimension__add()
2663 return -EINVAL; in sort_dimension__add()
2665 if (sd->entry == &sort_sym_from || sd->entry == &sort_sym_to) in sort_dimension__add()
2666 list->sym = 1; in sort_dimension__add()
2675 if (strncasecmp(tok, sd->name, strlen(tok))) in sort_dimension__add()
2679 return -EINVAL; in sort_dimension__add()
2681 if (sd->entry == &sort_mem_dcacheline && cacheline_size() == 0) in sort_dimension__add()
2682 return -EINVAL; in sort_dimension__add()
2684 if (sd->entry == &sort_mem_daddr_sym) in sort_dimension__add()
2685 list->sym = 1; in sort_dimension__add()
2694 return -ESRCH; in sort_dimension__add()
2726 if (ret == -EINVAL) { in setup_sort_list()
2728 …ui__error("The \"dcacheline\" --sort key needs to know the cacheline size and it couldn't be deter… in setup_sort_list()
2730 ui__error("Invalid --sort key: `%s'", tok); in setup_sort_list()
2732 } else if (ret == -ESRCH) { in setup_sort_list()
2733 ui__error("Unknown --sort key: `%s'", tok); in setup_sort_list()
2763 if (evsel->core.attr.type != PERF_TYPE_TRACEPOINT) { in get_default_sort_order()
2783 * Append '+'-prefixed sort order to the default sort in setup_sort_order()
2790 ui__error("Invalid --sort key: `+'"); in setup_sort_order()
2791 return -EINVAL; in setup_sort_order()
2800 pr_err("Not enough memory to set up --sort"); in setup_sort_order()
2801 return -ENOMEM; in setup_sort_order()
2865 return -ENOMEM; in __setup_sorting()
2875 return -ENOMEM; in __setup_sorting()
2895 if (hse->se->se_width_idx == idx) { in perf_hpp__set_elide()
2896 fmt->elide = elide; in perf_hpp__set_elide()
2907 strlist__entry(list, 0)->s); in __get_elide()
2955 fmt->elide = get_elide(hse->se->se_width_idx, output); in sort__setup_elide()
2966 if (!fmt->elide) in sort__setup_elide()
2974 fmt->elide = false; in sort__setup_elide()
2985 if (strncasecmp(tok, sd->name, strlen(tok))) in output_field_add()
2992 struct hpp_dimension *hd = &hpp_sort_dimensions[i]; in output_field_add() local
2994 if (strncasecmp(tok, hd->name, strlen(tok))) in output_field_add()
2997 return __hpp_dimension__add_output(list, hd); in output_field_add()
3003 if (strncasecmp(tok, sd->name, strlen(tok))) in output_field_add()
3007 return -EINVAL; in output_field_add()
3015 if (strncasecmp(tok, sd->name, strlen(tok))) in output_field_add()
3019 return -EINVAL; in output_field_add()
3024 return -ESRCH; in output_field_add()
3035 if (ret == -EINVAL) { in setup_output_list()
3036 ui__error("Invalid --fields key: `%s'", tok); in setup_output_list()
3038 } else if (ret == -ESRCH) { in setup_output_list()
3039 ui__error("Unknown --fields key: `%s'", tok); in setup_output_list()
3072 int ret = -EINVAL; in __setup_output_field()
3080 return -ENOMEM; in __setup_output_field()
3087 ui__error("Invalid --fields key: `+'"); in __setup_output_field()
3107 err = sort_dimension__add(&perf_hpp_list, "parent", evlist, -1); in setup_sorting()
3129 /* setup hists-specific output fields */ in setup_sorting()
3131 return -1; in setup_sorting()