linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] perf/tui: Change default selection background color to yellow
@ 2015-03-05 10:32 Ingo Molnar
  2015-03-05 10:47 ` Borislav Petkov
  2015-03-05 14:19 ` Arnaldo Carvalho de Melo
  0 siblings, 2 replies; 6+ messages in thread
From: Ingo Molnar @ 2015-03-05 10:32 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: Borislav Petkov, Jiri Olsa, Peter Zijlstra, linux-kernel


Boris reported that 'perf top' is unusable on his default 'black on 
white' terminal, which uses (eye friendly) light-grey as a background 
color.

The reason is that the TUI cursor for the current selection line uses 
HE_COLORSET_SELECTED, and that has a default background color of 
'lightgrey' - which is a common terminal background choice and thus 
the colors conflict.

Use yellow as the background color instead: that should be an uncommon 
terminal background, yet it's still ergonomic on both black and 
white/grey terminals.

[ It would be a better solution to straight out detect color
  collisions and resolve them reasonably by converting them to RGB and
  calculating color space distances, but I was unable to find
  proper documentation for SLtt_get_color_object() to recover the
  current color scheme so I gave up ... Yellow works well enough. ]

Reported-by: Borislav Petkov <bp@alien8.de>
Cc: Arnaldo Carvalho de Melo <acme@kernel.org>
Cc: David Binderman <dcb314@hotmail.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
 tools/perf/ui/browser.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/perf/ui/browser.c b/tools/perf/ui/browser.c
