All of lore.kernel.org
 help / color / mirror / Atom feed
* [GIT PULL 0/3] perf/core improvements
@ 2010-07-18  1:48 Arnaldo Carvalho de Melo
  2010-07-18  1:48 ` [PATCH 1/3] perf ui: Make END go to the last entry, not the top of the last page Arnaldo Carvalho de Melo
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Arnaldo Carvalho de Melo @ 2010-07-18  1:48 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Arnaldo Carvalho de Melo, Frederic Weisbecker,
	Mike Galbraith, Paul Mackerras, Peter Zijlstra, Stephane Eranian

Hi Ingo,

        Please pull from:

git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux-2.6 perf/core

Regards,

- Arnaldo

Arnaldo Carvalho de Melo (3):
  perf ui: Make END go to the last entry, not the top of the last page
  perf ui: Make ui_browser__run exit on unhandled hot keys
  perf hists: Factor out duplicated code

 tools/perf/util/hist.c |   36 ++++++++++++++++++------------------
 tools/perf/util/newt.c |   14 +++++---------
 2 files changed, 23 insertions(+), 27 deletions(-)


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

* [PATCH 1/3] perf ui: Make END go to the last entry, not the top of the last page
  2010-07-18  1:48 [GIT PULL 0/3] perf/core improvements Arnaldo Carvalho de Melo
@ 2010-07-18  1:48 ` Arnaldo Carvalho de Melo
  2010-07-18  1:48 ` [PATCH 2/3] perf ui: Make ui_browser__run exit on unhandled hot keys Arnaldo Carvalho de Melo
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 6+ messages in thread
From: Arnaldo Carvalho de Melo @ 2010-07-18  1:48 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Arnaldo Carvalho de Melo, Frederic Weisbecker,
	Mike Galbraith, Peter Zijlstra, Stephane Eranian

From: Arnaldo Carvalho de Melo <acme@redhat.com>

Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
LKML-Reference: <new-submission>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/util/newt.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/tools/perf/util/newt.c b/tools/perf/util/newt.c
index 06f248f..932f124 100644
--- a/tools/perf/util/newt.c
+++ b/tools/perf/util/newt.c
@@ -491,11 +491,11 @@ static int ui_browser__run(struct ui_browser *self, struct newtExitStruct *es)
 			break;
 		case NEWT_KEY_END:
 			offset = self->height - 1;
+			if (offset >= self->nr_entries)
+				offset = self->nr_entries - 1;
 
-			if (offset > self->nr_entries)
-				offset = self->nr_entries;
-
-			self->index = self->first_visible_entry_idx = self->nr_entries - 1 - offset;
+			self->index = self->nr_entries - 1;
+			self->first_visible_entry_idx = self->index - offset;
 			self->seek(self, -offset, SEEK_END);
 			break;
 		case NEWT_KEY_RIGHT:
-- 
1.6.2.5


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

* [PATCH 2/3] perf ui: Make ui_browser__run exit on unhandled hot keys
  2010-07-18  1:48 [GIT PULL 0/3] perf/core improvements Arnaldo Carvalho de Melo
  2010-07-18  1:48 ` [PATCH 1/3] perf ui: Make END go to the last entry, not the top of the last page Arnaldo Carvalho de Melo
