mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
perf hists: Handle field separator properly
When a field separator is given, the output format doesn't need to be fancy like aligning to column length, coloring the percent value and so on. And since there's a slight difference to normal format, fix it not to break backward compatibility. Signed-off-by: Namhyung Kim <namhyung@kernel.org> Cc: Ingo Molnar <mingo@kernel.org> Cc: Paul Mackerras <paulus@samba.org> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Link: http://lkml.kernel.org/r/1346640790-17197-3-git-send-email-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
This commit is contained in:
parent
ea251d51d2
commit
9ffad987ff
2 changed files with 50 additions and 27 deletions
|
@ -319,11 +319,12 @@ static int hist_entry__fprintf(struct hist_entry *he, size_t size,
|
|||
.displacement = displacement,
|
||||
.ptr = pair_hists,
|
||||
};
|
||||
bool color = !symbol_conf.field_sep;
|
||||
|
||||
if (size == 0 || size > sizeof(bf))
|
||||
size = hpp.size = sizeof(bf);
|
||||
|
||||
ret = hist_entry__period_snprintf(&hpp, he, true);
|
||||
ret = hist_entry__period_snprintf(&hpp, he, color);
|
||||
hist_entry__sort_snprintf(he, bf + ret, size - ret, hists);
|
||||
|
||||
ret = fprintf(fp, "%s\n", bf);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue