linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/3] perf help: Document missing options
@ 2017-11-12  1:10 Sihyeon Jang
  2017-11-12  1:10 ` [PATCH 2/3] perf top: " Sihyeon Jang
                   ` (2 more replies)
  0 siblings, 3 replies; 14+ messages in thread
From: Sihyeon Jang @ 2017-11-12  1:10 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: linux-kernel, Jiri Olsa, Namhyung Kim, Sihyeon Jang

Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Signed-off-by: Sihyeon Jang <uneedsihyeon@gmail.com>
---
 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]
 
 DESCRIPTION
 -----------
@@ -33,6 +33,18 @@ OPTIONS
 	Prints all the available commands on the standard output. This
 	option supersedes any other option.
 
+-i::
+--info::
+	Shows info page.
+
+-m::
+--man::
+	Shows man page.
+
+-w::
+--web::
+	Shows manual in web browser.
+
 PERF
 ----
 Part of the linkperf:perf[1] suite
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH 2/3] perf top: Document missing options
  2017-11-12  1:10 [PATCH 1/3] perf help: Document missing options Sihyeon Jang
@ 2017-11-12  1:10 ` Sihyeon Jang
  2017-11-13 18:25   ` Arnaldo Carvalho de Melo
  2017-11-18  8:29   ` [tip:perf/core] " tip-bot for Sihyeon Jang
  2017-11-12  1:10 ` [PATCH 3/3] perf top: Remove a duplicate word Sihyeon Jang
  2017-11-13 18:29 ` [PATCH 1/3] perf help: Document missing options Arnaldo Carvalho de Melo
  2 siblings, 2 replies; 14+ messages in thread
From: Sihyeon Jang @ 2017-11-12  1:10 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: linux-kernel, Jiri Olsa, Namhyung Kim, Sihyeon Jang

Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Signed-off-by: Sihyeon Jang <uneedsihyeon@gmail.com>
---
 tools/perf/Documentation/perf-top.txt | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/tools/perf/Documentation/perf-top.txt b/tools/perf/Documentation/perf-top.txt
index 4353262..8a32cc7 100644
--- a/tools/perf/Documentation/perf-top.txt
+++ b/tools/perf/Documentation/perf-top.txt
@@ -268,6 +268,12 @@ INTERACTIVE PROMPTING KEYS
 [S]::
 	Stop annotation, return to full profile display.
 
+[K]::
+	Hide kernel symbols.
+
+[U]::
+	Hide user symbols.
+
 [z]::
 	Toggle event count zeroing across display updates.
 
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH 3/3] perf top: Remove a duplicate word
  2017-11-12  1:10 [PATCH 1/3] perf help: Document missing options Sihyeon Jang
  2017-11-12  1:10 ` [PATCH 2/3] perf top: " Sihyeon Jang
@ 2017-11-12  1:10 ` Sihyeon Jang
  2017-11-13 18:27   ` Arnaldo Carvalho de Melo
  2017-11-18  8:29   ` [tip:perf/core] " tip-bot for Sihyeon Jang
  2017-11-13 18:29 ` [PATCH 1/3] perf help: Document missing options Arnaldo Carvalho de Melo
  2 siblings, 2 replies; 14+ messages in thread
From: Sihyeon Jang @ 2017-11-12  1:10 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: linux-kernel, Jiri Olsa, Namhyung Kim, Sihyeon Jang

Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Signed-off-by: Sihyeon Jang <uneedsihyeon@gmail.com>
---
 tools/perf/builtin-top.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/perf/builtin-top.c b/tools/perf/builtin-top.c
index adfeeb4..6fe5001 100644
--- a/tools/perf/builtin-top.c
+++ b/tools/perf/builtin-top.c
@@ -409,7 +409,7 @@ static void perf_top__print_mapped_keys(struct perf_top *top)
 	fprintf(stdout, "\t[S]     stop annotation.\n");
 
 	fprintf(stdout,
-		"\t[K]     hide kernel_symbols symbols.     \t(%s)\n",
+		"\t[K]     hide kernel symbols.             \t(%s)\n",
 		top->hide_kernel_symbols ? "yes" : "no");
 	fprintf(stdout,
 		"\t[U]     hide user symbols.               \t(%s)\n",
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 14+ messages in thread

* Re: [PATCH 2/3] perf top: Document missing options
  2017-11-12  1:10 ` [PATCH 2/3] perf top: " Sihyeon Jang
@ 2017-11-13 18:25   ` Arnaldo Carvalho de Melo
  2017-11-18  8:29   ` [tip:perf/core] " tip-bot for Sihyeon Jang
  1 sibling, 0 replies; 14+ messages in thread
From: Arnaldo Carvalho de Melo @ 2017-11-13 18:25 UTC (permalink / raw)
  To: Sihyeon Jang; +Cc: linux-kernel, Jiri Olsa, Namhyung Kim

Em Sun, Nov 12, 2017 at 10:10:46AM +0900, Sihyeon Jang escreveu:
> Cc: Jiri Olsa <jolsa@kernel.org>
> Cc: Namhyung Kim <namhyung@kernel.org>
> Signed-off-by: Sihyeon Jang <uneedsihyeon@gmail.com>

applied
> ---
>  tools/perf/Documentation/perf-top.txt | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/tools/perf/Documentation/perf-top.txt b/tools/perf/Documentation/perf-top.txt
> index 4353262..8a32cc7 100644
> --- a/tools/perf/Documentation/perf-top.txt
> +++ b/tools/perf/Documentation/perf-top.txt
> @@ -268,6 +268,12 @@ INTERACTIVE PROMPTING KEYS
>  [S]::
>  	Stop annotation, return to full profile display.
>  
> +[K]::
> +	Hide kernel symbols.
> +
> +[U]::
> +	Hide user symbols.
> +
>  [z]::
>  	Toggle event count zeroing across display updates.
>  
> -- 
> 2.7.4

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH 3/3] perf top: Remove a duplicate word
  2017-11-12  1:10 ` [PATCH 3/3] perf top: Remove a duplicate word Sihyeon Jang
@ 2017-11-13 18:27   ` Arnaldo Carvalho de Melo
  2017-11-18  8:29   ` [tip:perf/core] " tip-bot for Sihyeon Jang
  1 sibling, 0 replies; 14+ messages in thread
From: Arnaldo Carvalho de Melo @ 2017-11-13 18:27 UTC (permalink / raw)
  To: Sihyeon Jang; +Cc: linux-kernel, Jiri Olsa, Namhyung Kim

Em Sun, Nov 12, 2017 at 10:10:47AM +0900, Sihyeon Jang escreveu:
> Cc: Jiri Olsa <jolsa@kernel.org>
> Cc: Namhyung Kim <namhyung@kernel.org>
> Signed-off-by: Sihyeon Jang <uneedsihyeon@gmail.com>

Thanks, applied.

- Arnaldo

> ---
>  tools/perf/builtin-top.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/tools/perf/builtin-top.c b/tools/perf/builtin-top.c
> index adfeeb4..6fe5001 100644
> --- a/tools/perf/builtin-top.c
> +++ b/tools/perf/builtin-top.c
> @@ -409,7 +409,7 @@ static void perf_top__print_mapped_keys(struct perf_top *top)
>  	fprintf(stdout, "\t[S]     stop annotation.\n");
>  
>  	fprintf(stdout,
> -		"\t[K]     hide kernel_symbols symbols.     \t(%s)\n",
> +		"\t[K]     hide kernel symbols.             \t(%s)\n",
>  		top->hide_kernel_symbols ? "yes" : "no");
>  	fprintf(stdout,
>  		"\t[U]     hide user symbols.               \t(%s)\n",
> -- 
> 2.7.4

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH 1/3] perf help: Document missing options
  2017-11-12  1:10 [PATCH 1/3] perf help: Document missing options Sihyeon Jang
  2017-11-12  1:10 ` [PATCH 2/3] perf top: " Sihyeon Jang
  2017-11-12  1:10 ` [PATCH 3/3] perf top: Remove a duplicate word Sihyeon Jang
@ 2017-11-13 18:29 ` Arnaldo Carvalho de Melo
  2017-11-14  0:15   ` Namhyung Kim
  2 siblings, 1 reply; 14+ messages in thread
From: Arnaldo Carvalho de Melo @ 2017-11-13 18:29 UTC (permalink / raw)
  To: Sihyeon Jang; +Cc: Taeung Song, linux-kernel, Jiri Olsa, Namhyung Kim

Em Sun, Nov 12, 2017 at 10:10:45AM +0900, Sihyeon Jang escreveu:
> Cc: Jiri Olsa <jolsa@kernel.org>
> Cc: Namhyung Kim <namhyung@kernel.org>
> Signed-off-by: Sihyeon Jang <uneedsihyeon@gmail.com>
> ---
>  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:

[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?

- Arnaldo
  
>  DESCRIPTION
>  -----------
> @@ -33,6 +33,18 @@ OPTIONS
>  	Prints all the available commands on the standard output. This
>  	option supersedes any other option.
>  
> +-i::
> +--info::
> +	Shows info page.
> +
> +-m::
> +--man::
> +	Shows man page.
> +
> +-w::
> +--web::
> +	Shows manual in web browser.
> +
>  PERF
>  ----
>  Part of the linkperf:perf[1] suite
> -- 
> 2.7.4

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH 1/3] perf help: Document missing options
  2017-11-13 18:29 ` [PATCH 1/3] perf help: Document missing options Arnaldo Carvalho de Melo
@ 2017-11-14  0:15   ` Namhyung Kim
  2017-11-14  2:18     ` Taeung Song
                       ` (3 more replies)
  0 siblings, 4 replies; 14+ messages in thread
From: Namhyung Kim @ 2017-11-14  0:15 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: Sihyeon Jang, Taeung Song, linux-kernel, Jiri Olsa, kernel-team

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 <jolsa@kernel.org>
> > Cc: Namhyung Kim <namhyung@kernel.org>
> > Signed-off-by: Sihyeon Jang <uneedsihyeon@gmail.com>
> > ---
> >  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").

Following patch should fix it:

Thanks,
Namhyung


>From 096b78b437b5758acc025498e88d73d9d471b3c0 Mon Sep 17 00:00:00 2001
From: Namhyung Kim <namhyung@kernel.org>
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 <treeze.taeung@gmail.com>
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
---
 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

^ permalink raw reply related	[flat|nested] 14+ messages in thread

* Re: [PATCH 1/3] perf help: Document missing options
  2017-11-14  0:15   ` Namhyung Kim
@ 2017-11-14  2:18     ` Taeung Song
  2017-11-14 13:03       ` Arnaldo Carvalho de Melo
  2017-11-14 13:00     ` Arnaldo Carvalho de Melo
                       ` (2 subsequent siblings)
  3 siblings, 1 reply; 14+ messages in thread
From: Taeung Song @ 2017-11-14  2:18 UTC (permalink / raw)
  To: Namhyung Kim, Arnaldo Carvalho de Melo
  Cc: Sihyeon Jang, linux-kernel, Jiri Olsa, kernel-team

Hi Arnaldo and Namhyung :)

On 11/14/2017 09:15 AM, Namhyung Kim wrote:
> 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 <jolsa@kernel.org>
>>> Cc: Namhyung Kim <namhyung@kernel.org>
>>> Signed-off-by: Sihyeon Jang <uneedsihyeon@gmail.com>
>>> ---
>>>   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").
> 
> Following patch should fix it:
> 
> Thanks,
> Namhyung

I also checked this error and test the below patch.
It seems that Namhyung already fixes it !!

Thanks,
Taeung

> 
> 
>  From 096b78b437b5758acc025498e88d73d9d471b3c0 Mon Sep 17 00:00:00 2001
> From: Namhyung Kim <namhyung@kernel.org>
> 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 <treeze.taeung@gmail.com>
> Signed-off-by: Namhyung Kim <namhyung@kernel.org>
> ---
>   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;
> 

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH 1/3] perf help: Document missing options
  2017-11-14  0:15   ` Namhyung Kim
  2017-11-14  2:18     ` Taeung Song
@ 2017-11-14 13:00     ` Arnaldo Carvalho de Melo
  2017-11-18  8:32     ` [tip:perf/core] perf help: Fix a bug during strstart() conversion tip-bot for Namhyung Kim
  2017-11-29  6:30     ` tip-bot for Namhyung Kim
  3 siblings, 0 replies; 14+ messages in thread
From: Arnaldo Carvalho de Melo @ 2017-11-14 13:00 UTC (permalink / raw)
  To: Namhyung Kim
  Cc: Sihyeon Jang, Taeung Song, linux-kernel, Jiri Olsa, kernel-team

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 <jolsa@kernel.org>
> > > Cc: Namhyung Kim <namhyung@kernel.org>
> > > Signed-off-by: Sihyeon Jang <uneedsihyeon@gmail.com>
> > > ---
> > >  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 <namhyung@kernel.org>
> 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 <treeze.taeung@gmail.com>
> Signed-off-by: Namhyung Kim <namhyung@kernel.org>
> ---
>  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

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH 1/3] perf help: Document missing options
  2017-11-14  2:18     ` Taeung Song
@ 2017-11-14 13:03       ` Arnaldo Carvalho de Melo
  0 siblings, 0 replies; 14+ messages in thread
From: Arnaldo Carvalho de Melo @ 2017-11-14 13:03 UTC (permalink / raw)
  To: Taeung Song
  Cc: Namhyung Kim, Sihyeon Jang, linux-kernel, Jiri Olsa, kernel-team

Em Tue, Nov 14, 2017 at 11:18:10AM +0900, Taeung Song escreveu:
> Hi Arnaldo and Namhyung :)
> 
> On 11/14/2017 09:15 AM, Namhyung Kim wrote:
> > 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 <jolsa@kernel.org>
> > > > Cc: Namhyung Kim <namhyung@kernel.org>
> > > > Signed-off-by: Sihyeon Jang <uneedsihyeon@gmail.com>
> > > > ---
> > > >   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").
> > 
> > Following patch should fix it:
> > 
> > Thanks,
> > Namhyung
> 
> I also checked this error and test the below patch.
> It seems that Namhyung already fixes it !!

Thanks for checking, added a Tested-by: Taeung,

- Arnaldo
 
> Thanks,
> Taeung
> 
> > 
> > 
> >  From 096b78b437b5758acc025498e88d73d9d471b3c0 Mon Sep 17 00:00:00 2001
> > From: Namhyung Kim <namhyung@kernel.org>
> > 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 <treeze.taeung@gmail.com>
> > Signed-off-by: Namhyung Kim <namhyung@kernel.org>
> > ---
> >   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;
> > 

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [tip:perf/core] perf top: Document missing options
  2017-11-12  1:10 ` [PATCH 2/3] perf top: " Sihyeon Jang
  2017-11-13 18:25   ` Arnaldo Carvalho de Melo
