Lines Matching refs: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()
728 static void sort__srcfile_init(struct hist_entry *he) in sort__srcfile_init() argument
730 if (!he->srcfile) in sort__srcfile_init()
731 he->srcfile = hist_entry__get_srcfile(he); in sort__srcfile_init()
734 static int hist_entry__srcfile_snprintf(struct hist_entry *he, char *bf, in hist_entry__srcfile_snprintf() argument
737 return repsep_snprintf(bf, size, "%-.*s", width, he->srcfile); in hist_entry__srcfile_snprintf()
764 static int hist_entry__parent_snprintf(struct hist_entry *he, char *bf, in hist_entry__parent_snprintf() argument
768 he->parent ? he->parent->name : "[other]"); in hist_entry__parent_snprintf()
786 static int hist_entry__cpu_snprintf(struct hist_entry *he, char *bf, in hist_entry__cpu_snprintf() argument
789 return repsep_snprintf(bf, size, "%*.*d", width, width, he->cpu); in hist_entry__cpu_snprintf()
824 static int hist_entry__cgroup_id_snprintf(struct hist_entry *he, in hist_entry__cgroup_id_snprintf() argument
828 return repsep_snprintf(bf, size, "%lu/0x%lx", he->cgroup_id.dev, in hist_entry__cgroup_id_snprintf()
829 he->cgroup_id.ino); in hist_entry__cgroup_id_snprintf()
847 static int hist_entry__cgroup_snprintf(struct hist_entry *he, in hist_entry__cgroup_snprintf() argument
853 if (he->cgroup) { in hist_entry__cgroup_snprintf()
854 struct cgroup *cgrp = cgroup__find(maps__machine(he->ms.maps)->env, in hist_entry__cgroup_snprintf()
855 he->cgroup); in hist_entry__cgroup_snprintf()
880 static int hist_entry__socket_snprintf(struct hist_entry *he, char *bf, in hist_entry__socket_snprintf() argument
883 return repsep_snprintf(bf, size, "%*.*d", width, width-3, he->socket); in hist_entry__socket_snprintf()
886 static int hist_entry__socket_filter(struct hist_entry *he, int type, const void *arg) in hist_entry__socket_filter() argument
893 return sk >= 0 && he->socket != sk; in hist_entry__socket_filter()
912 static int hist_entry__time_snprintf(struct hist_entry *he, char *bf, in hist_entry__time_snprintf() argument
918 timestamp__scnprintf_nsec(he->time, he_time, in hist_entry__time_snprintf()
921 timestamp__scnprintf_usec(he->time, he_time, in hist_entry__time_snprintf()
937 static char *get_trace_output(struct hist_entry *he) in get_trace_output() argument
942 .data = he->raw_data, in get_trace_output()
943 .size = he->raw_size, in get_trace_output()
946 evsel = hists_to_evsel(he->hists); in get_trace_output()
950 tep_print_fields(&seq, he->raw_data, he->raw_size, in get_trace_output()
980 static int hist_entry__trace_snprintf(struct hist_entry *he, char *bf, in hist_entry__trace_snprintf() argument
985 evsel = hists_to_evsel(he->hists); in hist_entry__trace_snprintf()
989 if (he->trace_output == NULL) in hist_entry__trace_snprintf()
990 he->trace_output = get_trace_output(he); in hist_entry__trace_snprintf()
991 return repsep_snprintf(bf, size, "%-.*s", width, he->trace_output); in hist_entry__trace_snprintf()
1014 static int hist_entry__dso_from_snprintf(struct hist_entry *he, char *bf, in hist_entry__dso_from_snprintf() argument
1017 if (he->branch_info) in hist_entry__dso_from_snprintf()
1018 return _hist_entry__dso_snprintf(he->branch_info->from.ms.map, in hist_entry__dso_from_snprintf()
1024 static int hist_entry__dso_from_filter(struct hist_entry *he, int type, in hist_entry__dso_from_filter() argument
1032 return dso && (!he->branch_info || !he->branch_info->from.ms.map || in hist_entry__dso_from_filter()
1033 map__dso(he->branch_info->from.ms.map) != dso); in hist_entry__dso_from_filter()
1046 static int hist_entry__dso_to_snprintf(struct hist_entry *he, char *bf, in hist_entry__dso_to_snprintf() argument
1049 if (he->branch_info) in hist_entry__dso_to_snprintf()
1050 return _hist_entry__dso_snprintf(he->branch_info->to.ms.map, in hist_entry__dso_to_snprintf()
1056 static int hist_entry__dso_to_filter(struct hist_entry *he, int type, in hist_entry__dso_to_filter() argument
1064 return dso && (!he->branch_info || !he->branch_info->to.ms.map || in hist_entry__dso_to_filter()
1065 map__dso(he->branch_info->to.ms.map) != dso); in hist_entry__dso_to_filter()
1102 static int hist_entry__sym_from_snprintf(struct hist_entry *he, char *bf, in hist_entry__sym_from_snprintf() argument
1105 if (he->branch_info) { in hist_entry__sym_from_snprintf()
1106 struct addr_map_symbol *from = &he->branch_info->from; in hist_entry__sym_from_snprintf()
1115 static int hist_entry__sym_to_snprintf(struct hist_entry *he, char *bf, in hist_entry__sym_to_snprintf() argument
1118 if (he->branch_info) { in hist_entry__sym_to_snprintf()
1119 struct addr_map_symbol *to = &he->branch_info->to; in hist_entry__sym_to_snprintf()
1128 static int hist_entry__sym_from_filter(struct hist_entry *he, int type, in hist_entry__sym_from_filter() argument
1136 return sym && !(he->branch_info && he->branch_info->from.ms.sym && in hist_entry__sym_from_filter()
1137 strstr(he->branch_info->from.ms.sym->name, sym)); in hist_entry__sym_from_filter()
1140 static int hist_entry__sym_to_filter(struct hist_entry *he, int type, in hist_entry__sym_to_filter() argument
1148 return sym && !(he->branch_info && he->branch_info->to.ms.sym && in hist_entry__sym_to_filter()
1149 strstr(he->branch_info->to.ms.sym->name, sym)); in hist_entry__sym_to_filter()
1215 static int hist_entry__addr_from_snprintf(struct hist_entry *he, char *bf, in hist_entry__addr_from_snprintf() argument
1218 if (he->branch_info) { in hist_entry__addr_from_snprintf()
1219 struct addr_map_symbol *from = &he->branch_info->from; in hist_entry__addr_from_snprintf()
1222 he->level, bf, size, width); in hist_entry__addr_from_snprintf()
1228 static int hist_entry__addr_to_snprintf(struct hist_entry *he, char *bf, in hist_entry__addr_to_snprintf() argument
1231 if (he->branch_info) { in hist_entry__addr_to_snprintf()
1232 struct addr_map_symbol *to = &he->branch_info->to; in hist_entry__addr_to_snprintf()
1235 he->level, bf, size, width); in hist_entry__addr_to_snprintf()
1319 static int hist_entry__mispredict_snprintf(struct hist_entry *he, char *bf, in hist_entry__mispredict_snprintf() argument
1323 if (he->branch_info) { in hist_entry__mispredict_snprintf()
1324 if (he->branch_info->flags.predicted) in hist_entry__mispredict_snprintf()
1326 else if (he->branch_info->flags.mispred) in hist_entry__mispredict_snprintf()
1343 static int hist_entry__cycles_snprintf(struct hist_entry *he, char *bf, in hist_entry__cycles_snprintf() argument
1346 if (!he->branch_info) in hist_entry__cycles_snprintf()
1348 if (he->branch_info->flags.cycles == 0) in hist_entry__cycles_snprintf()
1351 he->branch_info->flags.cycles); in hist_entry__cycles_snprintf()
1375 static int hist_entry__daddr_snprintf(struct hist_entry *he, char *bf, in hist_entry__daddr_snprintf() argument
1381 if (he->mem_info) { in hist_entry__daddr_snprintf()
1382 addr = mem_info__daddr(he->mem_info)->addr; in hist_entry__daddr_snprintf()
1383 ms = &mem_info__daddr(he->mem_info)->ms; in hist_entry__daddr_snprintf()
1385 return _hist_entry__sym_snprintf(ms, addr, he->level, bf, size, width); in hist_entry__daddr_snprintf()
1401 static int hist_entry__iaddr_snprintf(struct hist_entry *he, char *bf, in hist_entry__iaddr_snprintf() argument
1407 if (he->mem_info) { in hist_entry__iaddr_snprintf()
1408 addr = mem_info__iaddr(he->mem_info)->addr; in hist_entry__iaddr_snprintf()
1409 ms = &mem_info__iaddr(he->mem_info)->ms; in hist_entry__iaddr_snprintf()
1411 return _hist_entry__sym_snprintf(ms, addr, he->level, bf, size, width); in hist_entry__iaddr_snprintf()
1428 static int hist_entry__dso_daddr_snprintf(struct hist_entry *he, char *bf, in hist_entry__dso_daddr_snprintf() argument
1433 if (he->mem_info) in hist_entry__dso_daddr_snprintf()
1434 map = mem_info__daddr(he->mem_info)->ms.map; in hist_entry__dso_daddr_snprintf()
1458 static int hist_entry__locked_snprintf(struct hist_entry *he, char *bf, in hist_entry__locked_snprintf() argument
1463 perf_mem__lck_scnprintf(out, sizeof(out), he->mem_info); in hist_entry__locked_snprintf()
1486 static int hist_entry__tlb_snprintf(struct hist_entry *he, char *bf, in hist_entry__tlb_snprintf() argument
1491 perf_mem__tlb_scnprintf(out, sizeof(out), he->mem_info); in hist_entry__tlb_snprintf()
1514 static int hist_entry__lvl_snprintf(struct hist_entry *he, char *bf, in hist_entry__lvl_snprintf() argument
1519 perf_mem__lvl_scnprintf(out, sizeof(out), he->mem_info); in hist_entry__lvl_snprintf()
1542 static int hist_entry__snoop_snprintf(struct hist_entry *he, char *bf, in hist_entry__snoop_snprintf() argument
1547 perf_mem__snp_scnprintf(out, sizeof(out), he->mem_info); in hist_entry__snoop_snprintf()
1611 static int hist_entry__dcacheline_snprintf(struct hist_entry *he, char *bf, in hist_entry__dcacheline_snprintf() argument
1617 char level = he->level; in hist_entry__dcacheline_snprintf()
1619 if (he->mem_info) { in hist_entry__dcacheline_snprintf()
1620 struct map *map = mem_info__daddr(he->mem_info)->ms.map; in hist_entry__dcacheline_snprintf()
1623 addr = cl_address(mem_info__daddr(he->mem_info)->al_addr, chk_double_cl); in hist_entry__dcacheline_snprintf()
1624 ms = &mem_info__daddr(he->mem_info)->ms; in hist_entry__dcacheline_snprintf()
1627 if ((he->cpumode != PERF_RECORD_MISC_KERNEL) && in hist_entry__dcacheline_snprintf()
1652 static int hist_entry__local_weight_snprintf(struct hist_entry *he, char *bf, in hist_entry__local_weight_snprintf() argument
1655 return repsep_snprintf(bf, size, "%-*llu", width, he->weight); in hist_entry__local_weight_snprintf()
1665 static int hist_entry__global_weight_snprintf(struct hist_entry *he, char *bf, in hist_entry__global_weight_snprintf() argument
1669 he->weight * he->stat.nr_events); in hist_entry__global_weight_snprintf()
1685 static int hist_entry__local_ins_lat_snprintf(struct hist_entry *he, char *bf, in hist_entry__local_ins_lat_snprintf() argument
1688 return repsep_snprintf(bf, size, "%-*u", width, he->ins_lat); in hist_entry__local_ins_lat_snprintf()
1698 static int hist_entry__global_ins_lat_snprintf(struct hist_entry *he, char *bf, in hist_entry__global_ins_lat_snprintf() argument
1702 he->ins_lat * he->stat.nr_events); in hist_entry__global_ins_lat_snprintf()
1718 static int hist_entry__global_p_stage_cyc_snprintf(struct hist_entry *he, char *bf, in hist_entry__global_p_stage_cyc_snprintf() argument
1722 he->p_stage_cyc * he->stat.nr_events); in hist_entry__global_p_stage_cyc_snprintf()
1726 static int hist_entry__p_stage_cyc_snprintf(struct hist_entry *he, char *bf, in hist_entry__p_stage_cyc_snprintf() argument
1729 return repsep_snprintf(bf, size, "%-*u", width, he->p_stage_cyc); in hist_entry__p_stage_cyc_snprintf()
1821 static int hist_entry__blocked_snprintf(struct hist_entry *he, char *bf, in hist_entry__blocked_snprintf() argument
1826 perf_mem__blk_scnprintf(out, sizeof(out), he->mem_info); in hist_entry__blocked_snprintf()
1850 static int hist_entry__phys_daddr_snprintf(struct hist_entry *he, char *bf, in hist_entry__phys_daddr_snprintf() argument
1857 addr = mem_info__daddr(he->mem_info)->phys_addr; in hist_entry__phys_daddr_snprintf()
1859 ret += repsep_snprintf(bf + ret, size - ret, "[%c] ", he->level); in hist_entry__phys_daddr_snprintf()
1891 static int hist_entry__data_page_size_snprintf(struct hist_entry *he, char *bf, in hist_entry__data_page_size_snprintf() argument
1897 get_page_size_name(mem_info__daddr(he->mem_info)->data_page_size, str)); in hist_entry__data_page_size_snprintf()
1916 static int hist_entry__code_page_size_snprintf(struct hist_entry *he, char *bf, in hist_entry__code_page_size_snprintf() argument
1922 get_page_size_name(he->code_page_size, str)); in hist_entry__code_page_size_snprintf()
1942 static int hist_entry__abort_snprintf(struct hist_entry *he, char *bf, in hist_entry__abort_snprintf() argument
1947 if (he->branch_info) { in hist_entry__abort_snprintf()
1948 if (he->branch_info->flags.abort) in hist_entry__abort_snprintf()
1974 static int hist_entry__in_tx_snprintf(struct hist_entry *he, char *bf, in hist_entry__in_tx_snprintf() argument
1979 if (he->branch_info) { in hist_entry__in_tx_snprintf()
1980 if (he->branch_info->flags.in_tx) in hist_entry__in_tx_snprintf()
2037 static int hist_entry__transaction_snprintf(struct hist_entry *he, char *bf, in hist_entry__transaction_snprintf() argument
2040 u64 t = he->transaction; in hist_entry__transaction_snprintf()
2094 static int hist_entry__sym_size_snprintf(struct hist_entry *he, char *bf, in hist_entry__sym_size_snprintf() argument
2097 return _hist_entry__sym_size_snprintf(he->ms.sym, bf, size, width); in hist_entry__sym_size_snprintf()
2133 static int hist_entry__dso_size_snprintf(struct hist_entry *he, char *bf, in hist_entry__dso_size_snprintf() argument
2136 return _hist_entry__dso_size_snprintf(he->ms.map, bf, size, width); in hist_entry__dso_size_snprintf()
2164 static int hist_entry__addr_snprintf(struct hist_entry *he, char *bf, in hist_entry__addr_snprintf() argument
2167 u64 ip = he->ip; in hist_entry__addr_snprintf()
2168 struct map *map = he->ms.map; in hist_entry__addr_snprintf()
2198 static void sort__type_init(struct hist_entry *he) in sort__type_init() argument
2200 if (he->mem_type) in sort__type_init()
2203 he->mem_type = hist_entry__get_data_type(he); in sort__type_init()
2204 if (he->mem_type == NULL) { in sort__type_init()
2205 he->mem_type = &unknown_type; in sort__type_init()
2206 he->mem_type_off = 0; in sort__type_init()
2235 static int hist_entry__type_snprintf(struct hist_entry *he, char *bf, in hist_entry__type_snprintf() argument
2238 return repsep_snprintf(bf, size, "%-*s", width, he->mem_type->self.type_name); in hist_entry__type_snprintf()
2301 static int hist_entry__typeoff_snprintf(struct hist_entry *he, char *bf, in hist_entry__typeoff_snprintf() argument
2304 struct annotated_data_type *he_type = he->mem_type; in hist_entry__typeoff_snprintf()
2312 he->mem_type_off, true); in hist_entry__typeoff_snprintf()
2316 he->mem_type_off, buf); in hist_entry__typeoff_snprintf()
2361 static int hist_entry__typecln_snprintf(struct hist_entry *he, char *bf, in hist_entry__typecln_snprintf() argument
2364 struct annotated_data_type *he_type = he->mem_type; in hist_entry__typecln_snprintf()
2367 he->mem_type_off / TYPE_CACHELINE_SIZE); in hist_entry__typecln_snprintf()
2556 struct hist_entry *he) in __sort__hpp_entry() argument
2564 len = hists__col_len(he->hists, hse->se->se_width_idx); in __sort__hpp_entry()
2566 return hse->se->se_snprintf(he, hpp->buf, hpp->size, len); in __sort__hpp_entry()
2655 static void hse_init(struct perf_hpp_fmt *fmt, struct hist_entry *he) in hse_init() argument
2665 hse->se->se_init(he); in hse_init()
2724 int hist_entry__filter(struct hist_entry *he, int type, const void *arg) in hist_entry__filter() argument
2731 perf_hpp_list__for_each_format(he->hpp_list, fmt) { in hist_entry__filter()
2743 r = hse->se->se_filter(he, type, arg); in hist_entry__filter()
2821 struct hist_entry *he) in update_dynamic_len() argument
2832 if (!he->trace_output) in update_dynamic_len()
2833 he->trace_output = get_trace_output(he); in update_dynamic_len()
2836 str = he->trace_output; in update_dynamic_len()
2904 struct hist_entry *he) in __sort__hde_entry() argument
2922 if (!he->trace_output) in __sort__hde_entry()
2923 he->trace_output = get_trace_output(he); in __sort__hde_entry()
2927 str = he->trace_output; in __sort__hde_entry()
2956 tep_print_field(&seq, he->raw_data, hde->field); in __sort__hde_entry()
3021 static void __sort__hde_init(struct perf_hpp_fmt *fmt, struct hist_entry *he) in __sort__hde_init() argument
3029 update_dynamic_len(hde, he); in __sort__hde_init()