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