Lines Matching refs:he

100 static int hist_entry__thread_snprintf(struct hist_entry *he, char *bf,  in hist_entry__thread_snprintf()  argument
103 const char *comm = thread__comm_str(he->thread); in hist_entry__thread_snprintf()
106 return repsep_snprintf(bf, size, "%7d:%-*.*s", he->thread->tid, in hist_entry__thread_snprintf()
110 static int hist_entry__thread_filter(struct hist_entry *he, int type, const void *arg) in hist_entry__thread_filter() argument
117 return th && he->thread != th; in hist_entry__thread_filter()
153 static int hist_entry__comm_snprintf(struct hist_entry *he, char *bf, in hist_entry__comm_snprintf() argument
156 return repsep_snprintf(bf, size, "%-*.*s", width, width, comm__str(he->comm)); in hist_entry__comm_snprintf()
209 static int hist_entry__dso_snprintf(struct hist_entry *he, char *bf, in hist_entry__dso_snprintf() argument
212 return _hist_entry__dso_snprintf(he->ms.map, bf, size, width); in hist_entry__dso_snprintf()
215 static int hist_entry__dso_filter(struct hist_entry *he, int type, const void *arg) in hist_entry__dso_filter() argument
222 return dso && (!he->ms.map || he->ms.map->dso != dso); in hist_entry__dso_filter()
336 int hist_entry__sym_snprintf(struct hist_entry *he, char *bf, size_t size, unsigned int width) in hist_entry__sym_snprintf() argument
338 return _hist_entry__sym_snprintf(&he->ms, he->ip, in hist_entry__sym_snprintf()
339 he->level, bf, size, width); in hist_entry__sym_snprintf()
342 static int hist_entry__sym_filter(struct hist_entry *he, int type, const void *arg) in hist_entry__sym_filter() argument
349 return sym && (!he->ms.sym || !strstr(he->ms.sym->name, sym)); in hist_entry__sym_filter()
363 char *hist_entry__srcline(struct hist_entry *he) in hist_entry__srcline() argument
365 return map__srcline(he->ms.map, he->ip, he->ms.sym); in hist_entry__srcline()
379 static int hist_entry__srcline_snprintf(struct hist_entry *he, char *bf, in hist_entry__srcline_snprintf() argument
382 if (!he->srcline) in hist_entry__srcline_snprintf()
383 he->srcline = hist_entry__srcline(he); in hist_entry__srcline_snprintf()
385 return repsep_snprintf(bf, size, "%-.*s", width, he->srcline); in hist_entry__srcline_snprintf()
414 static int hist_entry__srcline_from_snprintf(struct hist_entry *he, char *bf, in hist_entry__srcline_from_snprintf() argument
417 return repsep_snprintf(bf, size, "%-*.*s", width, width, he->branch_info->srcline_from); in hist_entry__srcline_from_snprintf()
441 static int hist_entry__srcline_to_snprintf(struct hist_entry *he, char *bf, in hist_entry__srcline_to_snprintf() argument
444 return repsep_snprintf(bf, size, "%-*.*s", width, width, he->branch_info->srcline_to); in hist_entry__srcline_to_snprintf()
454 static int hist_entry__sym_ipc_snprintf(struct hist_entry *he, char *bf, in hist_entry__sym_ipc_snprintf() argument
458 struct symbol *sym = he->ms.sym; in hist_entry__sym_ipc_snprintf()
487 static int hist_entry__sym_ipc_null_snprintf(struct hist_entry *he in hist_entry__sym_ipc_null_snprintf()
541 static int hist_entry__srcfile_snprintf(struct hist_entry *he, char *bf, in hist_entry__srcfile_snprintf() argument
544 if (!he->srcfile) in hist_entry__srcfile_snprintf()
545 he->srcfile = hist_entry__get_srcfile(he); in hist_entry__srcfile_snprintf()
547 return repsep_snprintf(bf, size, "%-.*s", width, he->srcfile); in hist_entry__srcfile_snprintf()
571 static int hist_entry__parent_snprintf(struct hist_entry *he, char *bf, in hist_entry__parent_snprintf() argument
575 he->parent ? he->parent->name : "[other]"); in hist_entry__parent_snprintf()
593 static int hist_entry__cpu_snprintf(struct hist_entry *he, char *bf, in hist_entry__cpu_snprintf() argument
596 return repsep_snprintf(bf, size, "%*.*d", width, width, he->cpu); in hist_entry__cpu_snprintf()
631 static int hist_entry__cgroup_id_snprintf(struct hist_entry *he, in hist_entry__cgroup_id_snprintf() argument
635 return repsep_snprintf(bf, size, "%lu/0x%lx", he->cgroup_id.dev, in hist_entry__cgroup_id_snprintf()
636 he->cgroup_id.ino); in hist_entry__cgroup_id_snprintf()
654 static int hist_entry__cgroup_snprintf(struct hist_entry *he, in hist_entry__cgroup_snprintf() argument
660 if (he->cgroup) { in hist_entry__cgroup_snprintf()
661 struct cgroup *cgrp = cgroup__find(he->ms.maps->machine->env, in hist_entry__cgroup_snprintf()
662 he->cgroup); in hist_entry__cgroup_snprintf()
687 static int hist_entry__socket_snprintf(struct hist_entry *he, char *bf, in hist_entry__socket_snprintf() argument
690 return repsep_snprintf(bf, size, "%*.*d", width, width-3, he->socket); in hist_entry__socket_snprintf()
693 static int hist_entry__socket_filter(struct hist_entry *he, int type, const void *arg) in hist_entry__socket_filter() argument
700 return sk >= 0 && he->socket != sk; in hist_entry__socket_filter()
719 static int hist_entry__time_snprintf(struct hist_entry *he, char *bf, in hist_entry__time_snprintf() argument
725 timestamp__scnprintf_nsec(he->time, he_time, in hist_entry__time_snprintf()
728 timestamp__scnprintf_usec(he->time, he_time, in hist_entry__time_snprintf()
743 static char *get_trace_output(struct hist_entry *he) in get_trace_output() argument
748 .data = he->raw_data, in get_trace_output()
749 .size = he->raw_size, in get_trace_output()
752 evsel = hists_to_evsel(he->hists); in get_trace_output()
756 tep_print_fields(&seq, he->raw_data, he->raw_size, in get_trace_output()
786 static int hist_entry__trace_snprintf(struct hist_entry *he, char *bf, in hist_entry__trace_snprintf() argument
791 evsel = hists_to_evsel(he->hists); in hist_entry__trace_snprintf()
795 if (he->trace_output == NULL) in hist_entry__trace_snprintf()
796 he->trace_output = get_trace_output(he); in hist_entry__trace_snprintf()
797 return repsep_snprintf(bf, size, "%-.*s", width, he->trace_output); in hist_entry__trace_snprintf()
819 static int hist_entry__dso_from_snprintf(struct hist_entry *he, char *bf, in hist_entry__dso_from_snprintf() argument
822 if (he->branch_info) in hist_entry__dso_from_snprintf()
823 return _hist_entry__dso_snprintf(he->branch_info->from.ms.map, in hist_entry__dso_from_snprintf()
829 static int hist_entry__dso_from_filter(struct hist_entry *he, int type, in hist_entry__dso_from_filter() argument
837 return dso && (!he->branch_info || !he->branch_info->from.ms.map || in hist_entry__dso_from_filter()
838 he->branch_info->from.ms.map->dso != dso); in hist_entry__dso_from_filter()
851 static int hist_entry__dso_to_snprintf(struct hist_entry *he, char *bf, in hist_entry__dso_to_snprintf() argument
854 if (he->branch_info) in hist_entry__dso_to_snprintf()
855 return _hist_entry__dso_snprintf(he->branch_info->to.ms.map, in hist_entry__dso_to_snprintf()
861 static int hist_entry__dso_to_filter(struct hist_entry *he, int type, in hist_entry__dso_to_filter() argument
869 return dso && (!he->branch_info || !he->branch_info->to.ms.map || in hist_entry__dso_to_filter()
870 he->branch_info->to.ms.map->dso != dso); in hist_entry__dso_to_filter()
908 static int hist_entry__sym_from_snprintf(struct hist_entry *he, char *bf, in hist_entry__sym_from_snprintf() argument
911 if (he->branch_info) { in hist_entry__sym_from_snprintf()
912 struct addr_map_symbol *from = &he->branch_info->from; in hist_entry__sym_from_snprintf()
915 he->level, bf, size, width); in hist_entry__sym_from_snprintf()
921 static int hist_entry__sym_to_snprintf(struct hist_entry *he, char *bf, in hist_entry__sym_to_snprintf() argument
924 if (he->branch_info) { in hist_entry__sym_to_snprintf()
925 struct addr_map_symbol *to = &he->branch_info->to; in hist_entry__sym_to_snprintf()
928 he->level, bf, size, width); in hist_entry__sym_to_snprintf()
934 static int hist_entry__sym_from_filter(struct hist_entry *he, int type, in hist_entry__sym_from_filter() argument
942 return sym && !(he->branch_info && he->branch_info->from.ms.sym && in hist_entry__sym_from_filter()
943 strstr(he->branch_info->from.ms.sym->name, sym)); in hist_entry__sym_from_filter()
946 static int hist_entry__sym_to_filter(struct hist_entry *he, int type, in hist_entry__sym_to_filter() argument
954 return sym && !(he->branch_info && he->branch_info->to.ms.sym && in hist_entry__sym_to_filter()
955 strstr(he->branch_info->to.ms.sym->name, sym)); in hist_entry__sym_to_filter()
1003 static int hist_entry__mispredict_snprintf(struct hist_entry *he, char *bf, in hist_entry__mispredict_snprintf() argument
1007 if (he->branch_info) { in hist_entry__mispredict_snprintf()
1008 if (he->branch_info->flags.predicted) in hist_entry__mispredict_snprintf()
1010 else if (he->branch_info->flags.mispred) in hist_entry__mispredict_snprintf()
1027 static int hist_entry__cycles_snprintf(struct hist_entry *he, char *bf, in hist_entry__cycles_snprintf() argument
1030 if (!he->branch_info) in hist_entry__cycles_snprintf()
1032 if (he->branch_info->flags.cycles == 0) in hist_entry__cycles_snprintf()
1035 he->branch_info->flags.cycles); in hist_entry__cycles_snprintf()
1059 static int hist_entry__daddr_snprintf(struct hist_entry *he, char *bf, in hist_entry__daddr_snprintf() argument
1065 if (he->mem_info) { in hist_entry__daddr_snprintf()
1066 addr = he->mem_info->daddr.addr; in hist_entry__daddr_snprintf()
1067 ms = &he->mem_info->daddr.ms; in hist_entry__daddr_snprintf()
1069 return _hist_entry__sym_snprintf(ms, addr, he->level, bf, size, width); in hist_entry__daddr_snprintf()
1085 static int hist_entry__iaddr_snprintf(struct hist_entry *he, char *bf, in hist_entry__iaddr_snprintf() argument
1091 if (he->mem_info) { in hist_entry__iaddr_snprintf()
1092 addr = he->mem_info->iaddr.addr; in hist_entry__iaddr_snprintf()
1093 ms = &he->mem_info->iaddr.ms; in hist_entry__iaddr_snprintf()
1095 return _hist_entry__sym_snprintf(ms, addr, he->level, bf, size, width); in hist_entry__iaddr_snprintf()
1112 static int hist_entry__dso_daddr_snprintf(struct hist_entry *he, char *bf, in hist_entry__dso_daddr_snprintf() argument
1117 if (he->mem_info) in hist_entry__dso_daddr_snprintf()
1118 map = he->mem_info->daddr.ms.map; in hist_entry__dso_daddr_snprintf()
1142 static int hist_entry__locked_snprintf(struct hist_entry *he, char *bf, in hist_entry__locked_snprintf() argument
1147 perf_mem__lck_scnprintf(out, sizeof(out), he->mem_info); in hist_entry__locked_snprintf()
1170 static int hist_entry__tlb_snprintf(struct hist_entry *he, char *bf, in hist_entry__tlb_snprintf() argument
1175 perf_mem__tlb_scnprintf(out, sizeof(out), he->mem_info); in hist_entry__tlb_snprintf()
1198 static int hist_entry__lvl_snprintf(struct hist_entry *he, char *bf, in hist_entry__lvl_snprintf() argument
1203 perf_mem__lvl_scnprintf(out, sizeof(out), he->mem_info); in hist_entry__lvl_snprintf()
1226 static int hist_entry__snoop_snprintf(struct hist_entry *he, char *bf, in hist_entry__snoop_snprintf() argument
1231 perf_mem__snp_scnprintf(out, sizeof(out), he->mem_info); in hist_entry__snoop_snprintf()
1291 static int hist_entry__dcacheline_snprintf(struct hist_entry *he, char *bf, in hist_entry__dcacheline_snprintf() argument
1297 char level = he->level; in hist_entry__dcacheline_snprintf()
1299 if (he->mem_info) { in hist_entry__dcacheline_snprintf()
1300 struct map *map = he->mem_info->daddr.ms.map; in hist_entry__dcacheline_snprintf()
1302 addr = cl_address(he->mem_info->daddr.al_addr); in hist_entry__dcacheline_snprintf()
1303 ms = &he->mem_info->daddr.ms; in hist_entry__dcacheline_snprintf()
1306 if ((he->cpumode != PERF_RECORD_MISC_KERNEL) && in hist_entry__dcacheline_snprintf()
1325 static u64 he_weight(struct hist_entry *he) in he_weight() argument
1327 return he->stat.nr_events ? he->stat.weight / he->stat.nr_events : 0; in he_weight()
1336 static int hist_entry__local_weight_snprintf(struct hist_entry *he, char *bf, in hist_entry__local_weight_snprintf() argument
1339 return repsep_snprintf(bf, size, "%-*llu", width, he_weight(he)); in hist_entry__local_weight_snprintf()
1355 static int hist_entry__global_weight_snprintf(struct hist_entry *he, char *bf, in hist_entry__global_weight_snprintf() argument
1358 return repsep_snprintf(bf, size, "%-*llu", width, he->stat.weight); in hist_entry__global_weight_snprintf()
1437 static int hist_entry__phys_daddr_snprintf(struct hist_entry *he, char *bf, in hist_entry__phys_daddr_snprintf() argument
1444 addr = he->mem_info->daddr.phys_addr; in hist_entry__phys_daddr_snprintf()
1446 ret += repsep_snprintf(bf + ret, size - ret, "[%c] ", he->level); in hist_entry__phys_daddr_snprintf()
1475 static int hist_entry__abort_snprintf(struct hist_entry *he, char *bf, in hist_entry__abort_snprintf() argument
1480 if (he->branch_info) { in hist_entry__abort_snprintf()
1481 if (he->branch_info->flags.abort) in hist_entry__abort_snprintf()
1507 static int hist_entry__in_tx_snprintf(struct hist_entry *he, char *bf, in hist_entry__in_tx_snprintf() argument
1512 if (he->branch_info) { in hist_entry__in_tx_snprintf()
1513 if (he->branch_info->flags.in_tx) in hist_entry__in_tx_snprintf()
1570 static int hist_entry__transaction_snprintf(struct hist_entry *he, char *bf, in hist_entry__transaction_snprintf() argument
1573 u64 t = he->transaction; in hist_entry__transaction_snprintf()
1627 static int hist_entry__sym_size_snprintf(struct hist_entry *he, char *bf, in hist_entry__sym_size_snprintf() argument
1630 return _hist_entry__sym_size_snprintf(he->ms.sym, bf, size, width); in hist_entry__sym_size_snprintf()
1667 static int hist_entry__dso_size_snprintf(struct hist_entry *he, char *bf, in hist_entry__dso_size_snprintf() argument
1670 return _hist_entry__dso_size_snprintf(he->ms.map, bf, size, width); in hist_entry__dso_size_snprintf()
1815 struct hist_entry *he) in __sort__hpp_entry() argument
1823 len = hists__col_len(he->hists, hse->se->se_width_idx); in __sort__hpp_entry()
1825 return hse->se->se_snprintf(he, hpp->buf, hpp->size, len); in __sort__hpp_entry()
1962 int hist_entry__filter(struct hist_entry *he, int type, const void *arg) in hist_entry__filter() argument
1969 perf_hpp_list__for_each_format(he->hpp_list, fmt) { in hist_entry__filter()
1981 r = hse->se->se_filter(he, type, arg); in hist_entry__filter()
2048 struct hist_entry *he) in update_dynamic_len() argument
2059 if (!he->trace_output) in update_dynamic_len()
2060 he->trace_output = get_trace_output(he); in update_dynamic_len()
2063 str = he->trace_output; in update_dynamic_len()
2131 struct hist_entry *he) in __sort__hde_entry() argument
2149 if (!he->trace_output) in __sort__hde_entry()
2150 he->trace_output = get_trace_output(he); in __sort__hde_entry()
2154 str = he->trace_output; in __sort__hde_entry()
2183 tep_print_field(&seq, he->raw_data, hde->field); in __sort__hde_entry()