From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1174154AbdDXUI2 (ORCPT ); Mon, 24 Apr 2017 16:08:28 -0400 Received: from mail-io0-f194.google.com ([209.85.223.194]:36521 "EHLO mail-io0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1167378AbdDXUIT (ORCPT ); Mon, 24 Apr 2017 16:08:19 -0400 Subject: Re: [PATCH 22/22] perf tools: Fix the code to strip command name To: Arnaldo Carvalho de Melo , Ingo Molnar References: <20170424195439.29875-1-acme@kernel.org> <20170424195439.29875-23-acme@kernel.org> Cc: linux-kernel@vger.kernel.org, Jiri Olsa , Namhyung Kim , Peter Zijlstra , Yao Jin , Arnaldo Carvalho de Melo From: David Ahern Message-ID: <93493b57-0ec4-bba4-8bd8-925f03000d40@gmail.com> Date: Mon, 24 Apr 2017 14:08:16 -0600 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: <20170424195439.29875-23-acme@kernel.org> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 4/24/17 1:54 PM, Arnaldo Carvalho de Melo wrote: > From: Jiri Olsa > > 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.