From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753170AbdEEM5R (ORCPT ); Fri, 5 May 2017 08:57:17 -0400 Received: from mail.kernel.org ([198.145.29.136]:55784 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751859AbdEEM5Q (ORCPT ); Fri, 5 May 2017 08:57:16 -0400 Date: Fri, 5 May 2017 09:57:10 -0300 From: Arnaldo Carvalho de Melo To: Adam Stylinski Cc: Ravi Bangoria , Alexander Shishkin , Christian Borntraeger , Peter Zijlstra , Taeung Song , linux-kernel@vger.kernel.org Subject: Re: [PATCH] Fixed a pathing issue with objdump and grep Message-ID: <20170505125710.GG7891@kernel.org> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Url: http://acmel.wordpress.com User-Agent: Mutt/1.8.0 (2017-02-23) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Em Wed, May 03, 2017 at 12:12:23PM +0000, Adam Stylinski escreveu: > The path fed to the argument for objdump used in the perf-annotate > feature didn't escape spaces. The subsequent argument to grep for > the name of the DSO containing symbols also assumed no spaces existed > in the pathname, so grep also parsed these as extra positional > arguments. This one didn't apply to tip/perf/urgent, so I tried another patch addressing the same issue, from Ravi Bangoria, and it applied, ok? Please take a look at: http://lkml.kernel.org/r/20170505101417.2117-1-ravi.bangoria@linux.vnet.ibm.com - Arnaldo > Signed-off-by: Adam E Stylinski > --- > tools/perf/util/annotate.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/tools/perf/util/annotate.c b/tools/perf/util/annotate.c > index 7aa57225cbf7..fc5a96d584f2 100644 > --- a/tools/perf/util/annotate.c > +++ b/tools/perf/util/annotate.c > @@ -1441,7 +1441,7 @@ int symbol__disassemble(struct symbol *sym, struct map *map, const char *arch_na > snprintf(command, sizeof(command), > "%s %s%s --start-address=0x%016" PRIx64 > " --stop-address=0x%016" PRIx64 > - " -l -d %s %s -C %s 2>/dev/null|grep -v %s|expand", > + " -l -d %s %s -C \"%s\" 2>/dev/null|grep -v \"%s\"|expand", > objdump_path ? objdump_path : "objdump", > disassembler_style ? "-M " : "", > disassembler_style ? disassembler_style : "", > -- > 2.12.2