[PATCH] perf tools: Update srcline column length
From: Namhyung Kim
Date: Sat Aug 08 2015 - 23:28:01 EST
It didn't calculate the column length so the default of header length
used only. Update the length when we get the srcline actually.
Cc: Andi Kleen <andi@xxxxxxxxxxxxxx>
Signed-off-by: Namhyung Kim <namhyung@xxxxxxxxxx>
---
tools/perf/util/sort.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/tools/perf/util/sort.c b/tools/perf/util/sort.c
index 5177088a71d3..85e7e3e75d39 100644
--- a/tools/perf/util/sort.c
+++ b/tools/perf/util/sort.c
@@ -291,6 +291,8 @@ sort__srcline_cmp(struct hist_entry *left, struct hist_entry *right)
left->srcline = get_srcline(map->dso,
map__rip_2objdump(map, left->ip),
left->ms.sym, true);
+ hists__new_col_len(left->hists, HISTC_SRCLINE,
+ strlen(left->srcline));
}
}
if (!right->srcline) {
@@ -301,6 +303,8 @@ sort__srcline_cmp(struct hist_entry *left, struct hist_entry *right)
right->srcline = get_srcline(map->dso,
map__rip_2objdump(map, right->ip),
right->ms.sym, true);
+ hists__new_col_len(right->hists, HISTC_SRCLINE,
+ strlen(right->srcline));
}
}
return strcmp(right->srcline, left->srcline);
--
2.5.0
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/