@ 2010-07-18  1:48 ` Arnaldo Carvalho de Melo
  2010-07-18  1:48 ` [PATCH 3/3] perf hists: Factor out duplicated code Arnaldo Carvalho de Melo
  2010-07-18  7:17 ` [GIT PULL 0/3] perf/core improvements Ingo Molnar
  3 siblings, 0 replies; 6+ messages in thread
From: Arnaldo Carvalho de Melo @ 2010-07-18  1:48 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Arnaldo Carvalho de Melo, Frederic Weisbecker,
	Mike Galbraith, Peter Zijlstra, Stephane Eranian

From: Arnaldo Carvalho de Melo <acme@redhat.com>

Right now ENTER doesn't always exits the newt tree widget, as it is used
for expanding/collapsing branches, but with the new tree widget being
developed we need to regain control to handle it, expanding/collapsing
branches.

In fact its really up to the ui_browser user to state what extra keys
should stop ui_browser__run, and it should handle just the ones needed
for basic browsing.

Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/util/newt.c |    6 +-----
 1 files changed, 1 insertions(+), 5 deletions(-)

diff --git a/tools/perf/util/newt.c b/tools/perf/util/newt.c
index 932f124..7979003 100644
--- a/tools/perf/util/newt.c
+++ b/tools/perf/util/newt.c
@@ -498,12 +498,8 @@ static int ui_browser__run(struct ui_browser *self, struct newtExitStruct *es)
 			self->first_visible_entry_idx = self->index - offset;
 			self->seek(self, -offset, SEEK_END);
 			break;
-		case NEWT_KEY_RIGHT:
-		case NEWT_KEY_LEFT:
-		case NEWT_KEY_TAB:
-			return es->u.key;
 		default:
-			continue;
+			return es->u.key;
 		}
 		if (ui_browser__refresh_entries(self) < 0)
 			return -1;
-- 
1.6.2.5


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

* [PATCH 3/3] perf hists: Factor out duplicated code
  2010-07-18  1:48 [GIT PULL 0/3] perf/core improvements Arnaldo Carvalho de Melo
  2010-07-18  1:48 ` [PATCH 1/3] perf ui: Make END go to the last entry, not the top of the last page Arnaldo Carvalho de Melo
  2010-07-18  1:48 ` [PATCH 2/3] perf ui: Make ui_browser__run exit on unhandled hot keys Arnaldo Carvalho de Melo
@ 2010-07-18  1:48 ` Arnaldo Carvalho de Melo
  2010-07-18  7:17 ` [GIT PULL 0/3] perf/core improvements Ingo Molnar
  3 siblings, 0 replies; 6+ messages in thread
From: Arnaldo Carvalho de Melo @ 2010-07-18  1:48 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Arnaldo Carvalho de Melo, Frederic Weisbecker,
	Ingo Molnar, Mike Galbraith, Paul Mackerras, Peter Zijlstra,
	Stephane Eranian

From: Arnaldo Carvalho de Melo <acme@redhat.com>

Introducing hists__remove_entry_filter.

Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
LKML-Reference: <new-submission>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/util/hist.c |   36 ++++++++++++++++++------------------
 1 files changed, 18 insertions(+), 18 deletions(-)

diff --git a/tools/perf/util/hist.c b/tools/perf/util/hist.c
index 68d288c..7b5848c 100644
--- a/tools/perf/util/hist.c
+++ b/tools/perf/util/hist.c
@@ -795,6 +795,21 @@ enum hist_filter {
 	HIST_FILTER__THREAD,
 };
 
+static void hists__remove_entry_filter(struct hists *self, struct hist_entry *h,
+				       enum hist_filter filter)
+{
+	h->filtered &= ~(1 << filter);
+	if (h->filtered)
+		return;
+
+	++self->nr_entries;
+	self->stats.total_period += h->period;
+	self->stats.nr_events[PERF_RECORD_SAMPLE] += h->nr_events;
+
+	if (h->ms.sym && self->max_sym_namelen < h->ms.sym->namelen)
+		self->max_sym_namelen = h->ms.sym->namelen;
+}
+
 void hists__filter_by_dso(struct hists *self, const struct dso *dso)
 {
 	struct rb_node *nd;
@@ -814,15 +829,7 @@ void hists__filter_by_dso(struct hists *self, const struct dso *dso)
 			continue;
 		}
 
-		h->filtered &= ~(1 << HIST_FILTER__DSO);
-		if (!h->filtered) {
-			++self->nr_entries;
-			self->stats.total_period += h->period;
-			self->stats.nr_events[PERF_RECORD_SAMPLE] += h->nr_events;
-			if (h->ms.sym &&
-			    self->max_sym_namelen < h->ms.sym->namelen)
-				self->max_sym_namelen = h->ms.sym->namelen;
-		}
+		hists__remove_entry_filter(self, h, HIST_FILTER__DSO);
 	}
 }
 
@@ -841,15 +848,8 @@ void hists__filter_by_thread(struct hists *self, const struct thread *thread)
 			h->filtered |= (1 << HIST_FILTER__THREAD);
 			continue;
 		}
-		h->filtered &= ~(1 << HIST_FILTER__THREAD);
-		if (!h->filtered) {
-			++self->nr_entries;
-			self->stats.total_period += h->period;
-			self->stats.nr_events[PERF_RECORD_SAMPLE] += h->nr_events;
-			if (h->ms.sym &&
-			    self->max_sym_namelen < h->ms.sym->namelen)
-				self->max_sym_namelen = h->ms.sym->namelen;
-		}
+
+		hists__remove_entry_filter(self, h, HIST_FILTER__THREAD);
 	}
 }
 
-- 
1.6.2.5


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

* Re: [GIT PULL 0/3] perf/core improvements
  2010-07-18  1:48 [GIT PULL 0/3] perf/core improvements Arnaldo Carvalho de Melo
                   ` (2 preceding siblings ...)
  2010-07-18  1:48 ` [PATCH 3/3] perf hists: Factor out duplicated code Arnaldo Carvalho de Melo
@ 2010-07-18  7:17 ` Ingo Molnar
  2010-07-19  9:51   ` Frederic Weisbecker
  3 siblings, 1 reply; 6+ messages in thread
From: Ingo Molnar @ 2010-07-18  7:17 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: linux-kernel, Frederic Weisbecker, Mike Galbraith,
	Paul Mackerras, Peter Zijlstra, Stephane Eranian


* 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/core
> 
> Regards,
> 
> - Arnaldo
> 
> Arnaldo Carvalho de Melo (3):
>   perf ui: Make END go to the last entry, not the top of the last page
>   perf ui: Make ui_browser__run exit on unhandled hot keys
>   perf hists: Factor out duplicated code
> 
>  tools/perf/util/hist.c |   36 ++++++++++++++++++------------------
>  tools/perf/util/newt.c |   14 +++++---------
>  2 files changed, 23 insertions(+), 27 deletions(-)

Pulled, thanks Arnaldo!

FYI, i'm still seeing problems with 'perf report --parent xyz' functionality, 
as the Newt interface segfaults:

#0  0x00007ffff7dddcdb in ?? () from /usr/lib64/libnewt.so.0.52
#1  0x00007ffff7dd5ab6 in ?? () from /usr/lib64/libnewt.so.0.52
#2  0x00007ffff7dd5260 in ?? () from /usr/lib64/libnewt.so.0.52
#3  0x00007ffff7dd61ff in newtFormRun () from /usr/lib64/libnewt.so.0.52
#4  0x00000000004552a1 in hists__browse (self=0xa302b0, helpline=<value optimized out>, 
    ev_name=0x4e5dde "cycles") at util/newt.c:968
#5  0x0000000000455bc0 in hists__tui_browse_tree (self=<value optimized out>, 
    help=0x4e0710 "For a higher level overview, try: perf report --sort comm,dso")
    at util/newt.c:1142
#6  0x00000000004109e3 in __cmd_report (argc=<value optimized out>, argv=<value optimized out>, 
    prefix=<value optimized out>) at builtin-report.c:346
#7  cmd_report (argc=<value optimized out>, argv=<value optimized out>, 
    prefix=<value optimized out>) at builtin-report.c:508
#8  0x0000000000406188 in run_builtin (p=0x722590, argc=3, argv=0x7fffffffe570) at perf.c:286
#9  0x0000000000406be6 in handle_internal_command (argc=3, argv=0x7fffffffe570) at perf.c:357
#10 run_argv (argc=3, argv=0x7fffffffe570) at perf.c:401
#11 main (argc=3, argv=0x7fffffffe570) at perf.c:487

newt-0.52.11-2.fc13.x86_64

perf version 2.6.35.rc5.1194.g16950e5

Thanks,

	Ingo

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

* Re: [GIT PULL 0/3] perf/core improvements
  2010-07-18  7:17 ` [GIT PULL 0/3] perf/core improvements Ingo Molnar