@ 2017-11-18  8:29   ` tip-bot for Sihyeon Jang
  1 sibling, 0 replies; 14+ messages in thread
From: tip-bot for Sihyeon Jang @ 2017-11-18  8:29 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: jolsa, namhyung, acme, linux-kernel, uneedsihyeon, tglx, mingo, hpa

Commit-ID:  958964f803b27baffd238708842b527a1d30e110
Gitweb:     https://git.kernel.org/tip/958964f803b27baffd238708842b527a1d30e110
Author:     Sihyeon Jang <uneedsihyeon@gmail.com>
AuthorDate: Sun, 12 Nov 2017 10:10:46 +0900
Committer:  Arnaldo Carvalho de Melo <acme@redhat.com>
CommitDate: Thu, 16 Nov 2017 14:49:56 -0300

perf top: Document missing options

Signed-off-by: Sihyeon Jang <uneedsihyeon@gmail.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Link: http://lkml.kernel.org/r/1510449047-12941-2-git-send-email-uneedsihyeon@gmail.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/Documentation/perf-top.txt | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/tools/perf/Documentation/perf-top.txt b/tools/perf/Documentation/perf-top.txt
index 4353262..8a32cc7 100644
--- a/tools/perf/Documentation/perf-top.txt
+++ b/tools/perf/Documentation/perf-top.txt
@@ -268,6 +268,12 @@ INTERACTIVE PROMPTING KEYS
 [S]::
 	Stop annotation, return to full profile display.
 
+[K]::
+	Hide kernel symbols.
+
+[U]::
+	Hide user symbols.
+
 [z]::
 	Toggle event count zeroing across display updates.
 

^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [tip:perf/core] perf top: Remove a duplicate word
  2017-11-12  1:10 ` [PATCH 3/3] perf top: Remove a duplicate word Sihyeon Jang
  2017-11-13 18:27   ` Arnaldo Carvalho de Melo
@ 2017-11-18  8:29   ` tip-bot for Sihyeon Jang
  1 sibling, 0 replies; 14+ messages in thread
