Lines Matching refs:he
84 static int hist_entry__thread_snprintf(struct hist_entry *he, char *bf, in hist_entry__thread_snprintf() argument
87 const char *comm = thread__comm_str(he->thread); in hist_entry__thread_snprintf()
90 return repsep_snprintf(bf, size, "%7d:%-*.*s", he->thread->tid, in hist_entry__thread_snprintf()
94 static int hist_entry__thread_filter(struct hist_entry *he, int type, const void *arg) in hist_entry__thread_filter() argument
101 return th && he->thread != th; in hist_entry__thread_filter()
137 static int hist_entry__comm_snprintf(struct hist_entry *he, char *bf, in hist_entry__comm_snprintf() argument
140 return repsep_snprintf(bf, size, "%-*.*s", width, width, comm__str(he->comm)); in hist_entry__comm_snprintf()
193 static int hist_entry__dso_snprintf(struct hist_entry *he, char *bf, in hist_entry__dso_snprintf() argument
196 return _hist_entry__dso_snprintf(he->ms.map, bf, size, width); in hist_entry__dso_snprintf()
199 static int hist_entry__dso_filter(struct hist_entry *he, int type, const void *arg) in hist_entry__dso_filter() argument
206 return dso && (!he->ms.map || he->ms.map->dso != dso); in hist_entry__dso_filter()
306 static int hist_entry__sym_snprintf(struct hist_entry *he, char *bf, in hist_entry__sym_snprintf() argument
309 return _hist_entry__sym_snprintf(he->ms.map, he->ms.sym, he->ip, in hist_entry__sym_snprintf()
310 he->level, bf, size, width); in hist_entry__sym_snprintf()
313 static int hist_entry__sym_filter(struct hist_entry *he, int type, const void *arg) in hist_entry__sym_filter() argument
320 return sym && (!he->ms.sym || !strstr(he->ms.sym->name, sym)); in hist_entry__sym_filter()
334 char *hist_entry__srcline(struct hist_entry *he) in hist_entry__srcline() argument
336 return map__srcline(he->ms.map, he->ip, he->ms.sym); in hist_entry__srcline()
350 static int hist_entry__srcline_snprintf(struct hist_entry *he, char *bf, in hist_entry__srcline_snprintf() argument
353 if (!he->srcline) in hist_entry__srcline_snprintf()
354 he->srcline = hist_entry__srcline(he); in hist_entry__srcline_snprintf()
356 return repsep_snprintf(bf, size, "%-.*s", width, he->srcline); in hist_entry__srcline_snprintf()
385 static int hist_entry__srcline_from_snprintf(struct hist_entry *he, char *bf, in hist_entry__srcline_from_snprintf() argument
388 return repsep_snprintf(bf, size, "%-*.*s", width, width, he->branch_info->srcline_from); in hist_entry__srcline_from_snprintf()
412 static int hist_entry__srcline_to_snprintf(struct hist_entry *he, char *bf, in hist_entry__srcline_to_snprintf() argument
415 return repsep_snprintf(bf, size, "%-*.*s", width, width, he->branch_info->srcline_to); in hist_entry__srcline_to_snprintf()
461 static int hist_entry__srcfile_snprintf(struct hist_entry *he, char *bf, in hist_entry__srcfile_snprintf() argument
464 if (!he->srcfile) in hist_entry__srcfile_snprintf()
465 he->srcfile = hist_entry__get_srcfile(he); in hist_entry__srcfile_snprintf()
467 return repsep_snprintf(bf, size, "%-.*s", width, he->srcfile); in hist_entry__srcfile_snprintf()
491 static int hist_entry__parent_snprintf(struct hist_entry *he, char *bf, in hist_entry__parent_snprintf() argument
495 he->parent ? he->parent->name : "[other]"); in hist_entry__parent_snprintf()
513 static int hist_entry__cpu_snprintf(struct hist_entry *he, char *bf, in hist_entry__cpu_snprintf() argument
516 return repsep_snprintf(bf, size, "%*.*d", width, width, he->cpu); in hist_entry__cpu_snprintf()
551 static int hist_entry__cgroup_id_snprintf(struct hist_entry *he, in hist_entry__cgroup_id_snprintf() argument
555 return repsep_snprintf(bf, size, "%lu/0x%lx", he->cgroup_id.dev, in hist_entry__cgroup_id_snprintf()
556 he->cgroup_id.ino); in hist_entry__cgroup_id_snprintf()
574 static int hist_entry__socket_snprintf(struct hist_entry *he, char *bf, in hist_entry__socket_snprintf() argument
577 return repsep_snprintf(bf, size, "%*.*d", width, width-3, he->socket); in hist_entry__socket_snprintf()
580 static int hist_entry__socket_filter(struct hist_entry *he, int type, const void *arg) in hist_entry__socket_filter() argument
587 return sk >= 0 && he->socket != sk; in hist_entry__socket_filter()
600 static char *get_trace_output(struct hist_entry *he) in get_trace_output() argument
605 .data = he->raw_data, in get_trace_output()
606 .size = he->raw_size, in get_trace_output()
609 evsel = hists_to_evsel(he->hists); in get_trace_output()
613 tep_print_fields(&seq, he->raw_data, he->raw_size, in get_trace_output()
642 static int hist_entry__trace_snprintf(struct hist_entry *he, char *bf, in hist_entry__trace_snprintf() argument
647 evsel = hists_to_evsel(he->hists); in hist_entry__trace_snprintf()
651 if (he->trace_output == NULL) in hist_entry__trace_snprintf()
652 he->trace_output = get_trace_output(he); in hist_entry__trace_snprintf()
653 return repsep_snprintf(bf, size, "%-.*s", width, he->trace_output); in hist_entry__trace_snprintf()
675 static int hist_entry__dso_from_snprintf(struct hist_entry *he, char *bf, in hist_entry__dso_from_snprintf() argument
678 if (he->branch_info) in hist_entry__dso_from_snprintf()
679 return _hist_entry__dso_snprintf(he->branch_info->from.map, in hist_entry__dso_from_snprintf()
685 static int hist_entry__dso_from_filter(struct hist_entry *he, int type, in hist_entry__dso_from_filter() argument
693 return dso && (!he->branch_info || !he->branch_info->from.map || in hist_entry__dso_from_filter()
694 he->branch_info->from.map->dso != dso); in hist_entry__dso_from_filter()
707 static int hist_entry__dso_to_snprintf(struct hist_entry *he, char *bf, in hist_entry__dso_to_snprintf() argument
710 if (he->branch_info) in hist_entry__dso_to_snprintf()
711 return _hist_entry__dso_snprintf(he->branch_info->to.map, in hist_entry__dso_to_snprintf()
717 static int hist_entry__dso_to_filter(struct hist_entry *he, int type, in hist_entry__dso_to_filter() argument
725 return dso && (!he->branch_info || !he->branch_info->to.map || in hist_entry__dso_to_filter()
726 he->branch_info->to.map->dso != dso); in hist_entry__dso_to_filter()
764 static int hist_entry__sym_from_snprintf(struct hist_entry *he, char *bf, in hist_entry__sym_from_snprintf() argument
767 if (he->branch_info) { in hist_entry__sym_from_snprintf()
768 struct addr_map_symbol *from = &he->branch_info->from; in hist_entry__sym_from_snprintf()
771 he->level, bf, size, width); in hist_entry__sym_from_snprintf()
777 static int hist_entry__sym_to_snprintf(struct hist_entry *he, char *bf, in hist_entry__sym_to_snprintf() argument
780 if (he->branch_info) { in hist_entry__sym_to_snprintf()
781 struct addr_map_symbol *to = &he->branch_info->to; in hist_entry__sym_to_snprintf()
784 he->level, bf, size, width); in hist_entry__sym_to_snprintf()
790 static int hist_entry__sym_from_filter(struct hist_entry *he, int type, in hist_entry__sym_from_filter() argument
798 return sym && !(he->branch_info && he->branch_info->from.sym && in hist_entry__sym_from_filter()
799 strstr(he->branch_info->from.sym->name, sym)); in hist_entry__sym_from_filter()
802 static int hist_entry__sym_to_filter(struct hist_entry *he, int type, in hist_entry__sym_to_filter() argument
810 return sym && !(he->branch_info && he->branch_info->to.sym && in hist_entry__sym_to_filter()
811 strstr(he->branch_info->to.sym->name, sym)); in hist_entry__sym_to_filter()
859 static int hist_entry__mispredict_snprintf(struct hist_entry *he, char *bf, in hist_entry__mispredict_snprintf() argument
863 if (he->branch_info) { in hist_entry__mispredict_snprintf()
864 if (he->branch_info->flags.predicted) in hist_entry__mispredict_snprintf()
866 else if (he->branch_info->flags.mispred) in hist_entry__mispredict_snprintf()
883 static int hist_entry__cycles_snprintf(struct hist_entry *he, char *bf, in hist_entry__cycles_snprintf() argument
886 if (!he->branch_info) in hist_entry__cycles_snprintf()
888 if (he->branch_info->flags.cycles == 0) in hist_entry__cycles_snprintf()
891 he->branch_info->flags.cycles); in hist_entry__cycles_snprintf()
915 static int hist_entry__daddr_snprintf(struct hist_entry *he, char *bf, in hist_entry__daddr_snprintf() argument
922 if (he->mem_info) { in hist_entry__daddr_snprintf()
923 addr = he->mem_info->daddr.addr; in hist_entry__daddr_snprintf()
924 map = he->mem_info->daddr.map; in hist_entry__daddr_snprintf()
925 sym = he->mem_info->daddr.sym; in hist_entry__daddr_snprintf()
927 return _hist_entry__sym_snprintf(map, sym, addr, he->level, bf, size, in hist_entry__daddr_snprintf()
944 static int hist_entry__iaddr_snprintf(struct hist_entry *he, char *bf, in hist_entry__iaddr_snprintf() argument
951 if (he->mem_info) { in hist_entry__iaddr_snprintf()
952 addr = he->mem_info->iaddr.addr; in hist_entry__iaddr_snprintf()
953 map = he->mem_info->iaddr.map; in hist_entry__iaddr_snprintf()
954 sym = he->mem_info->iaddr.sym; in hist_entry__iaddr_snprintf()
956 return _hist_entry__sym_snprintf(map, sym, addr, he->level, bf, size, in hist_entry__iaddr_snprintf()
974 static int hist_entry__dso_daddr_snprintf(struct hist_entry *he, char *bf, in hist_entry__dso_daddr_snprintf() argument
979 if (he->mem_info) in hist_entry__dso_daddr_snprintf()
980 map = he->mem_info->daddr.map; in hist_entry__dso_daddr_snprintf()
1004 static int hist_entry__locked_snprintf(struct hist_entry *he, char *bf, in hist_entry__locked_snprintf() argument
1009 perf_mem__lck_scnprintf(out, sizeof(out), he->mem_info); in hist_entry__locked_snprintf()
1032 static int hist_entry__tlb_snprintf(struct hist_entry *he, char *bf, in hist_entry__tlb_snprintf() argument
1037 perf_mem__tlb_scnprintf(out, sizeof(out), he->mem_info); in hist_entry__tlb_snprintf()
1060 static int hist_entry__lvl_snprintf(struct hist_entry *he, char *bf, in hist_entry__lvl_snprintf() argument
1065 perf_mem__lvl_scnprintf(out, sizeof(out), he->mem_info); in hist_entry__lvl_snprintf()
1088 static int hist_entry__snoop_snprintf(struct hist_entry *he, char *bf, in hist_entry__snoop_snprintf() argument
1093 perf_mem__snp_scnprintf(out, sizeof(out), he->mem_info); in hist_entry__snoop_snprintf()
1161 static int hist_entry__dcacheline_snprintf(struct hist_entry *he, char *bf, in hist_entry__dcacheline_snprintf() argument
1168 char level = he->level; in hist_entry__dcacheline_snprintf()
1170 if (he->mem_info) { in hist_entry__dcacheline_snprintf()
1171 addr = cl_address(he->mem_info->daddr.al_addr); in hist_entry__dcacheline_snprintf()
1172 map = he->mem_info->daddr.map; in hist_entry__dcacheline_snprintf()
1173 sym = he->mem_info->daddr.sym; in hist_entry__dcacheline_snprintf()
1176 if ((he->cpumode != PERF_RECORD_MISC_KERNEL) && in hist_entry__dcacheline_snprintf()
1196 static u64 he_weight(struct hist_entry *he) in he_weight() argument
1198 return he->stat.nr_events ? he->stat.weight / he->stat.nr_events : 0; in he_weight()
1207 static int hist_entry__local_weight_snprintf(struct hist_entry *he, char *bf, in hist_entry__local_weight_snprintf() argument
1210 return repsep_snprintf(bf, size, "%-*llu", width, he_weight(he)); in hist_entry__local_weight_snprintf()
1226 static int hist_entry__global_weight_snprintf(struct hist_entry *he, char *bf, in hist_entry__global_weight_snprintf() argument
1229 return repsep_snprintf(bf, size, "%-*llu", width, he->stat.weight); in hist_entry__global_weight_snprintf()
1308 static int hist_entry__phys_daddr_snprintf(struct hist_entry *he, char *bf, in hist_entry__phys_daddr_snprintf() argument
1315 addr = he->mem_info->daddr.phys_addr; in hist_entry__phys_daddr_snprintf()
1317 ret += repsep_snprintf(bf + ret, size - ret, "[%c] ", he->level); in hist_entry__phys_daddr_snprintf()
1346 static int hist_entry__abort_snprintf(struct hist_entry *he, char *bf, in hist_entry__abort_snprintf() argument
1351 if (he->branch_info) { in hist_entry__abort_snprintf()
1352 if (he->branch_info->flags.abort) in hist_entry__abort_snprintf()
1378 static int hist_entry__in_tx_snprintf(struct hist_entry *he, char *bf, in hist_entry__in_tx_snprintf() argument
1383 if (he->branch_info) { in hist_entry__in_tx_snprintf()
1384 if (he->branch_info->flags.in_tx) in hist_entry__in_tx_snprintf()
1441 static int hist_entry__transaction_snprintf(struct hist_entry *he, char *bf, in hist_entry__transaction_snprintf() argument
1444 u64 t = he->transaction; in hist_entry__transaction_snprintf()
1498 static int hist_entry__sym_size_snprintf(struct hist_entry *he, char *bf, in hist_entry__sym_size_snprintf() argument
1501 return _hist_entry__sym_size_snprintf(he->ms.sym, bf, size, width); in hist_entry__sym_size_snprintf()
1538 static int hist_entry__dso_size_snprintf(struct hist_entry *he, char *bf, in hist_entry__dso_size_snprintf() argument
1541 return _hist_entry__dso_size_snprintf(he->ms.map, bf, size, width); in hist_entry__dso_size_snprintf()
1682 struct hist_entry *he) in __sort__hpp_entry() argument
1690 len = hists__col_len(he->hists, hse->se->se_width_idx); in __sort__hpp_entry()
1692 return hse->se->se_snprintf(he, hpp->buf, hpp->size, len); in __sort__hpp_entry()
1829 int hist_entry__filter(struct hist_entry *he, int type, const void *arg) in hist_entry__filter() argument
1836 perf_hpp_list__for_each_format(he->hpp_list, fmt) { in hist_entry__filter()
1848 r = hse->se->se_filter(he, type, arg); in hist_entry__filter()
1915 struct hist_entry *he) in update_dynamic_len() argument
1926 if (!he->trace_output) in update_dynamic_len()
1927 he->trace_output = get_trace_output(he); in update_dynamic_len()
1930 str = he->trace_output; in update_dynamic_len()
1998 struct hist_entry *he) in __sort__hde_entry() argument
2016 if (!he->trace_output) in __sort__hde_entry()
2017 he->trace_output = get_trace_output(he); in __sort__hde_entry()
2021 str = he->trace_output; in __sort__hde_entry()
2050 tep_print_field(&seq, he->raw_data, hde->field); in __sort__hde_entry()