static void hists__calc_col_len(struct hists *hists, struct hist_entry *h) { u16 len; if (h->ms.sym) hists__new_col_len(hists, HISTC_SYMBOL, h->ms.sym->namelen); else { const unsigned int unresolved_col_width = BITS_PER_LONG / 4; if (hists__col_len(hists, HISTC_DSO) < unresolved_col_width && !symbol_conf.col_width_list_str && !symbol_conf.field_sep && !symbol_conf.dso_list) hists__set_col_len(hists, HISTC_DSO, unresolved_col_width); } len = thread__comm_len(h->thread); if (hists__new_col_len(hists, HISTC_COMM, len)) hists__set_col_len(hists, HISTC_THREAD, len + 6); if (h->ms.map) { len = dso__name_len(h->ms.map->dso); hists__new_col_len(hists, HISTC_DSO, len); } }
bool hists__new_col_len(struct hists *hists, enum hist_column col, u16 len) { if (len > hists__col_len(hists, col)) { hists__set_col_len(hists, col, len); return true; } return false; }
static void hists__set_unres_dso_col_len(struct hists *hists, int dso) { const unsigned int unresolved_col_width = BITS_PER_LONG / 4; if (hists__col_len(hists, dso) < unresolved_col_width && !symbol_conf.col_width_list_str && !symbol_conf.field_sep && !symbol_conf.dso_list) hists__set_col_len(hists, dso, unresolved_col_width); }