From: tip-bot for Sihyeon Jang @ 2017-11-18  8:29 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: acme, namhyung, jolsa, linux-kernel, mingo, hpa, uneedsihyeon, tglx

Commit-ID:  8fce3743cea47db86dd13ab4c479158a872271e8
Gitweb:     https://git.kernel.org/tip/8fce3743cea47db86dd13ab4c479158a872271e8
Author:     Sihyeon Jang <uneedsihyeon@gmail.com>
AuthorDate: Sun, 12 Nov 2017 10:10:47 +0900
Committer:  Arnaldo Carvalho de Melo <acme@redhat.com>
CommitDate: Thu, 16 Nov 2017 14:49:56 -0300

perf top: Remove a duplicate word

Signed-off-by: Sihyeon Jang <uneedsihyeon@gmail.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Link: http://lkml.kernel.org/r/1510449047-12941-3-git-send-email-uneedsihyeon@gmail.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/builtin-top.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/perf/builtin-top.c b/tools/perf/builtin-top.c
index 0789f95..68320ac 100644
--- a/tools/perf/builtin-top.c
+++ b/tools/perf/builtin-top.c
@@ -412,7 +412,7 @@ static void perf_top__print_mapped_keys(struct perf_top *top)
 	fprintf(stdout, "\t[S]     stop annotation.\n");
 
 	fprintf(stdout,
-		"\t[K]     hide kernel_symbols symbols.     \t(%s)\n",
+		"\t[K]     hide kernel symbols.             \t(%s)\n",
 		top->hide_kernel_symbols ? "yes" : "no");
 	fprintf(stdout,
 		"\t[U]     hide user symbols.               \t(%s)\n",

^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [tip:perf/core] perf help: Fix a bug during strstart() conversion
  2017-11-14  0:15   ` Namhyung Kim
  2017-11-14  2:18     ` Taeung Song
  2017-11-14 13:00     ` Arnaldo Carvalho de Melo
@ 2017-11-18  8:32     ` tip-bot for Namhyung Kim
  2017-11-29  6:30     ` tip-bot for Namhyung Kim
  3 siblings, 0 replies; 14+ messages in thread
From: tip-bot for Namhyung Kim @ 2017-11-18  8:32 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: tglx, acme, hpa, mingo, namhyung, uneedsihyeon, jolsa,
	treeze.taeung, linux-kernel

Commit-ID:  2f0af8600e82e9f950fc32908386b9c639f88d48
Gitweb:     https://git.kernel.org/tip/2f0af8600e82e9f950fc32908386b9c639f88d48
Author:     Namhyung Kim <namhyung@kernel.org>
AuthorDate: Tue, 14 Nov 2017 09:15:42 +0900
Committer:  Arnaldo Carvalho de Melo <acme@redhat.com>
CommitDate: Thu, 16 Nov 2017 14:49:59 -0300

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.
  ...

Reported-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Tested-by: Taeung Song <treeze.taeung@gmail.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Sihyeon Jang <uneedsihyeon@gmail.com>
Cc: kernel-team@lge.com
Link: http://lkml.kernel.org/r/20171114001542.GA16464@sejong
Fixes: 8e99b6d4533c ("tools include: Adopt strstarts() from the kernel")
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 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 bd1fede..a0f7ed2 100644
--- a/tools/perf/builtin-help.c
+++ b/tools/perf/builtin-help.c
@@ -284,7 +284,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;
@@ -314,7 +314,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;

^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [tip:perf/core] perf help: Fix a bug during strstart() conversion
  2017-11-14  0:15   ` Namhyung Kim
                       ` (2 preceding siblings ...)
  2017-11-18  8:32     ` [tip:perf/core] perf help: Fix a bug during strstart() conversion tip-bot for Namhyung Kim
@ 2017-11-29  6:30     ` tip-bot for Namhyung Kim
  3 siblings, 0 replies; 14+ messages in thread
From: tip-bot for Namhyung Kim @ 2017-11-29  6:30 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: namhyung, hpa, jolsa, uneedsihyeon, tglx, linux-kernel,
	treeze.taeung, acme, mingo

Commit-ID:  af98f2273fd0af31ce327cd1406b67c7be0b6734
Gitweb:     https://git.kernel.org/tip/af98f2273fd0af31ce327cd1406b67c7be0b6734
Author:     Namhyung Kim <namhyung@kernel.org>
AuthorDate: Tue, 14 Nov 2017 09:15:42 +0900
Committer:  Arnaldo Carvalho de Melo <acme@redhat.com>
CommitDate: Tue, 28 Nov 2017 14:21:18 -0300

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.
  ...

Reported-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Tested-by: Taeung Song <treeze.taeung@gmail.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Sihyeon Jang <uneedsihyeon@gmail.com>
Cc: kernel-team@lge.com
Link: http://lkml.kernel.org/r/20171114001542.GA16464@sejong
Fixes: 8e99b6d4533c ("tools include: Adopt strstarts() from the kernel")
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 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 bd1fede..a0f7ed2 100644
--- a/tools/perf/builtin-help.c
+++ b/tools/perf/builtin-help.c
@@ -284,7 +284,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;
@@ -314,7 +314,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;

^ permalink raw reply related	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2017-11-29  6:32 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-12  1:10 [PATCH 1/3] perf help: Document missing options Sihyeon Jang
2017-11-12  1:10 ` [PATCH 2/3] perf top: " Sihyeon Jang
2017-11-13 18:25   ` Arnaldo Carvalho de Melo
2017-11-18  8:29   ` [tip:perf/core] " tip-bot for Sihyeon Jang
2017-11-12  1:10 ` [PATCH 3/3] perf top: Remove a duplicate word Sihyeon Jang
2017-11-13 18:27   ` Arnaldo Carvalho de Melo
2017-11-18  8:29   ` [tip:perf/core] " tip-bot for Sihyeon Jang
2017-11-13 18:29 ` [PATCH 1/3] perf help: Document missing options Arnaldo Carvalho de Melo
2017-11-14  0:15   ` Namhyung Kim
2017-11-14  2:18     ` Taeung Song
2017-11-14 13:03       ` Arnaldo Carvalho de Melo
2017-11-14 13:00     ` Arnaldo Carvalho de Melo
2017-11-18  8:32     ` [tip:perf/core] perf help: Fix a bug during strstart() conversion tip-bot for Namhyung Kim
2017-11-29  6:30     ` tip-bot for Namhyung Kim

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).