Lines Matching refs:he
103 static int hist_entry__thread_snprintf(struct hist_entry *he, char *bf, in hist_entry__thread_snprintf() argument
106 const char *comm = thread__comm_str(he->thread); in hist_entry__thread_snprintf()
109 return repsep_snprintf(bf, size, "%7d:%-*.*s", he->thread->tid, in hist_entry__thread_snprintf()
113 static int hist_entry__thread_filter(struct hist_entry *he, int type, const void *arg) in hist_entry__thread_filter() argument
120 return th && he->thread != th; in hist_entry__thread_filter()
156 static int hist_entry__comm_snprintf(struct hist_entry *he, char *bf, in hist_entry__comm_snprintf() argument
159 return repsep_snprintf(bf, size, "%-*.*s", width, width, comm__str(he->comm)); in hist_entry__comm_snprintf()
212 static int hist_entry__dso_snprintf(struct hist_entry *he, char *bf, in hist_entry__dso_snprintf() argument
215 return _hist_entry__dso_snprintf(he->ms.map, bf, size, width); in hist_entry__dso_snprintf()
218 static int hist_entry__dso_filter(struct hist_entry *he, int type, const void *arg) in hist_entry__dso_filter() argument
225 return dso && (!he->ms.map || he->ms.map->dso != dso); in hist_entry__dso_filter()
339 int hist_entry__sym_snprintf(struct hist_entry *he, char *bf, size_t size, unsigned int width) in hist_entry__sym_snprintf() argument
341 return _hist_entry__sym_snprintf(&he->ms, he->ip, in hist_entry__sym_snprintf()
342 he->level, bf, size, width); in hist_entry__sym_snprintf()
345 static int hist_entry__sym_filter(struct hist_entry *he, int type, const void *arg) in hist_entry__sym_filter() argument
352 return sym && (!he->ms.sym || !strstr(he->ms.sym->name, sym)); in hist_entry__sym_filter()
366 char *hist_entry__srcline(struct hist_entry *he) in hist_entry__srcline() argument
368 return map__srcline(he->ms.map, he->ip, he->ms.sym); in hist_entry__srcline()
382 static int hist_entry__srcline_snprintf(struct hist_entry *he, char *bf, in hist_entry__srcline_snprintf() argument
385 if (!he->srcline) in hist_entry__srcline_snprintf()
386 he->srcline = hist_entry__srcline(he); in hist_entry__srcline_snprintf()
388 return repsep_snprintf(bf, size, "%-.*s", width, he->srcline); in hist_entry__srcline_snprintf()
417 static int hist_entry__srcline_from_snprintf(struct hist_entry *he, char *bf, in hist_entry__srcline_from_snprintf() argument
420 return repsep_snprintf(bf, size, "%-*.*s", width, width, he->branch_info->srcline_from); in hist_entry__srcline_from_snprintf()
444 static int hist_entry__srcline_to_snprintf(struct hist_entry *he, char *bf, in hist_entry__srcline_to_snprintf() argument
447 return repsep_snprintf(bf, size, "%-*.*s", width, width, he->branch_info->srcline_to); in hist_entry__srcline_to_snprintf()
457 static int hist_entry__sym_ipc_snprintf(struct hist_entry *he, char *bf, in hist_entry__sym_ipc_snprintf() argument
461 struct symbol *sym = he->ms.sym; in hist_entry__sym_ipc_snprintf()
490 static int hist_entry__sym_ipc_null_snprintf(struct hist_entry *he in hist_entry__sym_ipc_null_snprintf()
544 static int hist_entry__srcfile_snprintf(struct hist_entry *he, char *bf, in hist_entry__srcfile_snprintf() argument
547 if (!he->srcfile) in hist_entry__srcfile_snprintf()
548 he->srcfile = hist_entry__get_srcfile(he); in hist_entry__srcfile_snprintf()
550 return repsep_snprintf(bf, size, "%-.*s", width, he->srcfile); in hist_entry__srcfile_snprintf()
574 static int hist_entry__parent_snprintf(struct hist_entry *he, char *bf, in hist_entry__parent_snprintf() argument
578 he->parent ? he->parent->name : "[other]"); in hist_entry__parent_snprintf()
596 static int hist_entry__cpu_snprintf(struct hist_entry *he, char *bf, in hist_entry__cpu_snprintf() argument
599 return repsep_snprintf(bf, size, "%*.*d", width, width, he->cpu); in hist_entry__cpu_snprintf()
634 static int hist_entry__cgroup_id_snprintf(struct hist_entry *he, in hist_entry__cgroup_id_snprintf() argument
638 return repsep_snprintf(bf, size, "%lu/0x%lx", he->cgroup_id.dev, in hist_entry__cgroup_id_snprintf()
639 he->cgroup_id.ino); in hist_entry__cgroup_id_snprintf()
657 static int hist_entry__cgroup_snprintf(struct hist_entry *he, in hist_entry__cgroup_snprintf() argument
663 if (he->cgroup) { in hist_entry__cgroup_snprintf()
664 struct cgroup *cgrp = cgroup__find(he->ms.maps->machine->env, in hist_entry__cgroup_snprintf()
665 he->cgroup); in hist_entry__cgroup_snprintf()
690 static int hist_entry__socket_snprintf(struct hist_entry *he, char *bf, in hist_entry__socket_snprintf() argument
693 return repsep_snprintf(bf, size, "%*.*d", width, width-3, he->socket); in hist_entry__socket_snprintf()
696 static int hist_entry__socket_filter(struct hist_entry *he, int type, const void *arg) in hist_entry__socket_filter() argument
703 return sk >= 0 && he->socket != sk; in hist_entry__socket_filter()
722 static int hist_entry__time_snprintf(struct hist_entry *he, char *bf, in hist_entry__time_snprintf() argument
728 timestamp__scnprintf_nsec(he->time, he_time, in hist_entry__time_snprintf()
731 timestamp__scnprintf_usec(he->time, he_time, in hist_entry__time_snprintf()
746 static char *get_trace_output(struct hist_entry *he) in get_trace_output() argument
751 .data = he->raw_data, in get_trace_output()
752 .size = he->raw_size, in get_trace_output()
755 evsel = hists_to_evsel(he->hists); in get_trace_output()
759 tep_print_fields(&seq, he->raw_data, he->raw_size, in get_trace_output()
789 static int hist_entry__trace_snprintf(struct hist_entry *he, char *bf, in hist_entry__trace_snprintf() argument
794 evsel = hists_to_evsel(he->hists); in hist_entry__trace_snprintf()
798 if (he->trace_output == NULL) in hist_entry__trace_snprintf()
799 he->trace_output = get_trace_output(he); in hist_entry__trace_snprintf()
800 return repsep_snprintf(bf, size, "%-.*s", width, he->trace_output); in hist_entry__trace_snprintf()
822 static int hist_entry__dso_from_snprintf(struct hist_entry *he, char *bf, in hist_entry__dso_from_snprintf() argument
825 if (he->branch_info) in hist_entry__dso_from_snprintf()
826 return _hist_entry__dso_snprintf(he->branch_info->from.ms.map, in hist_entry__dso_from_snprintf()
832 static int hist_entry__dso_from_filter(struct hist_entry *he, int type, in hist_entry__dso_from_filter() argument
840 return dso && (!he->branch_info || !he->branch_info->from.ms.map || in hist_entry__dso_from_filter()
841 he->branch_info->from.ms.map->dso != dso); in hist_entry__dso_from_filter()
854 static int hist_entry__dso_to_snprintf(struct hist_entry *he, char *bf, in hist_entry__dso_to_snprintf() argument
857 if (he->branch_info) in hist_entry__dso_to_snprintf()
858 return _hist_entry__dso_snprintf(he->branch_info->to.ms.map, in hist_entry__dso_to_snprintf()
864 static int hist_entry__dso_to_filter(struct hist_entry *he, int type, in hist_entry__dso_to_filter() argument
872 return dso && (!he->branch_info || !he->branch_info->to.ms.map || in hist_entry__dso_to_filter()
873 he->branch_info->to.ms.map->dso != dso); in hist_entry__dso_to_filter()
911 static int hist_entry__sym_from_snprintf(struct hist_entry *he, char *bf, in hist_entry__sym_from_snprintf() argument
914 if (he->branch_info) { in hist_entry__sym_from_snprintf()
915 struct addr_map_symbol *from = &he->branch_info->from; in hist_entry__sym_from_snprintf()
918 he->level, bf, size, width); in hist_entry__sym_from_snprintf()
924 static int hist_entry__sym_to_snprintf(struct hist_entry *he, char *bf, in hist_entry__sym_to_snprintf() argument
927 if (he->branch_info) { in hist_entry__sym_to_snprintf()
928 struct addr_map_symbol *to = &he->branch_info->to; in hist_entry__sym_to_snprintf()
931 he->level, bf, size, width); in hist_entry__sym_to_snprintf()
937 static int hist_entry__sym_from_filter(struct hist_entry *he, int type, in hist_entry__sym_from_filter() argument
945 return sym && !(he->branch_info && he->branch_info->from.ms.sym && in hist_entry__sym_from_filter()
946 strstr(he->branch_info->from.ms.sym->name, sym)); in hist_entry__sym_from_filter()
949 static int hist_entry__sym_to_filter(struct hist_entry *he, int type, in hist_entry__sym_to_filter() argument
957 return sym && !(he->branch_info && he->branch_info->to.ms.sym && in hist_entry__sym_to_filter()
958 strstr(he->branch_info->to.ms.sym->name, sym)); in hist_entry__sym_to_filter()
1006 static int hist_entry__mispredict_snprintf(struct hist_entry *he, char *bf, in hist_entry__mispredict_snprintf() argument
1010 if (he->branch_info) { in hist_entry__mispredict_snprintf()
1011 if (he->branch_info->flags.predicted) in hist_entry__mispredict_snprintf()
1013 else if (he->branch_info->flags.mispred) in hist_entry__mispredict_snprintf()
1030 static int hist_entry__cycles_snprintf(struct hist_entry *he, char *bf, in hist_entry__cycles_snprintf() argument
1033 if (!he->branch_info) in hist_entry__cycles_snprintf()
1035 if (he->branch_info->flags.cycles == 0) in hist_entry__cycles_snprintf()
1038 he->branch_info->flags.cycles); in hist_entry__cycles_snprintf()
1062 static int hist_entry__daddr_snprintf(struct hist_entry *he, char *bf, in hist_entry__daddr_snprintf() argument
1068 if (he->mem_info) { in hist_entry__daddr_snprintf()
1069 addr = he->mem_info->daddr.addr; in hist_entry__daddr_snprintf()
1070 ms = &he->mem_info->daddr.ms; in hist_entry__daddr_snprintf()
1072 return _hist_entry__sym_snprintf(ms, addr, he->level, bf, size, width); in hist_entry__daddr_snprintf()
1088 static int hist_entry__iaddr_snprintf(struct hist_entry *he, char *bf, in hist_entry__iaddr_snprintf() argument
1094 if (he->mem_info) { in hist_entry__iaddr_snprintf()
1095 addr = he->mem_info->iaddr.addr; in hist_entry__iaddr_snprintf()
1096 ms = &he->mem_info->iaddr.ms; in hist_entry__iaddr_snprintf()
1098 return _hist_entry__sym_snprintf(ms, addr, he->level, bf, size, width); in hist_entry__iaddr_snprintf()
1115 static int hist_entry__dso_daddr_snprintf(struct hist_entry *he, char *bf, in hist_entry__dso_daddr_snprintf() argument
1120 if (he->mem_info) in hist_entry__dso_daddr_snprintf()
1121 map = he->mem_info->daddr.ms.map; in hist_entry__dso_daddr_snprintf()
1145 static int hist_entry__locked_snprintf(struct hist_entry *he, char *bf, in hist_entry__locked_snprintf() argument
1150 perf_mem__lck_scnprintf(out, sizeof(out), he->mem_info); in hist_entry__locked_snprintf()
1173 static int hist_entry__tlb_snprintf(struct hist_entry *he, char *bf, in hist_entry__tlb_snprintf() argument
1178 perf_mem__tlb_scnprintf(out, sizeof(out), he->mem_info); in hist_entry__tlb_snprintf()
1201 static int hist_entry__lvl_snprintf(struct hist_entry *he, char *bf, in hist_entry__lvl_snprintf() argument
1206 perf_mem__lvl_scnprintf(out, sizeof(out), he->mem_info); in hist_entry__lvl_snprintf()
1229 static int hist_entry__snoop_snprintf(struct hist_entry *he, char *bf, in hist_entry__snoop_snprintf() argument
1234 perf_mem__snp_scnprintf(out, sizeof(out), he->mem_info); in hist_entry__snoop_snprintf()
1294 static int hist_entry__dcacheline_snprintf(struct hist_entry *he, char *bf, in hist_entry__dcacheline_snprintf() argument
1300 char level = he->level; in hist_entry__dcacheline_snprintf()
1302 if (he->mem_info) { in hist_entry__dcacheline_snprintf()
1303 struct map *map = he->mem_info->daddr.ms.map; in hist_entry__dcacheline_snprintf()
1305 addr = cl_address(he->mem_info->daddr.al_addr); in hist_entry__dcacheline_snprintf()
1306 ms = &he->mem_info->daddr.ms; in hist_entry__dcacheline_snprintf()
1309 if ((he->cpumode != PERF_RECORD_MISC_KERNEL) && in hist_entry__dcacheline_snprintf()
1334 static int hist_entry__local_weight_snprintf(struct hist_entry *he, char *bf, in hist_entry__local_weight_snprintf() argument
1337 return repsep_snprintf(bf, size, "%-*llu", width, he->weight); in hist_entry__local_weight_snprintf()
1347 static int hist_entry__global_weight_snprintf(struct hist_entry *he, char *bf, in hist_entry__global_weight_snprintf() argument
1351 he->weight * he->stat.nr_events); in hist_entry__global_weight_snprintf()
1367 static int hist_entry__local_ins_lat_snprintf(struct hist_entry *he, char *bf, in hist_entry__local_ins_lat_snprintf() argument
1370 return repsep_snprintf(bf, size, "%-*u", width, he->ins_lat); in hist_entry__local_ins_lat_snprintf()
1380 static int hist_entry__global_ins_lat_snprintf(struct hist_entry *he, char *bf, in hist_entry__global_ins_lat_snprintf() argument
1384 he->ins_lat * he->stat.nr_events); in hist_entry__global_ins_lat_snprintf()
1400 static int hist_entry__p_stage_cyc_snprintf(struct hist_entry *he, char *bf, in hist_entry__p_stage_cyc_snprintf() argument
1403 return repsep_snprintf(bf, size, "%-*u", width, he->p_stage_cyc); in hist_entry__p_stage_cyc_snprintf()
1488 static int hist_entry__blocked_snprintf(struct hist_entry *he, char *bf, in hist_entry__blocked_snprintf() argument
1493 perf_mem__blk_scnprintf(out, sizeof(out), he->mem_info); in hist_entry__blocked_snprintf()
1517 static int hist_entry__phys_daddr_snprintf(struct hist_entry *he, char *bf, in hist_entry__phys_daddr_snprintf() argument
1524 addr = he->mem_info->daddr.phys_addr; in hist_entry__phys_daddr_snprintf()
1526 ret += repsep_snprintf(bf + ret, size - ret, "[%c] ", he->level); in hist_entry__phys_daddr_snprintf()
1558 static int hist_entry__data_page_size_snprintf(struct hist_entry *he, char *bf, in hist_entry__data_page_size_snprintf() argument
1564 get_page_size_name(he->mem_info->daddr.data_page_size, str)); in hist_entry__data_page_size_snprintf()
1583 static int hist_entry__code_page_size_snprintf(struct hist_entry *he, char *bf, in hist_entry__code_page_size_snprintf() argument
1589 get_page_size_name(he->code_page_size, str)); in hist_entry__code_page_size_snprintf()
1609 static int hist_entry__abort_snprintf(struct hist_entry *he, char *bf, in hist_entry__abort_snprintf() argument
1614 if (he->branch_info) { in hist_entry__abort_snprintf()
1615 if (he->branch_info->flags.abort) in hist_entry__abort_snprintf()
1641 static int hist_entry__in_tx_snprintf(struct hist_entry *he, char *bf, in hist_entry__in_tx_snprintf() argument
1646 if (he->branch_info) { in hist_entry__in_tx_snprintf()
1647 if (he->branch_info->flags.in_tx) in hist_entry__in_tx_snprintf()
1704 static int hist_entry__transaction_snprintf(struct hist_entry *he, char *bf, in hist_entry__transaction_snprintf() argument
1707 u64 t = he->transaction; in hist_entry__transaction_snprintf()
1761 static int hist_entry__sym_size_snprintf(struct hist_entry *he, char *bf, in hist_entry__sym_size_snprintf() argument
1764 return _hist_entry__sym_size_snprintf(he->ms.sym, bf, size, width); in hist_entry__sym_size_snprintf()
1801 static int hist_entry__dso_size_snprintf(struct hist_entry *he, char *bf, in hist_entry__dso_size_snprintf() argument
1804 return _hist_entry__dso_size_snprintf(he->ms.map, bf, size, width); in hist_entry__dso_size_snprintf()
1970 struct hist_entry *he) in __sort__hpp_entry() argument
1978 len = hists__col_len(he->hists, hse->se->se_width_idx); in __sort__hpp_entry()
1980 return hse->se->se_snprintf(he, hpp->buf, hpp->size, len); in __sort__hpp_entry()
2117 int hist_entry__filter(struct hist_entry *he, int type, const void *arg) in hist_entry__filter() argument
2124 perf_hpp_list__for_each_format(he->hpp_list, fmt) { in hist_entry__filter()
2136 r = hse->se->se_filter(he, type, arg); in hist_entry__filter()
2203 struct hist_entry *he) in update_dynamic_len() argument
2214 if (!he->trace_output) in update_dynamic_len()
2215 he->trace_output = get_trace_output(he); in update_dynamic_len()
2218 str = he->trace_output; in update_dynamic_len()
2286 struct hist_entry *he) in __sort__hde_entry() argument
2304 if (!he->trace_output) in __sort__hde_entry()
2305 he->trace_output = get_trace_output(he); in __sort__hde_entry()
2309 str = he->trace_output; in __sort__hde_entry()
2338 tep_print_field(&seq, he->raw_data, hde->field); in __sort__hde_entry()