* [GIT PULL 0/1] perf/urgent fixes
@ 2010-06-10 16:05 Arnaldo Carvalho de Melo
2010-06-10 16:05 ` [PATCH 1/1] perf record: Don't call newt functions when not initialized Arnaldo Carvalho de Melo
2010-06-10 16:21 ` [GIT PULL 0/1] perf/urgent fixes Ingo Molnar
0 siblings, 2 replies; 3+ messages in thread
From: Arnaldo Carvalho de Melo @ 2010-06-10 16:05 UTC (permalink / raw)
To: Ingo Molnar
Cc: linux-kernel, Arnaldo Carvalho de Melo,
Ananth N Mavinakayanahalli, Arnaldo Carvalho de Melo,
Frédéric Weisbecker, Masami Hiramatsu, Peter Zijlstra,
Srikar Dronamraju, Stephane Eranian, Tom Zanussi
Hi Ingo,
Please pull from:
git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux-2.6 perf/urgent
Regards,
- Arnaldo
Arnaldo Carvalho de Melo (1):
perf record: Don't call newt functions when not initialized
tools/perf/util/newt.c | 15 +++++++++++++--
1 files changed, 13 insertions(+), 2 deletions(-)
^ permalink raw reply [flat|nested] 3+ messages in thread* [PATCH 1/1] perf record: Don't call newt functions when not initialized
2010-06-10 16:05 [GIT PULL 0/1] perf/urgent fixes Arnaldo Carvalho de Melo
@ 2010-06-10 16:05 ` Arnaldo Carvalho de Melo
2010-06-10 16:21 ` [GIT PULL 0/1] perf/urgent fixes Ingo Molnar
1 sibling, 0 replies; 3+ messages in thread
From: Arnaldo Carvalho de Melo @ 2010-06-10 16:05 UTC (permalink / raw)
To: Ingo Molnar
Cc: linux-kernel, Arnaldo Carvalho de Melo,
Ananth N Mavinakayanahalli, Frédéric Weisbecker,
Ingo Molnar, Masami Hiramatsu, Peter Zijlstra, Srikar Dronamraju,
Stephane Eranian, Tom Zanussi
From: Arnaldo Carvalho de Melo <acme@redhat.com>
When processing events we want to give visual feedback to the user when
using the newt browser, so there are ui_progress calls in
__perf_session__process_events, but those should check if newt is being
used.
Reported-by: Srikar Dronamraju <srikar@linux.vnet.ibm.com>
Tested-by: Srikar Dronamraju <srikar@linux.vnet.ibm.com>
Cc: Ananth N Mavinakayanahalli <ananth@in.ibm.com>
Cc: Frédéric Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>,
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Srikar Dronamraju <srikar@linux.vnet.ibm.com>
Cc: Stephane Eranian <eranian@google.com>
Cc: Tom Zanussi <tzanussi@gmail.com>
LKML-Reference: <20100609123530.GB9471@ghostprotocols.net>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/perf/util/newt.c | 15 +++++++++++++--
1 files changed, 13 insertions(+), 2 deletions(-)
diff --git a/tools/perf/util/newt.c b/tools/perf/util/newt.c
index cf182ca..7537ca1 100644
--- a/tools/perf/util/newt.c
+++ b/tools/perf/util/newt.c
@@ -43,6 +43,9 @@ struct ui_progress *ui_progress__new(const char *title, u64 total)
if (self != NULL) {
int cols;
+
+ if (use_browser <= 0)
+ return self;
newtGetScreenSize(&cols, NULL);
cols -= 4;
newtCenteredWindow(cols, 1, title);
@@ -67,14 +70,22 @@ out_free_self:
void ui_progress__update(struct ui_progress *self, u64 curr)
{
+ /*
+ * FIXME: We should have a per UI backend way of showing progress,
+ * stdio will just show a percentage as NN%, etc.
+ */
+ if (use_browser <= 0)
+ return;
newtScaleSet(self->scale, curr);
newtRefresh();
}
void ui_progress__delete(struct ui_progress *self)
{
- newtFormDestroy(self->form);
- newtPopWindow();
+ if (use_browser > 0) {
+ newtFormDestroy(self->form);
+ newtPopWindow();
+ }
free(self);
}
--
1.6.2.5
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [GIT PULL 0/1] perf/urgent fixes
2010-06-10 16:05 [GIT PULL 0/1] perf/urgent fixes Arnaldo Carvalho de Melo
2010-06-10 16:05 ` [PATCH 1/1] perf record: Don't call newt functions when not initialized Arnaldo Carvalho de Melo
@ 2010-06-10 16:21 ` Ingo Molnar
1 sibling, 0 replies; 3+ messages in thread
From: Ingo Molnar @ 2010-06-10 16:21 UTC (permalink / raw)
To: Arnaldo Carvalho de Melo
Cc: linux-kernel, Ananth N Mavinakayanahalli,
Arnaldo Carvalho de Melo, Fr??d??ric Weisbecker,
Masami Hiramatsu, Peter Zijlstra, Srikar Dronamraju,
Stephane Eranian, Tom Zanussi
* Arnaldo Carvalho de Melo <acme@infradead.org> wrote:
> Hi Ingo,
>
> Please pull from:
>
> git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux-2.6 perf/urgent
>
> Regards,
>
> - Arnaldo
>
> Arnaldo Carvalho de Melo (1):
> perf record: Don't call newt functions when not initialized
>
> tools/perf/util/newt.c | 15 +++++++++++++--
> 1 files changed, 13 insertions(+), 2 deletions(-)
Pulled, thanks!
Ingo
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2010-06-10 16:21 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-06-10 16:05 [GIT PULL 0/1] perf/urgent fixes Arnaldo Carvalho de Melo
2010-06-10 16:05 ` [PATCH 1/1] perf record: Don't call newt functions when not initialized Arnaldo Carvalho de Melo
2010-06-10 16:21 ` [GIT PULL 0/1] perf/urgent fixes Ingo Molnar
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®