Re: [PATCH 22/22] perf tools: Fix the code to strip command name

From: David Ahern
Date: Mon Apr 24 2017 - 16:08:30 EST


On 4/24/17 1:54 PM, Arnaldo Carvalho de Melo wrote:
> From: Jiri Olsa <jolsa@xxxxxxxxxx>
>
> Recent commit broke command name strip in perf_event__get_comm_ids
> function. It replaced left to right search for '\n' with rtrim, which
> actually does right to left search. It occasionally caught earlier '\n'
> and kept trash in the command name.
>

interesting. When I reviewed that patch it didn't cross my mind that a
comm Name could have a newline in it. seems very odd to do so.