]> git.baikalelectronics.ru Git - kernel.git/commit
perf report/top TUI: Fix title line formatting
authorArnaldo Carvalho de Melo <acme@redhat.com>
Mon, 30 Mar 2020 15:35:21 +0000 (12:35 -0300)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Fri, 3 Apr 2020 12:37:55 +0000 (09:37 -0300)
commit7d6155cd3361237a188d751080342d3b8aa60c54
tree17a7a660b9cdef2f497512778cbc19b1bf384a8e
parent957d20c2c0f52a205727114e6ee10b6ce1b736d1
perf report/top TUI: Fix title line formatting

In 5badce10b527 ("perf hists browser: Allow passing an initial hotkey")
the hist_entry__title() call was cut'n'pasted to a function where the
'title' variable is a pointer, not an array, so the sizeof(title)
continues syntactically valid but ends up reducing the real size of the
buffer where to format the first line in the screen to 8 bytes, which
makes the formatting at the title at each refresh to produce just the
string "Samples ", duh, fix it by passing the size of the buffer.

Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Jin Yao <yao.jin@linux.intel.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Fixes: 5badce10b527 ("perf hists browser: Allow passing an initial hotkey")
Link: http://lore.kernel.org/lkml/20200330154314.GB4576@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/ui/browsers/hists.c