index 6680fa5cb9dd..688acb94c01f 100644
--- a/tools/perf/ui/browser.c
+++ b/tools/perf/ui/browser.c
@@ -499,7 +499,7 @@ static struct ui_browser_colorset {
 		.colorset = HE_COLORSET_SELECTED,
 		.name	  = "selected",
 		.fg	  = "black",
-		.bg	  = "lightgray",
+		.bg	  = "yellow",
 	},
 	{
 		.colorset = HE_COLORSET_CODE,

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

* Re: [PATCH] perf/tui: Change default selection background color to yellow
  2015-03-05 10:32 Ingo Molnar
@ 2015-03-05 10:47 ` Borislav Petkov
  2015-03-05 14:19 ` Arnaldo Carvalho de Melo
  1 sibling, 0 replies; 6+ messages in thread
From: Borislav Petkov @ 2015-03-05 10:47 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: Arnaldo Carvalho de Melo, Jiri Olsa, Peter Zijlstra, linux-kernel

On Thu, Mar 05, 2015 at 11:32:13AM +0100, Ingo Molnar wrote:
> 
> Boris reported that 'perf top' is unusable on his default 'black on 
> white' terminal, which uses (eye friendly) light-grey as a background 
> color.
> 
> The reason is that the TUI cursor for the current selection line uses 
> HE_COLORSET_SELECTED, and that has a default background color of 
> 'lightgrey' - which is a common terminal background choice and thus 
> the colors conflict.
> 
> Use yellow as the background color instead: that should be an uncommon 
> terminal background, yet it's still ergonomic on both black and 
> white/grey terminals.
> 
> [ It would be a better solution to straight out detect color
>   collisions and resolve them reasonably by converting them to RGB and
>   calculating color space distances, but I was unable to find
>   proper documentation for SLtt_get_color_object() to recover the
>   current color scheme so I gave up ... Yellow works well enough. ]
> 
> Reported-by: Borislav Petkov <bp@alien8.de>

	  -and-tested-by: Boris

Thanks.

-- 
Regards/Gruss,
    Boris.

ECO tip #101: Trim your mails when you reply.
--

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

* Re: [PATCH] perf/tui: Change default selection background color to yellow
  2015-03-05 10:32 Ingo Molnar
  2015-03-05 10:47 ` Borislav Petkov
@ 2015-03-05 14:19 ` Arnaldo Carvalho de Melo
  2015-03-05 19:18   ` Ingo Molnar
  1 sibling, 1 reply; 6+ messages in thread
From: Arnaldo Carvalho de Melo @ 2015-03-05 14:19 UTC (permalink / raw)
  To: Ingo Molnar; +Cc: Borislav Petkov, Jiri Olsa, Peter Zijlstra, linux-kernel

Em Thu, Mar 05, 2015 at 11:32:13AM +0100, Ingo Molnar escreveu:
> Boris reported that 'perf top' is unusable on his default 'black on 
> white' terminal, which uses (eye friendly) light-grey as a background 
> color.
> 
> The reason is that the TUI cursor for the current selection line uses 
> HE_COLORSET_SELECTED, and that has a default background color of 
> 'lightgrey' - which is a common terminal background choice and thus 
> the colors conflict.
> 
> Use yellow as the background color instead: that should be an uncommon 
> terminal background, yet it's still ergonomic on both black and 
> white/grey terminals.
> 
> [ It would be a better solution to straight out detect color
>   collisions and resolve them reasonably by converting them to RGB and
>   calculating color space distances, but I was unable to find
>   proper documentation for SLtt_get_color_object() to recover the
>   current color scheme so I gave up ... Yellow works well enough. ]

Thanks, applying.

BTW, I started with newt, thinking it would give me good widgets, only
to, after having reached its limitations write my own, this time just
on, like newt, top of slang's tui libraries, eventually I think I'll
move to ncurses or even just use the kernel tty interface directly ;-)

- Arnaldo

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

* Re: [PATCH] perf/tui: Change default selection background color to yellow
  2015-03-05 14:19 ` Arnaldo Carvalho de Melo
@ 2015-03-05 19:18   ` Ingo Molnar
  0 siblings, 0 replies; 6+ messages in thread
From: Ingo Molnar @ 2015-03-05 19:18 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: Borislav Petkov, Jiri Olsa, Peter Zijlstra, linux-kernel


* Arnaldo Carvalho de Melo <acme@infradead.org> wrote:

> Em Thu, Mar 05, 2015 at 11:32:13AM +0100, Ingo Molnar escreveu:
> > Boris reported that 'perf top' is unusable on his default 'black on 
> > white' terminal, which uses (eye friendly) light-grey as a background 
> > color.
> > 
> > The reason is that the TUI cursor for the current selection line uses 
> > HE_COLORSET_SELECTED, and that has a default background color of 
> > 'lightgrey' - which is a common terminal background choice and thus 
> > the colors conflict.
> > 
> > Use yellow as the background color instead: that should be an uncommon 
> > terminal background, yet it's still ergonomic on both black and 
> > white/grey terminals.
> > 
> > [ It would be a better solution to straight out detect color
> >   collisions and resolve them reasonably by converting them to RGB and
> >   calculating color space distances, but I was unable to find
> >   proper documentation for SLtt_get_color_object() to recover the
> >   current color scheme so I gave up ... Yellow works well enough. ]
> 
> Thanks, applying.
> 
> BTW, I started with newt, thinking it would give me good widgets, 
> only to, after having reached its limitations write my own, this 
> time just on, like newt, top of slang's tui libraries, eventually I 
> think I'll move to ncurses or even just use the kernel tty interface 
> directly ;-)

LOL! :-)

Btw., a related problem: X terminals are pretty high overhead 
unfortunately, I cringe every time I run 'perf top' on a very fast 
system:

  PID USER      PR  NI    VIRT    RES    SHR S  %CPU %MEM     TIME+ COMMAND                                                                                               
 4240 mingo     20   0 1031088 176112 106648 S   5.9  0.3 101:54.30 konsole                                                                                               
 1985 root      20   0  649412 194760 157464 S   3.0  0.3  41:49.94 Xorg                                                                                                  
 2395 mingo     20   0 2283956 526044 127108 S   2.0  0.8  34:40.23 compiz                     
13258 mingo     20   0  207588  70916  12112 S   1.3  0.1   0:03.01 perf                                                                                                  

10%+ of GUI CPU overhead with a refresh every 2 seconds (i.e. only 0.5 
fps) - ridiculous!

So to fix this I think we eventually want a raw OpenGL client for 
local system 'perf top' use and such: that would be (by far) the 
lowest overhead UI interface to run profiling from without disturbing 
the system, with UI overhead in the ~1% range at most.

Raw (no toolkits) OpenGL would also allow us to do a lot of other UI 
and performance tricks.

Would you have any fundamental objections against OpenGL UI clients?

Thanks,

	Ingo

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

* Re: [PATCH] perf/tui: Change default selection background color to yellow
@ 2015-12-09  9:55 Borislav Petkov
  2015-12-09 13:45 ` Arnaldo Carvalho de Melo
  0 siblings, 1 reply; 6+ messages in thread
From: Borislav Petkov @ 2015-12-09  9:55 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: Ingo Molnar, Jiri Olsa, Peter Zijlstra, linux-kernel

Hey acme,

it seems you've forgotten this one.

I still need it please :-)

