linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] perf tool: reset use_browser when compiled without NEWT
@ 2011-11-21 22:16 David Ahern
  2011-11-28 16:58 ` David Ahern
  0 siblings, 1 reply; 4+ messages in thread
From: David Ahern @ 2011-11-21 22:16 UTC (permalink / raw)
  To: acme, linux-kernel; +Cc: mingo, peterz, fweisbec, David Ahern

e.g.,  when using
  make NO_NEWT=yes ...
or if newt-devel is not installed

Signed-off-by: David Ahern <dsahern@gmail.com>
---
 tools/perf/util/cache.h |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/tools/perf/util/cache.h b/tools/perf/util/cache.h
index fc5e5a0..9d7612a 100644
--- a/tools/perf/util/cache.h
+++ b/tools/perf/util/cache.h
@@ -36,6 +36,7 @@ extern int use_browser;
 #ifdef NO_NEWT_SUPPORT
 static inline void setup_browser(bool fallback_to_pager)
 {
+	use_browser = 0;
 	if (fallback_to_pager)
 		setup_pager();
 }
-- 
1.7.7.1


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

* Re: [PATCH] perf tool: reset use_browser when compiled without NEWT
  2011-11-21 22:16 [PATCH] perf tool: reset use_browser when compiled without NEWT David Ahern
@ 2011-11-28 16:58 ` David Ahern
  2011-11-28 17:09   ` Arnaldo Carvalho de Melo
  0 siblings, 1 reply; 4+ messages in thread
From: David Ahern @ 2011-11-28 16:58 UTC (permalink / raw)
  To: acme; +Cc: linux-kernel, mingo, peterz, fweisbec

Hi Arnaldo:

didn't see this one in your queue or a response. Do you agree this is
needed?

On 11/21/2011 03:16 PM, David Ahern wrote:
> e.g.,  when using
>   make NO_NEWT=yes ...
> or if newt-devel is not installed
> 
> Signed-off-by: David Ahern <dsahern@gmail.com>
> ---
>  tools/perf/util/cache.h |    1 +
>  1 files changed, 1 insertions(+), 0 deletions(-)
> 
> diff --git a/tools/perf/util/cache.h b/tools/perf/util/cache.h
> index fc5e5a0..9d7612a 100644
> --- a/tools/perf/util/cache.h
> +++ b/tools/perf/util/cache.h
> @@ -36,6 +36,7 @@ extern int use_browser;
>  #ifdef NO_NEWT_SUPPORT
>  static inline void setup_browser(bool fallback_to_pager)
>  {
> +	use_browser = 0;
>  	if (fallback_to_pager)
>  		setup_pager();
>  }

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

* Re: [PATCH] perf tool: reset use_browser when compiled without NEWT
  2011-11-28 16:58 ` David Ahern
@ 2011-11-28 17:09   ` Arnaldo Carvalho de Melo
  2011-11-28 17:16     ` David Ahern
  0 siblings, 1 reply; 4+ messages in thread
From: Arnaldo Carvalho de Melo @ 2011-11-28 17:09 UTC (permalink / raw)
  To: David Ahern; +Cc: linux-kernel, mingo, peterz, fweisbec

Em Mon, Nov 28, 2011 at 09:58:46AM -0700, David Ahern escreveu:
> Hi Arnaldo:
> 
> didn't see this one in your queue or a response. Do you agree this is
> needed?

Well, I think we should provide a better explanation for this usecase,
i.e. the code as is will use --stdio in NO_NEWT=yes builds, but will
still offer --tui and if that is specified, will produce no output.

Perhaps it is best to either elide --tui in NO_NEWT builds or state that
the build doesn't support --tui more clearly.

Or are you seeing something else that you think needs fixing?
 
- Arnaldo

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

* Re: [PATCH] perf tool: reset use_browser when compiled without NEWT
  2011-11-28 17:09   ` Arnaldo Carvalho de Melo
@ 2011-11-28 17:16     ` David Ahern
  0 siblings, 0 replies; 4+ messages in thread
From: David Ahern @ 2011-11-28 17:16 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo; +Cc: linux-kernel, mingo, peterz, fweisbec



On 11/28/2011 10:09 AM, Arnaldo Carvalho de Melo wrote:
> Em Mon, Nov 28, 2011 at 09:58:46AM -0700, David Ahern escreveu:
>> Hi Arnaldo:
>>
>> didn't see this one in your queue or a response. Do you agree this is
>> needed?
> 
> Well, I think we should provide a better explanation for this usecase,
> i.e. the code as is will use --stdio in NO_NEWT=yes builds, but will
> still offer --tui and if that is specified, will produce no output.
> 
> Perhaps it is best to either elide --tui in NO_NEWT builds or state that
> the build doesn't support --tui more clearly.
> 
> Or are you seeing something else that you think needs fixing?
>  
> - Arnaldo

In my case I compiled the code on 32-bit RHEL5 with newt disabled. 'perf
report' showed no output unless I added --stdio which seemed silly since
newt was disabled. Adding the  'use_browser = 0' to the setup_browser
fixed it. Doing that mirrors what is done in util/ui/setup.c,
setup_browser() which is used when newt is not disabled compile time:

    if (!isatty(1) || !use_browser || dump_trace) {
        use_browser = 0;
        if (fallback_to_pager)
            setup_pager();
        return;
    }

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

end of thread, other threads:[~2011-11-28 17:16 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-11-21 22:16 [PATCH] perf tool: reset use_browser when compiled without NEWT David Ahern
2011-11-28 16:58 ` David Ahern
2011-11-28 17:09   ` Arnaldo Carvalho de Melo
2011-11-28 17:16     ` David Ahern

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