From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755127AbdKNNAU (ORCPT ); Tue, 14 Nov 2017 08:00:20 -0500 Received: from mail.kernel.org ([198.145.29.99]:58410 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753971AbdKNNAQ (ORCPT ); Tue, 14 Nov 2017 08:00:16 -0500 DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4325E218B1 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=acme@kernel.org Date: Tue, 14 Nov 2017 10:00:13 -0300 From: Arnaldo Carvalho de Melo To: Namhyung Kim Cc: Sihyeon Jang , Taeung Song , linux-kernel@vger.kernel.org, Jiri Olsa , kernel-team@lge.com Subject: Re: [PATCH 1/3] perf help: Document missing options Message-ID: <20171114130013.GI8836@kernel.org> References: <1510449047-12941-1-git-send-email-uneedsihyeon@gmail.com> <20171113182956.GA8836@kernel.org> <20171114001542.GA16464@sejong> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20171114001542.GA16464@sejong> X-Url: http://acmel.wordpress.com User-Agent: Mutt/1.9.1 (2017-09-22) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Em Tue, Nov 14, 2017 at 09:15:42AM +0900, Namhyung Kim escreveu: > Hi Arnaldo, > > On Mon, Nov 13, 2017 at 03:29:56PM -0300, Arnaldo Carvalho de Melo wrote: > > Em Sun, Nov 12, 2017 at 10:10:45AM +0900, Sihyeon Jang escreveu: > > > Cc: Jiri Olsa > > > Cc: Namhyung Kim > > > Signed-off-by: Sihyeon Jang > > > --- > > > tools/perf/Documentation/perf-help.txt | 14 +++++++++++++- > > > 1 file changed, 13 insertions(+), 1 deletion(-) > > > > > > diff --git a/tools/perf/Documentation/perf-help.txt b/tools/perf/Documentation/perf-help.txt > > > index 5143918..bb605af 100644 > > > --- a/tools/perf/Documentation/perf-help.txt > > > +++ b/tools/perf/Documentation/perf-help.txt > > > @@ -7,7 +7,7 @@ perf-help - display help information about perf > > > > > > SYNOPSIS > > > -------- > > > -'perf help' [-a|--all] [COMMAND] > > > +'perf help' [--all] [--man|--web|--info] [COMMAND] > > > > Can you try figuring out if this actually works? I tried here and it > > doesn't, its an area we took "for free" when we copied the initial > > codebase from git.git, but I never looked at this area that much, now > > that I try: > > Yeah, I'm not sure we need to keep it. > > > > > > [acme@jouet linux]$ perf help > > Config with no key for man viewer: childrenError: wrong config key-value pair top.children=true > > [acme@jouet linux]$ > > > > Unsure if this is something that got broken by the 'perf config' > > patches, Taeung? > > Looks like a bug in 8e99b6d4533c ("tools include: Adopt strstarts() > from the kernel"). Wow, who did this?! ;-P > Following patch should fix it: Thanks! > Thanks, > Namhyung > > > >From 096b78b437b5758acc025498e88d73d9d471b3c0 Mon Sep 17 00:00:00 2001 > From: Namhyung Kim > Date: Tue, 14 Nov 2017 09:10:43 +0900 > Subject: [PATCH] perf help: Fix a bug during strstart() conversion > > The commit 8e99b6d4533c changed prefixcmp() to strstart() but missed to > change the return value in some place. It makes perf help print > annoying output even for sane config items like below: > > $ perf help > '.root': unsupported man viewer sub key. > ... > > Fixes: 8e99b6d4533c ("tools include: Adopt strstarts() from the kernel") > Cc: Taeung Song > Signed-off-by: Namhyung Kim > --- > tools/perf/builtin-help.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/tools/perf/builtin-help.c b/tools/perf/builtin-help.c > index dbe4e4153bcf..ff51e5fc0daf 100644 > --- a/tools/perf/builtin-help.c > +++ b/tools/perf/builtin-help.c > @@ -283,7 +283,7 @@ static int perf_help_config(const char *var, const char *value, void *cb) > add_man_viewer(value); > return 0; > } > - if (!strstarts(var, "man.")) > + if (strstarts(var, "man.")) > return add_man_viewer_info(var, value); > > return 0; > @@ -313,7 +313,7 @@ static const char *cmd_to_page(const char *perf_cmd) > > if (!perf_cmd) > return "perf"; > - else if (!strstarts(perf_cmd, "perf")) > + else if (strstarts(perf_cmd, "perf")) > return perf_cmd; > > return asprintf(&s, "perf-%s", perf_cmd) < 0 ? NULL : s; > -- > 2.15.0