• Home
  • Raw
  • Download

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()
134 static int hist_entry__comm_snprintf(struct hist_entry *he, char *bf, in hist_entry__comm_snprintf() argument
137 return repsep_snprintf(bf, size, "%-*.*s", width, width, comm__str(he->comm)); in hist_entry__comm_snprintf()
190 static int hist_entry__dso_snprintf(struct hist_entry *he, char *bf, in hist_entry__dso_snprintf() argument
193 return _hist_entry__dso_snprintf(he->ms.map, bf, size, width); in hist_entry__dso_snprintf()
196 static int hist_entry__dso_filter(struct hist_entry *he, int type, const void *arg) in hist_entry__dso_filter() argument
203 return dso && (!he->ms.map || he->ms.map->dso != dso); in hist_entry__dso_filter()
297 static int hist_entry__sym_snprintf(struct hist_entry *he, char *bf, in hist_entry__sym_snprintf() argument
300 return _hist_entry__sym_snprintf(he->ms.map, he->ms.sym, he->ip, in hist_entry__sym_snprintf()
301 he->level, bf, size, width); in hist_entry__sym_snprintf()
304 static int hist_entry__sym_filter(struct hist_entry *he, int type, const void *arg) in hist_entry__sym_filter() argument
311 return sym && (!he->ms.sym || !strstr(he->ms.sym->name, sym)); in hist_entry__sym_filter()
325 char *hist_entry__get_srcline(struct hist_entry *he) in hist_entry__get_srcline() argument
327 struct map *map = he->ms.map; in hist_entry__get_srcline()
332 return get_srcline(map->dso, map__rip_2objdump(map, he->ip), in hist_entry__get_srcline()
333 he->ms.sym, true, true); in hist_entry__get_srcline()
347 static int hist_entry__srcline_snprintf(struct hist_entry *he, char *bf, in hist_entry__srcline_snprintf() argument
350 if (!he->srcline) in hist_entry__srcline_snprintf()
351 he->srcline = hist_entry__get_srcline(he); in hist_entry__srcline_snprintf()
353 return repsep_snprintf(bf, size, "%-.*s", width, he->srcline); in hist_entry__srcline_snprintf()
393 static int hist_entry__srcline_from_snprintf(struct hist_entry *he, char *bf, in hist_entry__srcline_from_snprintf() argument
396 return repsep_snprintf(bf, size, "%-*.*s", width, width, he->branch_info->srcline_from); in hist_entry__srcline_from_snprintf()
436 static int hist_entry__srcline_to_snprintf(struct hist_entry *he, char *bf, in hist_entry__srcline_to_snprintf() argument
439 return repsep_snprintf(bf, size, "%-*.*s", width, width, he->branch_info->srcline_to); in hist_entry__srcline_to_snprintf()
485 static int hist_entry__srcfile_snprintf(struct hist_entry *he, char *bf, in hist_entry__srcfile_snprintf() argument
488 if (!he->srcfile) in hist_entry__srcfile_snprintf()
489 he->srcfile = hist_entry__get_srcfile(he); in hist_entry__srcfile_snprintf()
491 return repsep_snprintf(bf, size, "%-.*s", width, he->srcfile); in hist_entry__srcfile_snprintf()
515 static int hist_entry__parent_snprintf(struct hist_entry *he, char *bf, in hist_entry__parent_snprintf() argument
519 he->parent ? he->parent->name : "[other]"); in hist_entry__parent_snprintf()
537 static int hist_entry__cpu_snprintf(struct hist_entry *he, char *bf, in hist_entry__cpu_snprintf() argument
540 return repsep_snprintf(bf, size, "%*.*d", width, width, he->cpu); in hist_entry__cpu_snprintf()
575 static int hist_entry__cgroup_id_snprintf(struct hist_entry *he, in hist_entry__cgroup_id_snprintf() argument
579 return repsep_snprintf(bf, size, "%lu/0x%lx", he->cgroup_id.dev, in hist_entry__cgroup_id_snprintf()
580 he->cgroup_id.ino); in hist_entry__cgroup_id_snprintf()
598 static int hist_entry__socket_snprintf(struct hist_entry *he, char *bf, in hist_entry__socket_snprintf() argument
601 return repsep_snprintf(bf, size, "%*.*d", width, width-3, he->socket); in hist_entry__socket_snprintf()
604 static int hist_entry__socket_filter(struct hist_entry *he, int type, const void *arg) in hist_entry__socket_filter() argument
611 return sk >= 0 && he->socket != sk; in hist_entry__socket_filter()
624 static char *get_trace_output(struct hist_entry *he) in get_trace_output() argument
629 .data = he->raw_data, in get_trace_output()
630 .size = he->raw_size, in get_trace_output()
633 evsel = hists_to_evsel(he->hists); in get_trace_output()
637 pevent_print_fields(&seq, he->raw_data, he->raw_size, in get_trace_output()
666 static int hist_entry__trace_snprintf(struct hist_entry *he, char *bf, in hist_entry__trace_snprintf() argument
671 evsel = hists_to_evsel(he->hists); in hist_entry__trace_snprintf()
675 if (he->trace_output == NULL) in hist_entry__trace_snprintf()
676 he->trace_output = get_trace_output(he); in hist_entry__trace_snprintf()
677 return repsep_snprintf(bf, size, "%-.*s", width, he->trace_output); in hist_entry__trace_snprintf()
699 static int hist_entry__dso_from_snprintf(struct hist_entry *he, char *bf, in hist_entry__dso_from_snprintf() argument
702 if (he->branch_info) in hist_entry__dso_from_snprintf()
703 return _hist_entry__dso_snprintf(he->branch_info->from.map, in hist_entry__dso_from_snprintf()
709 static int hist_entry__dso_from_filter(struct hist_entry *he, int type, in hist_entry__dso_from_filter() argument
717 return dso && (!he->branch_info || !he->branch_info->from.map || in hist_entry__dso_from_filter()
718 he->branch_info->from.map->dso != dso); in hist_entry__dso_from_filter()
731 static int hist_entry__dso_to_snprintf(struct hist_entry *he, char *bf, in hist_entry__dso_to_snprintf() argument
734 if (he->branch_info) in hist_entry__dso_to_snprintf()
735 return _hist_entry__dso_snprintf(he->branch_info->to.map, in hist_entry__dso_to_snprintf()
741 static int hist_entry__dso_to_filter(struct hist_entry *he, int type, in hist_entry__dso_to_filter() argument
749 return dso && (!he->branch_info || !he->branch_info->to.map || in hist_entry__dso_to_filter()
750 he->branch_info->to.map->dso != dso); in hist_entry__dso_to_filter()
788 static int hist_entry__sym_from_snprintf(struct hist_entry *he, char *bf, in hist_entry__sym_from_snprintf() argument
791 if (he->branch_info) { in hist_entry__sym_from_snprintf()
792 struct addr_map_symbol *from = &he->branch_info->from; in hist_entry__sym_from_snprintf()
795 he->level, bf, size, width); in hist_entry__sym_from_snprintf()
801 static int hist_entry__sym_to_snprintf(struct hist_entry *he, char *bf, in hist_entry__sym_to_snprintf() argument
804 if (he->branch_info) { in hist_entry__sym_to_snprintf()
805 struct addr_map_symbol *to = &he->branch_info->to; in hist_entry__sym_to_snprintf()
808 he->level, bf, size, width); in hist_entry__sym_to_snprintf()
814 static int hist_entry__sym_from_filter(struct hist_entry *he, int type, in hist_entry__sym_from_filter() argument
822 return sym && !(he->branch_info && he->branch_info->from.sym && in hist_entry__sym_from_filter()
823 strstr(he->branch_info->from.sym->name, sym)); in hist_entry__sym_from_filter()
826 static int hist_entry__sym_to_filter(struct hist_entry *he, int type, in hist_entry__sym_to_filter() argument
834 return sym && !(he->branch_info && he->branch_info->to.sym && in hist_entry__sym_to_filter()
835 strstr(he->branch_info->to.sym->name, sym)); in hist_entry__sym_to_filter()
883 static int hist_entry__mispredict_snprintf(struct hist_entry *he, char *bf, in hist_entry__mispredict_snprintf() argument
887 if (he->branch_info) { in hist_entry__mispredict_snprintf()
888 if (he->branch_info->flags.predicted) in hist_entry__mispredict_snprintf()
890 else if (he->branch_info->flags.mispred) in hist_entry__mispredict_snprintf()
907 static int hist_entry__cycles_snprintf(struct hist_entry *he, char *bf, in hist_entry__cycles_snprintf() argument
910 if (!he->branch_info) in hist_entry__cycles_snprintf()
912 if (he->branch_info->flags.cycles == 0) in hist_entry__cycles_snprintf()
915 he->branch_info->flags.cycles); in hist_entry__cycles_snprintf()
939 static int hist_entry__daddr_snprintf(struct hist_entry *he, char *bf, in hist_entry__daddr_snprintf() argument
946 if (he->mem_info) { in hist_entry__daddr_snprintf()
947 addr = he->mem_info->daddr.addr; in hist_entry__daddr_snprintf()
948 map = he->mem_info->daddr.map; in hist_entry__daddr_snprintf()
949 sym = he->mem_info->daddr.sym; in hist_entry__daddr_snprintf()
951 return _hist_entry__sym_snprintf(map, sym, addr, he->level, bf, size, in hist_entry__daddr_snprintf()
968 static int hist_entry__iaddr_snprintf(struct hist_entry *he, char *bf, in hist_entry__iaddr_snprintf() argument
975 if (he->mem_info) { in hist_entry__iaddr_snprintf()
976 addr = he->mem_info->iaddr.addr; in hist_entry__iaddr_snprintf()
977 map = he->mem_info->iaddr.map; in hist_entry__iaddr_snprintf()
978 sym = he->mem_info->iaddr.sym; in hist_entry__iaddr_snprintf()
980 return _hist_entry__sym_snprintf(map, sym, addr, he->level, bf, size, in hist_entry__iaddr_snprintf()
998 static int hist_entry__dso_daddr_snprintf(struct hist_entry *he, char *bf, in hist_entry__dso_daddr_snprintf() argument
1003 if (he->mem_info) in hist_entry__dso_daddr_snprintf()
1004 map = he->mem_info->daddr.map; in hist_entry__dso_daddr_snprintf()
1028 static int hist_entry__locked_snprintf(struct hist_entry *he, char *bf, in hist_entry__locked_snprintf() argument
1033 perf_mem__lck_scnprintf(out, sizeof(out), he->mem_info); in hist_entry__locked_snprintf()
1056 static int hist_entry__tlb_snprintf(struct hist_entry *he, char *bf, in hist_entry__tlb_snprintf() argument
1061 perf_mem__tlb_scnprintf(out, sizeof(out), he->mem_info); in hist_entry__tlb_snprintf()
1084 static int hist_entry__lvl_snprintf(struct hist_entry *he, char *bf, in hist_entry__lvl_snprintf() argument
1089 perf_mem__lvl_scnprintf(out, sizeof(out), he->mem_info); in hist_entry__lvl_snprintf()
1112 static int hist_entry__snoop_snprintf(struct hist_entry *he, char *bf, in hist_entry__snoop_snprintf() argument
1117 perf_mem__snp_scnprintf(out, sizeof(out), he->mem_info); in hist_entry__snoop_snprintf()
1185 static int hist_entry__dcacheline_snprintf(struct hist_entry *he, char *bf, in hist_entry__dcacheline_snprintf() argument
1192 char level = he->level; in hist_entry__dcacheline_snprintf()
1194 if (he->mem_info) { in hist_entry__dcacheline_snprintf()
1195 addr = cl_address(he->mem_info->daddr.al_addr); in hist_entry__dcacheline_snprintf()
1196 map = he->mem_info->daddr.map; in hist_entry__dcacheline_snprintf()
1197 sym = he->mem_info->daddr.sym; in hist_entry__dcacheline_snprintf()
1200 if ((he->cpumode != PERF_RECORD_MISC_KERNEL) && in hist_entry__dcacheline_snprintf()
1220 static u64 he_weight(struct hist_entry *he) in he_weight() argument
1222 return he->stat.nr_events ? he->stat.weight / he->stat.nr_events : 0; in he_weight()
1231 static int hist_entry__local_weight_snprintf(struct hist_entry *he, char *bf, in hist_entry__local_weight_snprintf() argument
1234 return repsep_snprintf(bf, size, "%-*llu", width, he_weight(he)); in hist_entry__local_weight_snprintf()
1250 static int hist_entry__global_weight_snprintf(struct hist_entry *he, char *bf, in hist_entry__global_weight_snprintf() argument
1253 return repsep_snprintf(bf, size, "%-*llu", width, he->stat.weight); in hist_entry__global_weight_snprintf()
1332 static int hist_entry__phys_daddr_snprintf(struct hist_entry *he, char *bf, in hist_entry__phys_daddr_snprintf() argument
1339 addr = he->mem_info->daddr.phys_addr; in hist_entry__phys_daddr_snprintf()
1341 ret += repsep_snprintf(bf + ret, size - ret, "[%c] ", he->level); in hist_entry__phys_daddr_snprintf()
1370 static int hist_entry__abort_snprintf(struct hist_entry *he, char *bf, in hist_entry__abort_snprintf() argument
1375 if (he->branch_info) { in hist_entry__abort_snprintf()
1376 if (he->branch_info->flags.abort) in hist_entry__abort_snprintf()
1402 static int hist_entry__in_tx_snprintf(struct hist_entry *he, char *bf, in hist_entry__in_tx_snprintf() argument
1407 if (he->branch_info) { in hist_entry__in_tx_snprintf()
1408 if (he->branch_info->flags.in_tx) in hist_entry__in_tx_snprintf()
1465 static int hist_entry__transaction_snprintf(struct hist_entry *he, char *bf, in hist_entry__transaction_snprintf() argument
1468 u64 t = he->transaction; in hist_entry__transaction_snprintf()
1522 static int hist_entry__sym_size_snprintf(struct hist_entry *he, char *bf, in hist_entry__sym_size_snprintf() argument
1525 return _hist_entry__sym_size_snprintf(he->ms.sym, bf, size, width); in hist_entry__sym_size_snprintf()
1665 struct hist_entry *he) in __sort__hpp_entry() argument
1673 len = hists__col_len(he->hists, hse->se->se_width_idx); in __sort__hpp_entry()
1675 return hse->se->se_snprintf(he, hpp->buf, hpp->size, len); in __sort__hpp_entry()
1812 int hist_entry__filter(struct hist_entry *he, int type, const void *arg) in hist_entry__filter() argument
1819 perf_hpp_list__for_each_format(he->hpp_list, fmt) { in hist_entry__filter()
1831 r = hse->se->se_filter(he, type, arg); in hist_entry__filter()
1898 struct hist_entry *he) in update_dynamic_len() argument
1909 if (!he->trace_output) in update_dynamic_len()
1910 he->trace_output = get_trace_output(he); in update_dynamic_len()
1913 str = he->trace_output; in update_dynamic_len()
1981 struct hist_entry *he) in __sort__hde_entry() argument
1999 if (!he->trace_output) in __sort__hde_entry()
2000 he->trace_output = get_trace_output(he); in __sort__hde_entry()
2004 str = he->trace_output; in __sort__hde_entry()
2033 pevent_print_field(&seq, he->raw_data, hde->field); in __sort__hde_entry()