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()
903 static int hist_entry__parallelism_filter(struct hist_entry *he, int type, const void *arg) in hist_entry__parallelism_filter() argument
910 return test_bit(he->parallelism, parallelism_filter); in hist_entry__parallelism_filter()
913 static int hist_entry__parallelism_snprintf(struct hist_entry *he, char *bf, in hist_entry__parallelism_snprintf() argument
916 return repsep_snprintf(bf, size, "%*d", width, he->parallelism); in hist_entry__parallelism_snprintf()
952 static int hist_entry__cgroup_id_snprintf(struct hist_entry *he, in hist_entry__cgroup_id_snprintf() argument
956 return repsep_snprintf(bf, size, "%lu/0x%lx", he->cgroup_id.dev, in hist_entry__cgroup_id_snprintf()
957 he->cgroup_id.ino); in hist_entry__cgroup_id_snprintf()
975 static int hist_entry__cgroup_snprintf(struct hist_entry *he, in hist_entry__cgroup_snprintf() argument
981 if (he->cgroup) { in hist_entry__cgroup_snprintf()
982 struct cgroup *cgrp = cgroup__find(maps__machine(he->ms.maps)->env, in hist_entry__cgroup_snprintf()
983 he->cgroup); in hist_entry__cgroup_snprintf()
1008 static int hist_entry__socket_snprintf(struct hist_entry *he, char *bf, in hist_entry__socket_snprintf() argument
1011 return repsep_snprintf(bf, size, "%*.*d", width, width-3, he->socket); in hist_entry__socket_snprintf()
1014 static int hist_entry__socket_filter(struct hist_entry *he, int type, const void *arg) in hist_entry__socket_filter() argument
1021 return sk >= 0 && he->socket != sk; in hist_entry__socket_filter()
1040 static int hist_entry__time_snprintf(struct hist_entry *he, char *bf, in hist_entry__time_snprintf() argument
1046 timestamp__scnprintf_nsec(he->time, he_time, in hist_entry__time_snprintf()
1049 timestamp__scnprintf_usec(he->time, he_time, in hist_entry__time_snprintf()
1065 static char *get_trace_output(struct hist_entry *he) in get_trace_output() argument
1070 .data = he->raw_data, in get_trace_output()
1071 .size = he->raw_size, in get_trace_output()
1075 evsel = hists_to_evsel(he->hists); in get_trace_output()
1081 tep_print_fields(&seq, he->raw_data, he->raw_size, tp_format); in get_trace_output()
1110 static int hist_entry__trace_snprintf(struct hist_entry *he, char *bf, in hist_entry__trace_snprintf() argument
1115 evsel = hists_to_evsel(he->hists); in hist_entry__trace_snprintf()
1119 if (he->trace_output == NULL) in hist_entry__trace_snprintf()
1120 he->trace_output = get_trace_output(he); in hist_entry__trace_snprintf()
1121 return repsep_snprintf(bf, size, "%-.*s", width, he->trace_output); in hist_entry__trace_snprintf()
1144 static int hist_entry__dso_from_snprintf(struct hist_entry *he, char *bf, in hist_entry__dso_from_snprintf() argument
1147 if (he->branch_info) in hist_entry__dso_from_snprintf()
1148 return _hist_entry__dso_snprintf(he->branch_info->from.ms.map, in hist_entry__dso_from_snprintf()
1154 static int hist_entry__dso_from_filter(struct hist_entry *he, int type, in hist_entry__dso_from_filter() argument
1162 return dso && (!he->branch_info || !he->branch_info->from.ms.map || in hist_entry__dso_from_filter()
1163 map__dso(he->branch_info->from.ms.map) != dso); in hist_entry__dso_from_filter()
1176 static int hist_entry__dso_to_snprintf(struct hist_entry *he, char *bf, in hist_entry__dso_to_snprintf() argument
1179 if (he->branch_info) in hist_entry__dso_to_snprintf()
1180 return _hist_entry__dso_snprintf(he->branch_info->to.ms.map, in hist_entry__dso_to_snprintf()
1186 static int hist_entry__dso_to_filter(struct hist_entry *he, int type, in hist_entry__dso_to_filter() argument
1194 return dso && (!he->branch_info || !he->branch_info->to.ms.map || in hist_entry__dso_to_filter()
1195 map__dso(he->branch_info->to.ms.map) != dso); in hist_entry__dso_to_filter()
1232 static int hist_entry__sym_from_snprintf(struct hist_entry *he, char *bf, in hist_entry__sym_from_snprintf() argument
1235 if (he->branch_info) { in hist_entry__sym_from_snprintf()
1236 struct addr_map_symbol *from = &he->branch_info->from; in hist_entry__sym_from_snprintf()
1245 static int hist_entry__sym_to_snprintf(struct hist_entry *he, char *bf, in hist_entry__sym_to_snprintf() argument
1248 if (he->branch_info) { in hist_entry__sym_to_snprintf()
1249 struct addr_map_symbol *to = &he->branch_info->to; in hist_entry__sym_to_snprintf()
1258 static int hist_entry__sym_from_filter(struct hist_entry *he, int type, in hist_entry__sym_from_filter() argument
1266 return sym && !(he->branch_info && he->branch_info->from.ms.sym && in hist_entry__sym_from_filter()
1267 strstr(he->branch_info->from.ms.sym->name, sym)); in hist_entry__sym_from_filter()
1270 static int hist_entry__sym_to_filter(struct hist_entry *he, int type, in hist_entry__sym_to_filter() argument
1278 return sym && !(he->branch_info && he->branch_info->to.ms.sym && in hist_entry__sym_to_filter()
1279 strstr(he->branch_info->to.ms.sym->name, sym)); in hist_entry__sym_to_filter()
1345 static int hist_entry__addr_from_snprintf(struct hist_entry *he, char *bf, in hist_entry__addr_from_snprintf() argument
1348 if (he->branch_info) { in hist_entry__addr_from_snprintf()
1349 struct addr_map_symbol *from = &he->branch_info->from; in hist_entry__addr_from_snprintf()
1352 he->level, bf, size, width); in hist_entry__addr_from_snprintf()
1358 static int hist_entry__addr_to_snprintf(struct hist_entry *he, char *bf, in hist_entry__addr_to_snprintf() argument
1361 if (he->branch_info) { in hist_entry__addr_to_snprintf()
1362 struct addr_map_symbol *to = &he->branch_info->to; in hist_entry__addr_to_snprintf()
1365 he->level, bf, size, width); in hist_entry__addr_to_snprintf()
1449 static int hist_entry__mispredict_snprintf(struct hist_entry *he, char *bf, in hist_entry__mispredict_snprintf() argument
1453 if (he->branch_info) { in hist_entry__mispredict_snprintf()
1454 if (he->branch_info->flags.predicted) in hist_entry__mispredict_snprintf()
1456 else if (he->branch_info->flags.mispred) in hist_entry__mispredict_snprintf()
1473 static int hist_entry__cycles_snprintf(struct hist_entry *he, char *bf, in hist_entry__cycles_snprintf() argument
1476 if (!he->branch_info) in hist_entry__cycles_snprintf()
1478 if (he->branch_info->flags.cycles == 0) in hist_entry__cycles_snprintf()
1481 he->branch_info->flags.cycles); in hist_entry__cycles_snprintf()
1505 static int hist_entry__daddr_snprintf(struct hist_entry *he, char *bf, in hist_entry__daddr_snprintf() argument
1511 if (he->mem_info) { in hist_entry__daddr_snprintf()
1512 addr = mem_info__daddr(he->mem_info)->addr; in hist_entry__daddr_snprintf()
1513 ms = &mem_info__daddr(he->mem_info)->ms; in hist_entry__daddr_snprintf()
1515 return _hist_entry__sym_snprintf(ms, addr, he->level, bf, size, width); in hist_entry__daddr_snprintf()
1531 static int hist_entry__iaddr_snprintf(struct hist_entry *he, char *bf, in hist_entry__iaddr_snprintf() argument
1537 if (he->mem_info) { in hist_entry__iaddr_snprintf()
1538 addr = mem_info__iaddr(he->mem_info)->addr; in hist_entry__iaddr_snprintf()
1539 ms = &mem_info__iaddr(he->mem_info)->ms; in hist_entry__iaddr_snprintf()
1541 return _hist_entry__sym_snprintf(ms, addr, he->level, bf, size, width); in hist_entry__iaddr_snprintf()
1558 static int hist_entry__dso_daddr_snprintf(struct hist_entry *he, char *bf, in hist_entry__dso_daddr_snprintf() argument
1563 if (he->mem_info) in hist_entry__dso_daddr_snprintf()
1564 map = mem_info__daddr(he->mem_info)->ms.map; in hist_entry__dso_daddr_snprintf()
1588 static int hist_entry__locked_snprintf(struct hist_entry *he, char *bf, in hist_entry__locked_snprintf() argument
1593 perf_mem__lck_scnprintf(out, sizeof(out), he->mem_info); in hist_entry__locked_snprintf()
1616 static int hist_entry__tlb_snprintf(struct hist_entry *he, char *bf, in hist_entry__tlb_snprintf() argument
1621 perf_mem__tlb_scnprintf(out, sizeof(out), he->mem_info); in hist_entry__tlb_snprintf()
1644 static int hist_entry__lvl_snprintf(struct hist_entry *he, char *bf, in hist_entry__lvl_snprintf() argument
1649 perf_mem__lvl_scnprintf(out, sizeof(out), he->mem_info); in hist_entry__lvl_snprintf()
1672 static int hist_entry__snoop_snprintf(struct hist_entry *he, char *bf, in hist_entry__snoop_snprintf() argument
1677 perf_mem__snp_scnprintf(out, sizeof(out), he->mem_info); in hist_entry__snoop_snprintf()
1741 static int hist_entry__dcacheline_snprintf(struct hist_entry *he, char *bf, in hist_entry__dcacheline_snprintf() argument
1747 char level = he->level; in hist_entry__dcacheline_snprintf()
1749 if (he->mem_info) { in hist_entry__dcacheline_snprintf()
1750 struct map *map = mem_info__daddr(he->mem_info)->ms.map; in hist_entry__dcacheline_snprintf()
1753 addr = cl_address(mem_info__daddr(he->mem_info)->al_addr, chk_double_cl); in hist_entry__dcacheline_snprintf()
1754 ms = &mem_info__daddr(he->mem_info)->ms; in hist_entry__dcacheline_snprintf()
1757 if ((he->cpumode != PERF_RECORD_MISC_KERNEL) && in hist_entry__dcacheline_snprintf()
1782 static int hist_entry__local_weight_snprintf(struct hist_entry *he, char *bf, in hist_entry__local_weight_snprintf() argument
1785 return repsep_snprintf(bf, size, "%-*llu", width, he->weight); in hist_entry__local_weight_snprintf()
1795 static int hist_entry__global_weight_snprintf(struct hist_entry *he, char *bf, in hist_entry__global_weight_snprintf() argument
1799 he->weight * he->stat.nr_events); in hist_entry__global_weight_snprintf()
1815 static int hist_entry__local_ins_lat_snprintf(struct hist_entry *he, char *bf, in hist_entry__local_ins_lat_snprintf() argument
1818 return repsep_snprintf(bf, size, "%-*u", width, he->ins_lat); in hist_entry__local_ins_lat_snprintf()
1828 static int hist_entry__global_ins_lat_snprintf(struct hist_entry *he, char *bf, in hist_entry__global_ins_lat_snprintf() argument
1832 he->ins_lat * he->stat.nr_events); in hist_entry__global_ins_lat_snprintf()
1848 static int hist_entry__global_p_stage_cyc_snprintf(struct hist_entry *he, char *bf, in hist_entry__global_p_stage_cyc_snprintf() argument
1852 he->p_stage_cyc * he->stat.nr_events); in hist_entry__global_p_stage_cyc_snprintf()
1856 static int hist_entry__p_stage_cyc_snprintf(struct hist_entry *he, char *bf, in hist_entry__p_stage_cyc_snprintf() argument
1859 return repsep_snprintf(bf, size, "%-*u", width, he->p_stage_cyc); in hist_entry__p_stage_cyc_snprintf()
1951 static int hist_entry__blocked_snprintf(struct hist_entry *he, char *bf, in hist_entry__blocked_snprintf() argument
1956 perf_mem__blk_scnprintf(out, sizeof(out), he->mem_info); in hist_entry__blocked_snprintf()
1980 static int hist_entry__phys_daddr_snprintf(struct hist_entry *he, char *bf, in hist_entry__phys_daddr_snprintf() argument
1987 addr = mem_info__daddr(he->mem_info)->phys_addr; in hist_entry__phys_daddr_snprintf()
1989 ret += repsep_snprintf(bf + ret, size - ret, "[%c] ", he->level); in hist_entry__phys_daddr_snprintf()
2021 static int hist_entry__data_page_size_snprintf(struct hist_entry *he, char *bf, in hist_entry__data_page_size_snprintf() argument
2027 get_page_size_name(mem_info__daddr(he->mem_info)->data_page_size, str)); in hist_entry__data_page_size_snprintf()
2046 static int hist_entry__code_page_size_snprintf(struct hist_entry *he, char *bf, in hist_entry__code_page_size_snprintf() argument
2052 get_page_size_name(he->code_page_size, str)); in hist_entry__code_page_size_snprintf()
2072 static int hist_entry__abort_snprintf(struct hist_entry *he, char *bf, in hist_entry__abort_snprintf() argument
2077 if (he->branch_info) { in hist_entry__abort_snprintf()
2078 if (he->branch_info->flags.abort) in hist_entry__abort_snprintf()
2104 static int hist_entry__in_tx_snprintf(struct hist_entry *he, char *bf, in hist_entry__in_tx_snprintf() argument
2109 if (he->branch_info) { in hist_entry__in_tx_snprintf()
2110 if (he->branch_info->flags.in_tx) in hist_entry__in_tx_snprintf()
2167 static int hist_entry__transaction_snprintf(struct hist_entry *he, char *bf, in hist_entry__transaction_snprintf() argument
2170 u64 t = he->transaction; in hist_entry__transaction_snprintf()
2224 static int hist_entry__sym_size_snprintf(struct hist_entry *he, char *bf, in hist_entry__sym_size_snprintf() argument
2227 return _hist_entry__sym_size_snprintf(he->ms.sym, bf, size, width); in hist_entry__sym_size_snprintf()
2263 static int hist_entry__dso_size_snprintf(struct hist_entry *he, char *bf, in hist_entry__dso_size_snprintf() argument
2266 return _hist_entry__dso_size_snprintf(he->ms.map, bf, size, width); in hist_entry__dso_size_snprintf()
2294 static int hist_entry__addr_snprintf(struct hist_entry *he, char *bf, in hist_entry__addr_snprintf() argument
2297 u64 ip = he->ip; in hist_entry__addr_snprintf()
2298 struct map *map = he->ms.map; in hist_entry__addr_snprintf()
2328 static void sort__type_init(struct hist_entry *he) in sort__type_init() argument
2330 if (he->mem_type) in sort__type_init()
2333 he->mem_type = hist_entry__get_data_type(he); in sort__type_init()
2334 if (he->mem_type == NULL) { in sort__type_init()
2335 he->mem_type = &unknown_type; in sort__type_init()
2336 he->mem_type_off = 0; in sort__type_init()
2365 static int hist_entry__type_snprintf(struct hist_entry *he, char *bf, in hist_entry__type_snprintf() argument
2368 return repsep_snprintf(bf, size, "%-*s", width, he->mem_type->self.type_name); in hist_entry__type_snprintf()
2406 static int hist_entry__typeoff_snprintf(struct hist_entry *he, char *bf, in hist_entry__typeoff_snprintf() argument
2409 struct annotated_data_type *he_type = he->mem_type; in hist_entry__typeoff_snprintf()
2417 he->mem_type_off)) in hist_entry__typeoff_snprintf()
2421 he->mem_type_off, buf); in hist_entry__typeoff_snprintf()
2466 static int hist_entry__typecln_snprintf(struct hist_entry *he, char *bf, in hist_entry__typecln_snprintf() argument
2469 struct annotated_data_type *he_type = he->mem_type; in hist_entry__typecln_snprintf()
2472 he->mem_type_off / TYPE_CACHELINE_SIZE); in hist_entry__typecln_snprintf()
2674 struct hist_entry *he) in __sort__hpp_entry() argument
2682 len = hists__col_len(he->hists, hse->se->se_width_idx); in __sort__hpp_entry()
2684 return hse->se->se_snprintf(he, hpp->buf, hpp->size, len); in __sort__hpp_entry()
2774 static void hse_init(struct perf_hpp_fmt *fmt, struct hist_entry *he) in hse_init() argument
2784 hse->se->se_init(he); in hse_init()
2843 int hist_entry__filter(struct hist_entry *he, int type, const void *arg) in hist_entry__filter() argument
2850 perf_hpp_list__for_each_format(he->hpp_list, fmt) { in hist_entry__filter()
2862 r = hse->se->se_filter(he, type, arg); in hist_entry__filter()
2940 struct hist_entry *he) in update_dynamic_len() argument
2951 if (!he->trace_output) in update_dynamic_len()
2952 he->trace_output = get_trace_output(he); in update_dynamic_len()
2955 str = he->trace_output; in update_dynamic_len()
3023 struct hist_entry *he) in __sort__hde_entry() argument
3041 if (!he->trace_output) in __sort__hde_entry()
3042 he->trace_output = get_trace_output(he); in __sort__hde_entry()
3046 str = he->trace_output; in __sort__hde_entry()
3075 tep_print_field(&seq, he->raw_data, hde->field); in __sort__hde_entry()
3140 static void __sort__hde_init(struct perf_hpp_fmt *fmt, struct hist_entry *he) in __sort__hde_init() argument
3148 update_dynamic_len(hde, he); in __sort__hde_init()