@ 2010-07-19  9:51   ` Frederic Weisbecker
  0 siblings, 0 replies; 6+ messages in thread
From: Frederic Weisbecker @ 2010-07-19  9:51 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: Arnaldo Carvalho de Melo, linux-kernel, Mike Galbraith,
	Paul Mackerras, Peter Zijlstra, Stephane Eranian

2010/7/18 Ingo Molnar <mingo@elte.hu>:
>
> * 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/core
>>
>> Regards,
>>
>> - Arnaldo
>>
>> Arnaldo Carvalho de Melo (3):
>>   perf ui: Make END go to the last entry, not the top of the last page
>>   perf ui: Make ui_browser__run exit on unhandled hot keys
>>   perf hists: Factor out duplicated code
>>
>>  tools/perf/util/hist.c |   36 ++++++++++++++++++------------------
>>  tools/perf/util/newt.c |   14 +++++---------
>>  2 files changed, 23 insertions(+), 27 deletions(-)
>
> Pulled, thanks Arnaldo!
>
> FYI, i'm still seeing problems with 'perf report --parent xyz' functionality,
> as the Newt interface segfaults:


Hmm, I've fixed the --parent thing in ascii but did not test with newt.
I hope I haven't added some breakage with this fix :-s

I'll have a look.


>
> #0  0x00007ffff7dddcdb in ?? () from /usr/lib64/libnewt.so.0.52
> #1  0x00007ffff7dd5ab6 in ?? () from /usr/lib64/libnewt.so.0.52
> #2  0x00007ffff7dd5260 in ?? () from /usr/lib64/libnewt.so.0.52
> #3  0x00007ffff7dd61ff in newtFormRun () from /usr/lib64/libnewt.so.0.52
> #4  0x00000000004552a1 in hists__browse (self=0xa302b0, helpline=<value optimized out>,
>    ev_name=0x4e5dde "cycles") at util/newt.c:968
> #5  0x0000000000455bc0 in hists__tui_browse_tree (self=<value optimized out>,
>    help=0x4e0710 "For a higher level overview, try: perf report --sort comm,dso")
>    at util/newt.c:1142
> #6  0x00000000004109e3 in __cmd_report (argc=<value optimized out>, argv=<value optimized out>,
>    prefix=<value optimized out>) at builtin-report.c:346
> #7  cmd_report (argc=<value optimized out>, argv=<value optimized out>,
>    prefix=<value optimized out>) at builtin-report.c:508
> #8  0x0000000000406188 in run_builtin (p=0x722590, argc=3, argv=0x7fffffffe570) at perf.c:286
> #9  0x0000000000406be6 in handle_internal_command (argc=3, argv=0x7fffffffe570) at perf.c:357
> #10 run_argv (argc=3, argv=0x7fffffffe570) at perf.c:401
> #11 main (argc=3, argv=0x7fffffffe570) at perf.c:487
>
> newt-0.52.11-2.fc13.x86_64
>
> perf version 2.6.35.rc5.1194.g16950e5
>
> Thanks,
>
>        Ingo
>

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

end of thread, other threads:[~2010-07-19  9:51 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-07-18  1:48 [GIT PULL 0/3] perf/core improvements Arnaldo Carvalho de Melo
2010-07-18  1:48 ` [PATCH 1/3] perf ui: Make END go to the last entry, not the top of the last page Arnaldo Carvalho de Melo
2010-07-18  1:48 ` [PATCH 2/3] perf ui: Make ui_browser__run exit on unhandled hot keys Arnaldo Carvalho de Melo
2010-07-18  1:48 ` [PATCH 3/3] perf hists: Factor out duplicated code Arnaldo Carvalho de Melo
2010-07-18  7:17 ` [GIT PULL 0/3] perf/core improvements Ingo Molnar
2010-07-19  9:51   ` Frederic Weisbecker

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.