On Thu, Mar 05, 2015 at 11:32:13AM +0100, Ingo Molnar wrote:
> 
> Boris reported that 'perf top' is unusable on his default 'black on 
> white' terminal, which uses (eye friendly) light-grey as a background 
> color.
> 
> The reason is that the TUI cursor for the current selection line uses 
> HE_COLORSET_SELECTED, and that has a default background color of 
> 'lightgrey' - which is a common terminal background choice and thus 
> the colors conflict.
> 
> Use yellow as the background color instead: that should be an uncommon 
> terminal background, yet it's still ergonomic on both black and 
> white/grey terminals.
> 
> [ It would be a better solution to straight out detect color
>   collisions and resolve them reasonably by converting them to RGB and
>   calculating color space distances, but I was unable to find
>   proper documentation for SLtt_get_color_object() to recover the
>   current color scheme so I gave up ... Yellow works well enough. ]
> 
> Reported-by: Borislav Petkov <bp@alien8.de>
> Cc: Arnaldo Carvalho de Melo <acme@kernel.org>
> Cc: David Binderman <dcb314@hotmail.com>
> Cc: Jiri Olsa <jolsa@kernel.org>
> Signed-off-by: Ingo Molnar <mingo@kernel.org>
> ---
>  tools/perf/ui/browser.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/tools/perf/ui/browser.c b/tools/perf/ui/browser.c
> index 6680fa5cb9dd..688acb94c01f 100644
> --- a/tools/perf/ui/browser.c
> +++ b/tools/perf/ui/browser.c
> @@ -499,7 +499,7 @@ static struct ui_browser_colorset {
>  		.colorset = HE_COLORSET_SELECTED,
>  		.name	  = "selected",
>  		.fg	  = "black",
> -		.bg	  = "lightgray",
> +		.bg	  = "yellow",
>  	},
>  	{
>  		.colorset = HE_COLORSET_CODE,
> 

-- 
Regards/Gruss,
    Boris.

ECO tip #101: Trim your mails when you reply.

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

* Re: [PATCH] perf/tui: Change default selection background color to yellow
  2015-12-09  9:55 [PATCH] perf/tui: Change default selection background color to yellow Borislav Petkov
@ 2015-12-09 13:45 ` Arnaldo Carvalho de Melo
  0 siblings, 0 replies; 6+ messages in thread
From: Arnaldo Carvalho de Melo @ 2015-12-09 13:45 UTC (permalink / raw)
  To: Borislav Petkov; +Cc: Ingo Molnar, Jiri Olsa, Peter Zijlstra, linux-kernel

Em Wed, Dec 09, 2015 at 10:55:16AM +0100, Borislav Petkov escreveu:
> Hey acme,
> 
> it seems you've forgotten this one.
> 
> I still need it please :-)

Applying it now, thanks for the reminder.

- Arnaldo
 
> On Thu, Mar 05, 2015 at 11:32:13AM +0100, Ingo Molnar wrote:
> > 
> > Boris reported that 'perf top' is unusable on his default 'black on 
> > white' terminal, which uses (eye friendly) light-grey as a background 
> > color.
> > 
> > The reason is that the TUI cursor for the current selection line uses 
> > HE_COLORSET_SELECTED, and that has a default background color of 
> > 'lightgrey' - which is a common terminal background choice and thus 
> > the colors conflict.
> > 
> > Use yellow as the background color instead: that should be an uncommon 
> > terminal background, yet it's still ergonomic on both black and 
> > white/grey terminals.
> > 
> > [ It would be a better solution to straight out detect color
> >   collisions and resolve them reasonably by converting them to RGB and
> >   calculating color space distances, but I was unable to find
> >   proper documentation for SLtt_get_color_object() to recover the
> >   current color scheme so I gave up ... Yellow works well enough. ]
> > 
> > Reported-by: Borislav Petkov <bp@alien8.de>
> > Cc: Arnaldo Carvalho de Melo <acme@kernel.org>
> > Cc: David Binderman <dcb314@hotmail.com>
> > Cc: Jiri Olsa <jolsa@kernel.org>
> > Signed-off-by: Ingo Molnar <mingo@kernel.org>
> > ---
> >  tools/perf/ui/browser.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/tools/perf/ui/browser.c b/tools/perf/ui/browser.c
> > index 6680fa5cb9dd..688acb94c01f 100644
> > --- a/tools/perf/ui/browser.c
> > +++ b/tools/perf/ui/browser.c
> > @@ -499,7 +499,7 @@ static struct ui_browser_colorset {
> >  		.colorset = HE_COLORSET_SELECTED,
> >  		.name	  = "selected",
> >  		.fg	  = "black",
> > -		.bg	  = "lightgray",
> > +		.bg	  = "yellow",
> >  	},
> >  	{
> >  		.colorset = HE_COLORSET_CODE,
> > 
> 
> -- 
> Regards/Gruss,
>     Boris.
> 
> ECO tip #101: Trim your mails when you reply.

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

end of thread, other threads:[~2015-12-09 13:45 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-12-09  9:55 [PATCH] perf/tui: Change default selection background color to yellow Borislav Petkov
2015-12-09 13:45 ` Arnaldo Carvalho de Melo
  -- strict thread matches above, loose matches on Subject: below --
2015-03-05 10:32 Ingo Molnar
2015-03-05 10:47 ` Borislav Petkov
2015-03-05 14:19 ` Arnaldo Carvalho de Melo
2015-03-05 19:18   ` Ingo Molnar

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