Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

perf trace: Fix alignment for [continued] lines

We were not taking into account the "... [continued]" printed
characters, fix it.

Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Luis Cláudio Gonçalves <lclaudio@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Wang Nan <wangnan0@huawei.com>
Link: https://lkml.kernel.org/n/tip-qt20y0acmf8k0bzisce8kw95@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>

+3 -2
+3 -2
tools/perf/builtin-trace.c
··· 2032 2032 if (ttrace->entry_pending) { 2033 2033 printed = fprintf(trace->output, "%s", ttrace->entry_str); 2034 2034 } else { 2035 - fprintf(trace->output, " ... ["); 2035 + printed += fprintf(trace->output, " ... ["); 2036 2036 color_fprintf(trace->output, PERF_COLOR_YELLOW, "continued"); 2037 - fprintf(trace->output, "]: %s()", sc->name); 2037 + printed += 9; 2038 + printed += fprintf(trace->output, "]: %s()", sc->name); 2038 2039 } 2039 2040 2040 2041 printed++; /* the closing ')' */