Lines Matching full:he
116 static int hist_entry__thread_snprintf(struct hist_entry *he, char *bf, in hist_entry__thread_snprintf() argument
119 const char *comm = thread__comm_str(he->thread); in hist_entry__thread_snprintf()
122 return repsep_snprintf(bf, size, "%7d:%-*.*s", thread__tid(he->thread), in hist_entry__thread_snprintf()
126 static int hist_entry__thread_filter(struct hist_entry *he, int type, const void *arg) in hist_entry__thread_filter() argument
133 return th && !RC_CHK_EQUAL(he->thread, th); in hist_entry__thread_filter()
165 static int hist_entry__simd_snprintf(struct hist_entry *he, char *bf, in hist_entry__simd_snprintf() argument
170 if (!he->simd_flags.arch) in hist_entry__simd_snprintf()
173 name = hist_entry__get_simd_name(&he->simd_flags); in hist_entry__simd_snprintf()
175 if (he->simd_flags.pred & SIMD_OP_FLAGS_PRED_EMPTY) in hist_entry__simd_snprintf()
177 else if (he->simd_flags.pred & SIMD_OP_FLAGS_PRED_PARTIAL) in hist_entry__simd_snprintf()
215 static int hist_entry__comm_snprintf(struct hist_entry *he, char *bf, in hist_entry__comm_snprintf() argument
218 return repsep_snprintf(bf, size, "%-*.*s", width, width, comm__str(he->comm)); in hist_entry__comm_snprintf()
271 static int hist_entry__dso_snprintf(struct hist_entry *he, char *bf, in hist_entry__dso_snprintf() argument
274 return _hist_entry__dso_snprintf(he->ms.map, bf, size, width); in hist_entry__dso_snprintf()
277 static int hist_entry__dso_filter(struct hist_entry *he, int type, const void *arg) in hist_entry__dso_filter() argument
284 return dso && (!he->ms.map || map__dso(he->ms.map) != dso); in hist_entry__dso_filter()
398 int hist_entry__sym_snprintf(struct hist_entry *he, char *bf, size_t size, unsigned int width) in hist_entry__sym_snprintf() argument
400 return _hist_entry__sym_snprintf(&he->ms, he->ip, in hist_entry__sym_snprintf()
401 he->level, bf, size, width); in hist_entry__sym_snprintf()
404 static int hist_entry__sym_filter(struct hist_entry *he, int type, const void *arg) in hist_entry__sym_filter() argument
411 return sym && (!he->ms.sym || !strstr(he->ms.sym->name, sym)); in hist_entry__sym_filter()
450 hist_entry__symoff_snprintf(struct hist_entry *he, char *bf, size_t size, unsigned int width) in hist_entry__symoff_snprintf() argument
452 struct symbol *sym = he->ms.sym; in hist_entry__symoff_snprintf()
455 return repsep_snprintf(bf, size, "[%c] %-#.*llx", he->level, width - 4, he->ip); in hist_entry__symoff_snprintf()
457 return repsep_snprintf(bf, size, "[%c] %s+0x%llx", he->level, sym->name, he->ip - sym->start); in hist_entry__symoff_snprintf()
471 char *hist_entry__srcline(struct hist_entry *he) in hist_entry__srcline() argument
473 return map__srcline(he->ms.map, he->ip, he->ms.sym); in hist_entry__srcline()
506 sort__srcline_init(struct hist_entry *he) in sort__srcline_init() argument
508 if (!he->srcline) in sort__srcline_init()
509 he->srcline = hist_entry__srcline(he); in sort__srcline_init()
512 static int hist_entry__srcline_snprintf(struct hist_entry *he, char *bf, in hist_entry__srcline_snprintf() argument
515 return repsep_snprintf(bf, size, "%-.*s", width, he->srcline); in hist_entry__srcline_snprintf()
559 static void sort__srcline_from_init(struct hist_entry *he) in sort__srcline_from_init() argument
561 if (!he->branch_info->srcline_from) in sort__srcline_from_init()
562 he->branch_info->srcline_from = addr_map_symbol__srcline(&he->branch_info->from); in sort__srcline_from_init()
565 static int hist_entry__srcline_from_snprintf(struct hist_entry *he, char *bf, in hist_entry__srcline_from_snprintf() argument
568 return repsep_snprintf(bf, size, "%-*.*s", width, width, he->branch_info->srcline_from); in hist_entry__srcline_from_snprintf()
607 static void sort__srcline_to_init(struct hist_entry *he) in sort__srcline_to_init() argument
609 if (!he->branch_info->srcline_to) in sort__srcline_to_init()
610 he->branch_info->srcline_to = addr_map_symbol__srcline(&he->branch_info->to); in sort__srcline_to_init()
613 static int hist_entry__srcline_to_snprintf(struct hist_entry *he, char *bf, in hist_entry__srcline_to_snprintf() argument
616 return repsep_snprintf(bf, size, "%-*.*s", width, width, he->branch_info->srcline_to); in hist_entry__srcline_to_snprintf()
629 static int hist_entry__sym_ipc_snprintf(struct hist_entry *he, char *bf, in hist_entry__sym_ipc_snprintf() argument
633 struct symbol *sym = he->ms.sym; in hist_entry__sym_ipc_snprintf()
662 static int hist_entry__sym_ipc_null_snprintf(struct hist_entry *he in hist_entry__sym_ipc_null_snprintf()
690 struct hist_entry *he, char *bf, size_t size, unsigned int width) in hist_entry__callchain_branch_predicted_snprintf() argument
696 callchain_branch_counts(he->callchain, &branch_count, in hist_entry__callchain_branch_predicted_snprintf()
722 static int hist_entry__callchain_branch_abort_snprintf(struct hist_entry *he, in hist_entry__callchain_branch_abort_snprintf() argument
729 callchain_branch_counts(he->callchain, &branch_count, in hist_entry__callchain_branch_abort_snprintf()
752 static int hist_entry__callchain_branch_cycles_snprintf(struct hist_entry *he, in hist_entry__callchain_branch_cycles_snprintf() argument
759 callchain_branch_counts(he->callchain, &branch_count, in hist_entry__callchain_branch_cycles_snprintf()
824 static void sort__srcfile_init(struct hist_entry *he) in sort__srcfile_init() argument
826 if (!he->srcfile) in sort__srcfile_init()
827 he->srcfile = hist_entry__get_srcfile(he); in sort__srcfile_init()
830 static int hist_entry__srcfile_snprintf(struct hist_entry *he, char *bf, in hist_entry__srcfile_snprintf() argument
833 return repsep_snprintf(bf, size, "%-.*s", width, he->srcfile); in hist_entry__srcfile_snprintf()
860 static int hist_entry__parent_snprintf(struct hist_entry *he, char *bf, in hist_entry__parent_snprintf() argument
864 he->parent ? he->parent->name : "[other]"); in hist_entry__parent_snprintf()
882 static int hist_entry__cpu_snprintf(struct hist_entry *he, char *bf, in hist_entry__cpu_snprintf() argument
885 return repsep_snprintf(bf, size, "%*.*d", width, width, he->cpu); in hist_entry__cpu_snprintf()
920 static int hist_entry__cgroup_id_snprintf(struct hist_entry *he, in hist_entry__cgroup_id_snprintf() argument
924 return repsep_snprintf(bf, size, "%lu/0x%lx", he->cgroup_id.dev, in hist_entry__cgroup_id_snprintf()
925 he->cgroup_id.ino); in hist_entry__cgroup_id_snprintf()
943 static int hist_entry__cgroup_snprintf(struct hist_entry *he, in hist_entry__cgroup_snprintf() argument
949 if (he->cgroup) { in hist_entry__cgroup_snprintf()
950 struct cgroup *cgrp = cgroup__find(maps__machine(he->ms.maps)->env, in hist_entry__cgroup_snprintf()
951 he->cgroup); in hist_entry__cgroup_snprintf()
976 static int hist_entry__socket_snprintf(struct hist_entry *he, char *bf, in hist_entry__socket_snprintf() argument
979 return repsep_snprintf(bf, size, "%*.*d", width, width-3, he->socket); in hist_entry__socket_snprintf()
982 static int hist_entry__socket_filter(struct hist_entry *he, int type, const void *arg) in hist_entry__socket_filter() argument
989 return sk >= 0 && he->socket != sk; in hist_entry__socket_filter()
1008 static int hist_entry__time_snprintf(struct hist_entry *he, char *bf, in hist_entry__time_snprintf() argument
1014 timestamp__scnprintf_nsec(he->time, he_time, in hist_entry__time_snprintf()
1017 timestamp__scnprintf_usec(he->time, he_time, in hist_entry__time_snprintf()
1033 static char *get_trace_output(struct hist_entry *he) in get_trace_output() argument
1038 .data = he->raw_data, in get_trace_output()
1039 .size = he->raw_size, in get_trace_output()
1043 evsel = hists_to_evsel(he->hists); in get_trace_output()
1049 tep_print_fields(&seq, he->raw_data, he->raw_size, tp_format); in get_trace_output()
1078 static int hist_entry__trace_snprintf(struct hist_entry *he, char *bf, in hist_entry__trace_snprintf() argument
1083 evsel = hists_to_evsel(he->hists); in hist_entry__trace_snprintf()
1087 if (he->trace_output == NULL) in hist_entry__trace_snprintf()
1088 he->trace_output = get_trace_output(he); in hist_entry__trace_snprintf()
1089 return repsep_snprintf(bf, size, "%-.*s", width, he->trace_output); in hist_entry__trace_snprintf()
1112 static int hist_entry__dso_from_snprintf(struct hist_entry *he, char *bf, in hist_entry__dso_from_snprintf() argument
1115 if (he->branch_info) in hist_entry__dso_from_snprintf()
1116 return _hist_entry__dso_snprintf(he->branch_info->from.ms.map, in hist_entry__dso_from_snprintf()
1122 static int hist_entry__dso_from_filter(struct hist_entry *he, int type, in hist_entry__dso_from_filter() argument
1130 return dso && (!he->branch_info || !he->branch_info->from.ms.map || in hist_entry__dso_from_filter()
1131 map__dso(he->branch_info->from.ms.map) != dso); in hist_entry__dso_from_filter()
1144 static int hist_entry__dso_to_snprintf(struct hist_entry *he, char *bf, in hist_entry__dso_to_snprintf() argument
1147 if (he->branch_info) in hist_entry__dso_to_snprintf()
1148 return _hist_entry__dso_snprintf(he->branch_info->to.ms.map, in hist_entry__dso_to_snprintf()
1154 static int hist_entry__dso_to_filter(struct hist_entry *he, int type, in hist_entry__dso_to_filter() argument
1162 return dso && (!he->branch_info || !he->branch_info->to.ms.map || in hist_entry__dso_to_filter()
1163 map__dso(he->branch_info->to.ms.map) != dso); in hist_entry__dso_to_filter()
1200 static int hist_entry__sym_from_snprintf(struct hist_entry *he, char *bf, in hist_entry__sym_from_snprintf() argument
1203 if (he->branch_info) { in hist_entry__sym_from_snprintf()
1204 struct addr_map_symbol *from = &he->branch_info->from; in hist_entry__sym_from_snprintf()
1213 static int hist_entry__sym_to_snprintf(struct hist_entry *he, char *bf, in hist_entry__sym_to_snprintf() argument
1216 if (he->branch_info) { in hist_entry__sym_to_snprintf()
1217 struct addr_map_symbol *to = &he->branch_info->to; in hist_entry__sym_to_snprintf()
1226 static int hist_entry__sym_from_filter(struct hist_entry *he, int type, in hist_entry__sym_from_filter() argument
1234 return sym && !(he->branch_info && he->branch_info->from.ms.sym && in hist_entry__sym_from_filter()
1235 strstr(he->branch_info->from.ms.sym->name, sym)); in hist_entry__sym_from_filter()
1238 static int hist_entry__sym_to_filter(struct hist_entry *he, int type, in hist_entry__sym_to_filter() argument
1246 return sym && !(he->branch_info && he->branch_info->to.ms.sym && in hist_entry__sym_to_filter()
1247 strstr(he->branch_info->to.ms.sym->name, sym)); in hist_entry__sym_to_filter()
1313 static int hist_entry__addr_from_snprintf(struct hist_entry *he, char *bf, in hist_entry__addr_from_snprintf() argument
1316 if (he->branch_info) { in hist_entry__addr_from_snprintf()
1317 struct addr_map_symbol *from = &he->branch_info->from; in hist_entry__addr_from_snprintf()
1320 he->level, bf, size, width); in hist_entry__addr_from_snprintf()
1326 static int hist_entry__addr_to_snprintf(struct hist_entry *he, char *bf, in hist_entry__addr_to_snprintf() argument
1329 if (he->branch_info) { in hist_entry__addr_to_snprintf()
1330 struct addr_map_symbol *to = &he->branch_info->to; in hist_entry__addr_to_snprintf()
1333 he->level, bf, size, width); in hist_entry__addr_to_snprintf()
1417 static int hist_entry__mispredict_snprintf(struct hist_entry *he, char *bf, in hist_entry__mispredict_snprintf() argument
1421 if (he->branch_info) { in hist_entry__mispredict_snprintf()
1422 if (he->branch_info->flags.predicted) in hist_entry__mispredict_snprintf()
1424 else if (he->branch_info->flags.mispred) in hist_entry__mispredict_snprintf()
1441 static int hist_entry__cycles_snprintf(struct hist_entry *he, char *bf, in hist_entry__cycles_snprintf() argument
1444 if (!he->branch_info) in hist_entry__cycles_snprintf()
1446 if (he->branch_info->flags.cycles == 0) in hist_entry__cycles_snprintf()
1449 he->branch_info->flags.cycles); in hist_entry__cycles_snprintf()
1473 static int hist_entry__daddr_snprintf(struct hist_entry *he, char *bf, in hist_entry__daddr_snprintf() argument
1479 if (he->mem_info) { in hist_entry__daddr_snprintf()
1480 addr = mem_info__daddr(he->mem_info)->addr; in hist_entry__daddr_snprintf()
1481 ms = &mem_info__daddr(he->mem_info)->ms; in hist_entry__daddr_snprintf()
1483 return _hist_entry__sym_snprintf(ms, addr, he->level, bf, size, width); in hist_entry__daddr_snprintf()
1499 static int hist_entry__iaddr_snprintf(struct hist_entry *he, char *bf, in hist_entry__iaddr_snprintf() argument
1505 if (he->mem_info) { in hist_entry__iaddr_snprintf()
1506 addr = mem_info__iaddr(he->mem_info)->addr; in hist_entry__iaddr_snprintf()
1507 ms = &mem_info__iaddr(he->mem_info)->ms; in hist_entry__iaddr_snprintf()
1509 return _hist_entry__sym_snprintf(ms, addr, he->level, bf, size, width); in hist_entry__iaddr_snprintf()
1526 static int hist_entry__dso_daddr_snprintf(struct hist_entry *he, char *bf, in hist_entry__dso_daddr_snprintf() argument
1531 if (he->mem_info) in hist_entry__dso_daddr_snprintf()
1532 map = mem_info__daddr(he->mem_info)->ms.map; in hist_entry__dso_daddr_snprintf()
1556 static int hist_entry__locked_snprintf(struct hist_entry *he, char *bf, in hist_entry__locked_snprintf() argument
1561 perf_mem__lck_scnprintf(out, sizeof(out), he->mem_info); in hist_entry__locked_snprintf()
1584 static int hist_entry__tlb_snprintf(struct hist_entry *he, char *bf, in hist_entry__tlb_snprintf() argument
1589 perf_mem__tlb_scnprintf(out, sizeof(out), he->mem_info); in hist_entry__tlb_snprintf()
1612 static int hist_entry__lvl_snprintf(struct hist_entry *he, char *bf, in hist_entry__lvl_snprintf() argument
1617 perf_mem__lvl_scnprintf(out, sizeof(out), he->mem_info); in hist_entry__lvl_snprintf()
1640 static int hist_entry__snoop_snprintf(struct hist_entry *he, char *bf, in hist_entry__snoop_snprintf() argument
1645 perf_mem__snp_scnprintf(out, sizeof(out), he->mem_info); in hist_entry__snoop_snprintf()
1709 static int hist_entry__dcacheline_snprintf(struct hist_entry *he, char *bf, in hist_entry__dcacheline_snprintf() argument
1715 char level = he->level; in hist_entry__dcacheline_snprintf()
1717 if (he->mem_info) { in hist_entry__dcacheline_snprintf()
1718 struct map *map = mem_info__daddr(he->mem_info)->ms.map; in hist_entry__dcacheline_snprintf()
1721 addr = cl_address(mem_info__daddr(he->mem_info)->al_addr, chk_double_cl); in hist_entry__dcacheline_snprintf()
1722 ms = &mem_info__daddr(he->mem_info)->ms; in hist_entry__dcacheline_snprintf()
1725 if ((he->cpumode != PERF_RECORD_MISC_KERNEL) && in hist_entry__dcacheline_snprintf()
1750 static int hist_entry__local_weight_snprintf(struct hist_entry *he, char *bf, in hist_entry__local_weight_snprintf() argument
1753 return repsep_snprintf(bf, size, "%-*llu", width, he->weight); in hist_entry__local_weight_snprintf()
1763 static int hist_entry__global_weight_snprintf(struct hist_entry *he, char *bf, in hist_entry__global_weight_snprintf() argument
1767 he->weight * he->stat.nr_events); in hist_entry__global_weight_snprintf()
1783 static int hist_entry__local_ins_lat_snprintf(struct hist_entry *he, char *bf, in hist_entry__local_ins_lat_snprintf() argument
1786 return repsep_snprintf(bf, size, "%-*u", width, he->ins_lat); in hist_entry__local_ins_lat_snprintf()
1796 static int hist_entry__global_ins_lat_snprintf(struct hist_entry *he, char *bf, in hist_entry__global_ins_lat_snprintf() argument
1800 he->ins_lat * he->stat.nr_events); in hist_entry__global_ins_lat_snprintf()
1816 static int hist_entry__global_p_stage_cyc_snprintf(struct hist_entry *he, char *bf, in hist_entry__global_p_stage_cyc_snprintf() argument
1820 he->p_stage_cyc * he->stat.nr_events); in hist_entry__global_p_stage_cyc_snprintf()
1824 static int hist_entry__p_stage_cyc_snprintf(struct hist_entry *he, char *bf, in hist_entry__p_stage_cyc_snprintf() argument
1827 return repsep_snprintf(bf, size, "%-*u", width, he->p_stage_cyc); in hist_entry__p_stage_cyc_snprintf()
1919 static int hist_entry__blocked_snprintf(struct hist_entry *he, char *bf, in hist_entry__blocked_snprintf() argument
1924 perf_mem__blk_scnprintf(out, sizeof(out), he->mem_info); in hist_entry__blocked_snprintf()
1948 static int hist_entry__phys_daddr_snprintf(struct hist_entry *he, char *bf, in hist_entry__phys_daddr_snprintf() argument
1955 addr = mem_info__daddr(he->mem_info)->phys_addr; in hist_entry__phys_daddr_snprintf()
1957 ret += repsep_snprintf(bf + ret, size - ret, "[%c] ", he->level); in hist_entry__phys_daddr_snprintf()
1989 static int hist_entry__data_page_size_snprintf(struct hist_entry *he, char *bf, in hist_entry__data_page_size_snprintf() argument
1995 get_page_size_name(mem_info__daddr(he->mem_info)->data_page_size, str)); in hist_entry__data_page_size_snprintf()
2014 static int hist_entry__code_page_size_snprintf(struct hist_entry *he, char *bf, in hist_entry__code_page_size_snprintf() argument
2020 get_page_size_name(he->code_page_size, str)); in hist_entry__code_page_size_snprintf()
2040 static int hist_entry__abort_snprintf(struct hist_entry *he, char *bf, in hist_entry__abort_snprintf() argument
2045 if (he->branch_info) { in hist_entry__abort_snprintf()
2046 if (he->branch_info->flags.abort) in hist_entry__abort_snprintf()
2072 static int hist_entry__in_tx_snprintf(struct hist_entry *he, char *bf, in hist_entry__in_tx_snprintf() argument
2077 if (he->branch_info) { in hist_entry__in_tx_snprintf()
2078 if (he->branch_info->flags.in_tx) in hist_entry__in_tx_snprintf()
2135 static int hist_entry__transaction_snprintf(struct hist_entry *he, char *bf, in hist_entry__transaction_snprintf() argument
2138 u64 t = he->transaction; in hist_entry__transaction_snprintf()
2192 static int hist_entry__sym_size_snprintf(struct hist_entry *he, char *bf, in hist_entry__sym_size_snprintf() argument
2195 return _hist_entry__sym_size_snprintf(he->ms.sym, bf, size, width); in hist_entry__sym_size_snprintf()
2231 static int hist_entry__dso_size_snprintf(struct hist_entry *he, char *bf, in hist_entry__dso_size_snprintf() argument
2234 return _hist_entry__dso_size_snprintf(he->ms.map, bf, size, width); in hist_entry__dso_size_snprintf()
2262 static int hist_entry__addr_snprintf(struct hist_entry *he, char *bf, in hist_entry__addr_snprintf() argument
2265 u64 ip = he->ip; in hist_entry__addr_snprintf()
2266 struct map *map = he->ms.map; in hist_entry__addr_snprintf()
2296 static void sort__type_init(struct hist_entry *he) in sort__type_init() argument
2298 if (he->mem_type) in sort__type_init()
2301 he->mem_type = hist_entry__get_data_type(he); in sort__type_init()
2302 if (he->mem_type == NULL) { in sort__type_init()
2303 he->mem_type = &unknown_type; in sort__type_init()
2304 he->mem_type_off = 0; in sort__type_init()
2333 static int hist_entry__type_snprintf(struct hist_entry *he, char *bf, in hist_entry__type_snprintf() argument
2336 return repsep_snprintf(bf, size, "%-*s", width, he->mem_type->self.type_name); in hist_entry__type_snprintf()
2399 static int hist_entry__typeoff_snprintf(struct hist_entry *he, char *bf, in hist_entry__typeoff_snprintf() argument
2402 struct annotated_data_type *he_type = he->mem_type; in hist_entry__typeoff_snprintf()
2410 he->mem_type_off, true); in hist_entry__typeoff_snprintf()
2414 he->mem_type_off, buf); in hist_entry__typeoff_snprintf()
2459 static int hist_entry__typecln_snprintf(struct hist_entry *he, char *bf, in hist_entry__typecln_snprintf() argument
2462 struct annotated_data_type *he_type = he->mem_type; in hist_entry__typecln_snprintf()
2465 he->mem_type_off / TYPE_CACHELINE_SIZE); in hist_entry__typecln_snprintf()
2663 struct hist_entry *he) in __sort__hpp_entry() argument
2671 len = hists__col_len(he->hists, hse->se->se_width_idx); in __sort__hpp_entry()
2673 return hse->se->se_snprintf(he, hpp->buf, hpp->size, len); in __sort__hpp_entry()
2762 static void hse_init(struct perf_hpp_fmt *fmt, struct hist_entry *he) in hse_init() argument
2772 hse->se->se_init(he); in hse_init()
2831 int hist_entry__filter(struct hist_entry *he, int type, const void *arg) in hist_entry__filter() argument
2838 perf_hpp_list__for_each_format(he->hpp_list, fmt) { in hist_entry__filter()
2850 r = hse->se->se_filter(he, type, arg); in hist_entry__filter()
2928 struct hist_entry *he) in update_dynamic_len() argument
2939 if (!he->trace_output) in update_dynamic_len()
2940 he->trace_output = get_trace_output(he); in update_dynamic_len()
2943 str = he->trace_output; in update_dynamic_len()
3011 struct hist_entry *he) in __sort__hde_entry() argument
3029 if (!he->trace_output) in __sort__hde_entry()
3030 he->trace_output = get_trace_output(he); in __sort__hde_entry()
3034 str = he->trace_output; in __sort__hde_entry()
3063 tep_print_field(&seq, he->raw_data, hde->field); in __sort__hde_entry()
3128 static void __sort__hde_init(struct perf_hpp_fmt *fmt, struct hist_entry *he) in __sort__hde_init() argument
3136 update_dynamic_len(hde, he); in __sort__hde_init()