All of lore.kernel.org
 help / color / mirror / Atom feed
* [GIT PULL 0/4] perf/core improvements
@ 2010-08-10 21:53 Arnaldo Carvalho de Melo
  2010-08-10 21:53 ` [PATCH 1/4] perf ui: Make SPACE work as PGDN in all browsers Arnaldo Carvalho de Melo
                   ` (4 more replies)
  0 siblings, 5 replies; 12+ messages in thread
From: Arnaldo Carvalho de Melo @ 2010-08-10 21:53 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Arnaldo Carvalho de Melo, Frederic Weisbecker,
	Mike Galbraith, 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 (4):
  perf ui: Make SPACE work as PGDN in all browsers
  perf annotate: Cycle thru sorted lines with samples
  perf ui browser: Add ui_browser__show counterpart: __hide
  perf ui hist browser: Fixup key bindings

 tools/perf/util/ui/browser.c           |   19 ++++++-
 tools/perf/util/ui/browser.h           |    4 +-
 tools/perf/util/ui/browsers/annotate.c |  101 +++++++++++++++++++++++--------
 tools/perf/util/ui/browsers/hists.c    |   20 ++++---
 tools/perf/util/ui/browsers/map.c      |   10 +--
 tools/perf/util/ui/helpline.c          |    2 +-
 tools/perf/util/ui/helpline.h          |    1 +
 7 files changed, 113 insertions(+), 44 deletions(-)


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

* [PATCH 1/4] perf ui: Make SPACE work as PGDN in all browsers
  2010-08-10 21:53 [GIT PULL 0/4] perf/core improvements Arnaldo Carvalho de Melo
@ 2010-08-10 21:53 ` Arnaldo Carvalho de Melo
  2010-08-10 21:53 ` [PATCH 2/4] perf annotate: Cycle thru sorted lines with samples Arnaldo Carvalho de Melo
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 12+ messages in thread
From: Arnaldo Carvalho de Melo @ 2010-08-10 21:53 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>

Not just on the annotate one.

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/ui/browser.c           |    1 +
 tools/perf/util/ui/browsers/annotate.c |    1 -
 2 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/tools/perf/util/ui/browser.c b/tools/perf/util/ui/browser.c
index edbb7dd..83d5748 100644
--- a/tools/perf/util/ui/browser.c
+++ b/tools/perf/util/ui/browser.c
@@ -169,6 +169,7 @@ int ui_browser__show(struct ui_browser *self, const char *title)
 	newtFormAddHotKey(self->form, NEWT_KEY_PGDN);
 	newtFormAddHotKey(self->form, NEWT_KEY_HOME);
 	newtFormAddHotKey(self->form, NEWT_KEY_END);
+	newtFormAddHotKey(self->form, ' ');
 	newtFormAddComponent(self->form, self->sb);
 	return 0;
 }
diff --git a/tools/perf/util/ui/browsers/annotate.c b/tools/perf/util/ui/browsers/annotate.c
index 763592b..d2156ae 100644
--- a/tools/perf/util/ui/browsers/annotate.c
+++ b/tools/perf/util/ui/browsers/annotate.c
@@ -178,7 +178,6 @@ int hist_entry__tui_annotate(struct hist_entry *self)
 
 	browser.b.width += 18; /* Percentage */
 	ui_browser__show(&browser.b, self->ms.sym->name);
-	newtFormAddHotKey(browser.b.form, ' ');
 	ret = ui_browser__run(&browser.b, &es);
 	newtFormDestroy(browser.b.form);
 	newtPopWindow();
-- 
1.6.2.5


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

* [PATCH 2/4] perf annotate: Cycle thru sorted lines with samples
  2010-08-10 21:53 [GIT PULL 0/4] perf/core improvements Arnaldo Carvalho de Melo
  2010-08-10 21:53 ` [PATCH 1/4] perf ui: Make SPACE work as PGDN in all browsers Arnaldo Carvalho de Melo
@ 2010-08-10 21:53 ` Arnaldo Carvalho de Melo
  2010-08-10 21:53 ` [PATCH 3/4] perf ui browser: Add ui_browser__show counterpart: __hide Arnaldo Carvalho de Melo
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 12+ messages in thread
From: Arnaldo Carvalho de Melo @ 2010-08-10 21:53 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>

The annotate TUI now starts centered on the line with most samples, i.e.
the hottest line in the annotated function. Pressing TAB will center on
the second hottest function and so on. Shift+TAB goes in the other
direction.

This way one can more easily sift thru the function hotspots.

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/ui/browsers/annotate.c |  102 ++++++++++++++++++++++++--------
 1 files changed, 77 insertions(+), 25 deletions(-)

diff --git a/tools/perf/util/ui/browsers/annotate.c b/tools/perf/util/ui/browsers/annotate.c
index d2156ae..73e78ef 100644
--- a/tools/perf/util/ui/browsers/annotate.c
+++ b/tools/perf/util/ui/browsers/annotate.c
@@ -17,6 +17,7 @@ static void ui__error_window(const char *fmt, ...)
 struct annotate_browser {
 	struct ui_browser b;
 	struct rb_root	  entries;
+	struct rb_node	  *curr_hot;
 };
 
 struct objdump_line_rb_node {
@@ -110,12 +111,83 @@ static void objdump__insert_line(struct rb_root *self,
 	rb_insert_color(&line->rb_node, self);
 }
 
+static void annotate_browser__set_top(struct annotate_browser *self,
+				      struct rb_node *nd)
+{
+	struct objdump_line_rb_node *rbpos;
+	struct objdump_line *pos;
+	unsigned back;
+
+	ui_browser__refresh_dimensions(&self->b);
+	back = self->b.height / 2;
+	rbpos = rb_entry(nd, struct objdump_line_rb_node, rb_node);
+	pos = ((struct objdump_line *)rbpos) - 1;
+	self->b.top_idx = self->b.index = rbpos->idx;
+
+	while (self->b.top_idx != 0 && back != 0) {
+		pos = list_entry(pos->node.prev, struct objdump_line, node);
+
+		--self->b.top_idx;
+		--back;
+	}
+
+	self->b.top = pos;
+	self->curr_hot = nd;
+}
+
+static int annotate_browser__run(struct annotate_browser *self,
+				 struct newtExitStruct *es)
+{
+	struct rb_node *nd;
+	struct hist_entry *he = self->b.priv;
+
+	if (ui_browser__show(&self->b, he->ms.sym->name) < 0)
+		return -1;
+
+	ui_helpline__fpush("<- or ESC: exit, TAB/shift+TAB: cycle thru samples");
+	newtFormAddHotKey(self->b.form, NEWT_KEY_LEFT);
+
+	nd = self->curr_hot;
+	if (nd) {
+		newtFormAddHotKey(self->b.form, NEWT_KEY_TAB);
+		newtFormAddHotKey(self->b.form, NEWT_KEY_UNTAB);
+	}
+
+	while (1) {
+		ui_browser__run(&self->b, es);
+
+		if (es->reason != NEWT_EXIT_HOTKEY)
+			break;
+
+		switch (es->u.key) {
+		case NEWT_KEY_TAB:
+			nd = rb_prev(nd);
+			if (nd == NULL)
+				nd = rb_last(&self->entries);
+			annotate_browser__set_top(self, nd);
+			break;
+		case NEWT_KEY_UNTAB:
+			nd = rb_next(nd);
+			if (nd == NULL)
+				nd = rb_first(&self->entries);
+			annotate_browser__set_top(self, nd);
+			break;
+		default:
+			goto out;
+		}
+	}
+out:
+	newtFormDestroy(self->b.form);
+	newtPopWindow();
+	ui_helpline__pop();
+	return 0;
+}
+
 int hist_entry__tui_annotate(struct hist_entry *self)
 {
 	struct newtExitStruct es;
 	struct objdump_line *pos, *n;
 	struct objdump_line_rb_node *rbpos;
-	struct rb_node *nd;
 	LIST_HEAD(head);
 	struct annotate_browser browser = {
 		.b = {
@@ -156,35 +228,15 @@ int hist_entry__tui_annotate(struct hist_entry *self)
 	/*
 	 * Position the browser at the hottest line.
 	 */
-	nd = rb_last(&browser.entries);
-	if (nd != NULL) {
-		unsigned back;
-
-		ui_browser__refresh_dimensions(&browser.b);
-		back = browser.b.height / 2;
-		rbpos = rb_entry(nd, struct objdump_line_rb_node, rb_node);
-		pos = ((struct objdump_line *)rbpos) - 1;
-		browser.b.top_idx = browser.b.index = rbpos->idx;
-
-		while (browser.b.top_idx != 0 && back != 0) {
-			pos = list_entry(pos->node.prev, struct objdump_line, node);
-
-			--browser.b.top_idx;
-			--back;
-		}
-
-		browser.b.top = pos;
-	}
+	browser.curr_hot = rb_last(&browser.entries);
+	if (browser.curr_hot)
+		annotate_browser__set_top(&browser, browser.curr_hot);
 
 	browser.b.width += 18; /* Percentage */
-	ui_browser__show(&browser.b, self->ms.sym->name);
-	ret = ui_browser__run(&browser.b, &es);
-	newtFormDestroy(browser.b.form);
-	newtPopWindow();
+	ret = annotate_browser__run(&browser, &es);
 	list_for_each_entry_safe(pos, n, &head, node) {
 		list_del(&pos->node);
 		objdump_line__free(pos);
 	}
-	ui_helpline__pop();
 	return ret;
 }
-- 
1.6.2.5


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

* [PATCH 3/4] perf ui browser: Add ui_browser__show counterpart: __hide
  2010-08-10 21:53 [GIT PULL 0/4] perf/core improvements Arnaldo Carvalho de Melo
  2010-08-10 21:53 ` [PATCH 1/4] perf ui: Make SPACE work as PGDN in all browsers Arnaldo Carvalho de Melo
  2010-08-10 21:53 ` [PATCH 2/4] perf annotate: Cycle thru sorted lines with samples Arnaldo Carvalho de Melo
@ 2010-08-10 21:53 ` Arnaldo Carvalho de Melo
  2010-08-10 21:53 ` [PATCH 4/4] perf ui hist browser: Fixup key bindings Arnaldo Carvalho de Melo
  2010-08-11  6:35 ` [GIT PULL 0/4] perf/core improvements Ingo Molnar
  4 siblings, 0 replies; 12+ messages in thread
From: Arnaldo Carvalho de Melo @ 2010-08-10 21:53 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>

So that the common tasks of providing a helpline at __run entry and
destroying the window and releasing resourses at exit can be abstracted
away, reducing a bit more the coupling with libnewt.

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/ui/browser.c           |   18 +++++++++++++++++-
 tools/perf/util/ui/browser.h           |    4 +++-
 tools/perf/util/ui/browsers/annotate.c |    8 +++-----
 tools/perf/util/ui/browsers/hists.c    |    5 ++++-
 tools/perf/util/ui/browsers/map.c      |   10 ++++------
 tools/perf/util/ui/helpline.c          |    2 +-
 tools/perf/util/ui/helpline.h          |    1 +
 7 files changed, 33 insertions(+), 15 deletions(-)

diff --git a/tools/perf/util/ui/browser.c b/tools/perf/util/ui/browser.c
index 83d5748..66f2d58 100644
--- a/tools/perf/util/ui/browser.c
+++ b/tools/perf/util/ui/browser.c
@@ -16,6 +16,7 @@
 #include <stdlib.h>
 #include <sys/ttydefaults.h>
 #include "browser.h"
+#include "helpline.h"
 #include "../color.h"
 #include "../util.h"
 
@@ -145,8 +146,11 @@ void ui_browser__reset_index(struct ui_browser *self)
 	self->seek(self, 0, SEEK_SET);
 }
 
-int ui_browser__show(struct ui_browser *self, const char *title)
+int ui_browser__show(struct ui_browser *self, const char *title,
+		     const char *helpline, ...)
 {
+	va_list ap;
+
 	if (self->form != NULL) {
 		newtFormDestroy(self->form);
 		newtPopWindow();
@@ -171,9 +175,21 @@ int ui_browser__show(struct ui_browser *self, const char *title)
 	newtFormAddHotKey(self->form, NEWT_KEY_END);
 	newtFormAddHotKey(self->form, ' ');
 	newtFormAddComponent(self->form, self->sb);
+
+	va_start(ap, helpline);
+	ui_helpline__vpush(helpline, ap);
+	va_end(ap);
 	return 0;
 }
 
+void ui_browser__hide(struct ui_browser *self)
+{
+	newtFormDestroy(self->form);
+	newtPopWindow();
+	self->form = NULL;
+	ui_helpline__pop();
+}
+
 int ui_browser__refresh(struct ui_browser *self)
 {
 	int row;
diff --git a/tools/perf/util/ui/browser.h b/tools/perf/util/ui/browser.h
index 856e343..0b9f829 100644
--- a/tools/perf/util/ui/browser.h
+++ b/tools/perf/util/ui/browser.h
@@ -30,7 +30,9 @@ bool ui_browser__is_current_entry(struct ui_browser *self, unsigned row);
 void ui_browser__refresh_dimensions(struct ui_browser *self);
 void ui_browser__reset_index(struct ui_browser *self);
 
-int ui_browser__show(struct ui_browser *self, const char *title);
+int ui_browser__show(struct ui_browser *self, const char *title,
+		     const char *helpline, ...);
+void ui_browser__hide(struct ui_browser *self);
 int ui_browser__refresh(struct ui_browser *self);
 int ui_browser__run(struct ui_browser *self, struct newtExitStruct *es);
 
diff --git a/tools/perf/util/ui/browsers/annotate.c b/tools/perf/util/ui/browsers/annotate.c
index 73e78ef..55ff792 100644
--- a/tools/perf/util/ui/browsers/annotate.c
+++ b/tools/perf/util/ui/browsers/annotate.c
@@ -141,10 +141,10 @@ static int annotate_browser__run(struct annotate_browser *self,
 	struct rb_node *nd;
 	struct hist_entry *he = self->b.priv;
 
-	if (ui_browser__show(&self->b, he->ms.sym->name) < 0)
+	if (ui_browser__show(&self->b, he->ms.sym->name,
+			     "<- or ESC: exit, TAB/shift+TAB: cycle thru samples") < 0)
 		return -1;
 
-	ui_helpline__fpush("<- or ESC: exit, TAB/shift+TAB: cycle thru samples");
 	newtFormAddHotKey(self->b.form, NEWT_KEY_LEFT);
 
 	nd = self->curr_hot;
@@ -177,9 +177,7 @@ static int annotate_browser__run(struct annotate_browser *self,
 		}
 	}
 out:
-	newtFormDestroy(self->b.form);
-	newtPopWindow();
-	ui_helpline__pop();
+	ui_browser__hide(&self->b);
 	return 0;
 }
 
diff --git a/tools/perf/util/ui/browsers/hists.c b/tools/perf/util/ui/browsers/hists.c
index cee7998..dd512b7 100644
--- a/tools/perf/util/ui/browsers/hists.c
+++ b/tools/perf/util/ui/browsers/hists.c
@@ -211,7 +211,8 @@ static int hist_browser__run(struct hist_browser *self, const char *title,
 		 nr_events, unit);
 	newtDrawRootText(0, 0, str);
 
-	if (ui_browser__show(&self->b, title) < 0)
+	if (ui_browser__show(&self->b, title,
+			     "Press '?' for help on key bindings") < 0)
 		return -1;
 
 	newtFormAddHotKey(self->b.form, 'A');
@@ -253,6 +254,8 @@ static int hist_browser__run(struct hist_browser *self, const char *title,
 			return 0;
 		}
 	}
+
+	ui_browser__hide(&self->b);
 	return 0;
 }
 
diff --git a/tools/perf/util/ui/browsers/map.c b/tools/perf/util/ui/browsers/map.c
index b79f0c9..142b825 100644
--- a/tools/perf/util/ui/browsers/map.c
+++ b/tools/perf/util/ui/browsers/map.c
@@ -100,11 +100,11 @@ static int map_browser__search(struct map_browser *self)
 
 static int map_browser__run(struct map_browser *self, struct newtExitStruct *es)
 {
-	if (ui_browser__show(&self->b, self->map->dso->long_name) < 0)
+	if (ui_browser__show(&self->b, self->map->dso->long_name,
+			     "Press <- or ESC to exit, %s / to search",
+			     verbose ? "" : "restart with -v to use") < 0)
 		return -1;
 
-	ui_helpline__fpush("Press <- or ESC to exit, %s / to search",
-			   verbose ? "" : "restart with -v to use");
 	newtFormAddHotKey(self->b.form, NEWT_KEY_LEFT);
 	newtFormAddHotKey(self->b.form, NEWT_KEY_ENTER);
 	if (verbose)
@@ -121,9 +121,7 @@ static int map_browser__run(struct map_browser *self, struct newtExitStruct *es)
 			break;
 	}
 
-	newtFormDestroy(self->b.form);
-	newtPopWindow();
-	ui_helpline__pop();
+	ui_browser__hide(&self->b);
 	return 0;
 }
 
diff --git a/tools/perf/util/ui/helpline.c b/tools/perf/util/ui/helpline.c
index ff58460..8d79daa 100644
--- a/tools/perf/util/ui/helpline.c
+++ b/tools/perf/util/ui/helpline.c
@@ -16,7 +16,7 @@ void ui_helpline__push(const char *msg)
 	newtPushHelpLine(msg);
 }
 
-static void ui_helpline__vpush(const char *fmt, va_list ap)
+void ui_helpline__vpush(const char *fmt, va_list ap)
 {
 	char *s;
 
diff --git a/tools/perf/util/ui/helpline.h b/tools/perf/util/ui/helpline.h
index 5d1e5e7..ab6028d 100644
--- a/tools/perf/util/ui/helpline.h
+++ b/tools/perf/util/ui/helpline.h
@@ -4,6 +4,7 @@
 void ui_helpline__init(void);
 void ui_helpline__pop(void);
 void ui_helpline__push(const char *msg);
+void ui_helpline__vpush(const char *fmt, va_list ap);
 void ui_helpline__fpush(const char *fmt, ...);
 void ui_helpline__puts(const char *msg);
 
-- 
1.6.2.5


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

* [PATCH 4/4] perf ui hist browser: Fixup key bindings
  2010-08-10 21:53 [GIT PULL 0/4] perf/core improvements Arnaldo Carvalho de Melo
                   ` (2 preceding siblings ...)
  2010-08-10 21:53 ` [PATCH 3/4] perf ui browser: Add ui_browser__show counterpart: __hide Arnaldo Carvalho de Melo
@ 2010-08-10 21:53 ` Arnaldo Carvalho de Melo
  2010-08-11  6:35 ` [GIT PULL 0/4] perf/core improvements Ingo Molnar
  4 siblings, 0 replies; 12+ messages in thread
From: Arnaldo Carvalho de Melo @ 2010-08-10 21:53 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>

To match what is shown when '?' or 'H' is pressed, i.e. the keybind help
window.

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/ui/browsers/hists.c |   15 +++++++--------
 1 files changed, 7 insertions(+), 8 deletions(-)

diff --git a/tools/perf/util/ui/browsers/hists.c b/tools/perf/util/ui/browsers/hists.c
index dd512b7..dafdf67 100644
--- a/tools/perf/util/ui/browsers/hists.c
+++ b/tools/perf/util/ui/browsers/hists.c
@@ -215,12 +215,12 @@ static int hist_browser__run(struct hist_browser *self, const char *title,
 			     "Press '?' for help on key bindings") < 0)
 		return -1;
 
-	newtFormAddHotKey(self->b.form, 'A');
 	newtFormAddHotKey(self->b.form, 'a');
 	newtFormAddHotKey(self->b.form, '?');
 	newtFormAddHotKey(self->b.form, 'h');
-	newtFormAddHotKey(self->b.form, 'H');
 	newtFormAddHotKey(self->b.form, 'd');
+	newtFormAddHotKey(self->b.form, 'D');
+	newtFormAddHotKey(self->b.form, 't');
 
 	newtFormAddHotKey(self->b.form, NEWT_KEY_LEFT);
 	newtFormAddHotKey(self->b.form, NEWT_KEY_RIGHT);
@@ -232,7 +232,7 @@ static int hist_browser__run(struct hist_browser *self, const char *title,
 		if (es->reason != NEWT_EXIT_HOTKEY)
 			break;
 		switch (es->u.key) {
-		case 'd': { /* Debug */
+		case 'D': { /* Debug */
 			static int seq;
 			struct hist_entry *h = rb_entry(self->b.top,
 							struct hist_entry, rb_node);
@@ -771,18 +771,17 @@ int hists__browse(struct hists *self, const char *helpline, const char *ev_name)
 			default:;
 			}
 
-			key = toupper(key);
 			switch (key) {
-			case 'A':
+			case 'a':
 				if (browser->selection->map == NULL &&
 				    browser->selection->map->dso->annotate_warned)
 					continue;
 				goto do_annotate;
-			case 'D':
+			case 'd':
 				goto zoom_dso;
-			case 'T':
+			case 't':
 				goto zoom_thread;
-			case 'H':
+			case 'h':
 			case '?':
 do_help:
 				ui__help_window("->        Zoom into DSO/Threads & Annotate current symbol\n"
-- 
1.6.2.5


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

* Re: [GIT PULL 0/4] perf/core improvements
  2010-08-10 21:53 [GIT PULL 0/4] perf/core improvements Arnaldo Carvalho de Melo
                   ` (3 preceding siblings ...)
  2010-08-10 21:53 ` [PATCH 4/4] perf ui hist browser: Fixup key bindings Arnaldo Carvalho de Melo
@ 2010-08-11  6:35 ` Ingo Molnar
  4 siblings, 0 replies; 12+ messages in thread
From: Ingo Molnar @ 2010-08-11  6:35 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: linux-kernel, Frederic Weisbecker, Mike Galbraith,
	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 (4):
>   perf ui: Make SPACE work as PGDN in all browsers
>   perf annotate: Cycle thru sorted lines with samples
>   perf ui browser: Add ui_browser__show counterpart: __hide
>   perf ui hist browser: Fixup key bindings
> 
>  tools/perf/util/ui/browser.c           |   19 ++++++-
>  tools/perf/util/ui/browser.h           |    4 +-
>  tools/perf/util/ui/browsers/annotate.c |  101 +++++++++++++++++++++++--------
>  tools/perf/util/ui/browsers/hists.c    |   20 ++++---
>  tools/perf/util/ui/browsers/map.c      |   10 +--
>  tools/perf/util/ui/helpline.c          |    2 +-
>  tools/perf/util/ui/helpline.h          |    1 +
>  7 files changed, 113 insertions(+), 44 deletions(-)

Pulled, thanks a lot Arnaldo!

	Ingo

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

* Re: [GIT PULL 0/4] perf/core improvements
  2010-12-03  6:10 ` Ian Munsie
@ 2010-12-03 13:05   ` Arnaldo Carvalho de Melo
  0 siblings, 0 replies; 12+ messages in thread
From: Arnaldo Carvalho de Melo @ 2010-12-03 13:05 UTC (permalink / raw)
  To: Ian Munsie
  Cc: Ingo Molnar, linux-kernel, Frederic Weisbecker, Mike Galbraith,
	Paul Mackerras, Peter Zijlstra, Stephane Eranian

Em Fri, Dec 03, 2010 at 05:10:44PM +1100, Ian Munsie escreveu:
> Excerpts from Arnaldo Carvalho de Melo's message of Fri Dec 03 06:39:28 +1100 2010:
> >     Ian, if you prefer, please test it before Ingo merges it.
> 
> Have done so and just about finished rebasing my patches on top of these
> - I'll try to get them posted tonight. The bug I was working on is
> fixed, so I'm happy :)

Great!
 
> I haven't come across the bug that Thomas ran into, but then again I
> haven't been testing the non-perf parts of perf for this either.

I'll work on the problem related by Thomas today.
 
> Which reminds me, does anyone have a test suite for perf other than
> ./perf test?

Not that I know of, perf test is intended to be that, please consider
adding more tests :)

I want to do things like start a thread that will generate cache misses,
and then have a monitor thread measuring it, passing the test if it gets
into some range (its sampling after all), etc.

- Arnaldo

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

* Re: [GIT PULL 0/4] perf/core improvements
  2010-12-03  0:44   ` Arnaldo Carvalho de Melo
@ 2010-12-03 11:51     ` Thomas Gleixner
  0 siblings, 0 replies; 12+ messages in thread
From: Thomas Gleixner @ 2010-12-03 11:51 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: Ingo Molnar, linux-kernel, Frederic Weisbecker, Ian Munsie,
	Mike Galbraith, Paul Mackerras, Peter Zijlstra, Stephane Eranian

On Thu, 2 Dec 2010, Arnaldo Carvalho de Melo wrote:
> Em Fri, Dec 03, 2010 at 12:00:09AM +0100, Thomas Gleixner escreveu:
> > Investigating. Please wait
> 
> Thanks, as I said on IRC, perhaps I neglected the non-perf bits of perf

It's a perf bit of perf. You simply broke the inheritance
code. Testing perf with something more complex than "sleep 1" might
have shown this :)

------------>

Subject: perf: Fix event inherit fallout of precalculated headers
From: Thomas Gleixner <tglx@linutronix.de>
Date: Fri, 03 Dec 2010 11:42:10 +0100

The precalculated header size is not updated when an event is inherited. That
results in bogus sample entries for all child events.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
---
 kernel/perf_event.c |    6 ++++++
 1 file changed, 6 insertions(+)

Index: linux-2.6-tip/kernel/perf_event.c
===================================================================
--- linux-2.6-tip.orig/kernel/perf_event.c
+++ linux-2.6-tip/kernel/perf_event.c
@@ -6184,6 +6184,12 @@ inherit_event(struct perf_event *parent_
 	child_event->overflow_handler = parent_event->overflow_handler;
 
 	/*
+	 * Precalculate sample_data sizes
+	 */
+	perf_event__header_size(child_event);
+	perf_event__id_header_size(child_event);
+
+	/*
 	 * Link it up in the child's context:
 	 */
 	raw_spin_lock_irqsave(&child_ctx->lock, flags);

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

* Re: [GIT PULL 0/4] perf/core improvements
  2010-12-02 19:39 Arnaldo Carvalho de Melo
  2010-12-02 23:00 ` Thomas Gleixner
@ 2010-12-03  6:10 ` Ian Munsie
  2010-12-03 13:05   ` Arnaldo Carvalho de Melo
  1 sibling, 1 reply; 12+ messages in thread
From: Ian Munsie @ 2010-12-03  6:10 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: Ingo Molnar, linux-kernel, Frederic Weisbecker, Mike Galbraith,
	Paul Mackerras, Peter Zijlstra, Stephane Eranian,
	Arnaldo Carvalho de Melo

Excerpts from Arnaldo Carvalho de Melo's message of Fri Dec 03 06:39:28 +1100 2010:
>     Ian, if you prefer, please test it before Ingo merges it.

Have done so and just about finished rebasing my patches on top of these
- I'll try to get them posted tonight. The bug I was working on is
fixed, so I'm happy :)

I haven't come across the bug that Thomas ran into, but then again I
haven't been testing the non-perf parts of perf for this either.

Which reminds me, does anyone have a test suite for perf other than
./perf test?

Cheers,
-Ian

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

* Re: [GIT PULL 0/4] perf/core improvements
  2010-12-02 23:00 ` Thomas Gleixner
@ 2010-12-03  0:44   ` Arnaldo Carvalho de Melo
  2010-12-03 11:51     ` Thomas Gleixner
  0 siblings, 1 reply; 12+ messages in thread
From: Arnaldo Carvalho de Melo @ 2010-12-03  0:44 UTC (permalink / raw)
  To: Thomas Gleixner
  Cc: Ingo Molnar, linux-kernel, Frederic Weisbecker, Ian Munsie,
	Mike Galbraith, Paul Mackerras, Peter Zijlstra, Stephane Eranian

Em Fri, Dec 03, 2010 at 12:00:09AM +0100, Thomas Gleixner escreveu:
> On Thu, 2 Dec 2010, Arnaldo Carvalho de Melo wrote:
> 
> > Hi Ingo,
> > 
> >         Please consider pulling after at least Ian and Peter acks it:
> > 
> > git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux-2.6 perf/core
> > 
> > 	Peter already acked a previous version of this, so I left his acked by
> > there, this new one is much simpler than the first one he acked, so I think
> > he'll be happy with this one as well, Peter?
> > 
> > 	I tested it using the perf tools built from what is in tip/perf/urgent
> > and it works as expected, i.e. the new fields are just discarded since they are
> > stashed as a trailer in the MMAP, FORK, etc events, so old tools process new
> > perf.data files just fine.
> > 
> > 	Also the new tools works on older kernels, also tested.
> > 
> > 	Ian, if you prefer, please test it before Ingo merges it.
> 
> Did so. Have some odd fallout:
> 
>     tracepoint event: type 65535
> 
>     data->tid 2621441 data->pid 9
> 
> Investigating. Please wait

Thanks, as I said on IRC, perhaps I neglected the non-perf bits of perf
:-\

- Arnaldo

Guess even for people understanding that "perf" is not just about
profiling that name gets in the way, "observe" is the only thing I think
I would think in a potential rename, but heck, it has 3+ letters :-\

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

* Re: [GIT PULL 0/4] perf/core improvements
  2010-12-02 19:39 Arnaldo Carvalho de Melo
@ 2010-12-02 23:00 ` Thomas Gleixner
  2010-12-03  0:44   ` Arnaldo Carvalho de Melo
  2010-12-03  6:10 ` Ian Munsie
  1 sibling, 1 reply; 12+ messages in thread
From: Thomas Gleixner @ 2010-12-02 23:00 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: Ingo Molnar, linux-kernel, Frederic Weisbecker, Ian Munsie,
	Mike Galbraith, Paul Mackerras, Peter Zijlstra, Stephane Eranian,
	Arnaldo Carvalho de Melo

On Thu, 2 Dec 2010, Arnaldo Carvalho de Melo wrote:

> Hi Ingo,
> 
>         Please consider pulling after at least Ian and Peter acks it:
> 
> git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux-2.6 perf/core
> 
> 	Peter already acked a previous version of this, so I left his acked by
> there, this new one is much simpler than the first one he acked, so I think
> he'll be happy with this one as well, Peter?
> 
> 	I tested it using the perf tools built from what is in tip/perf/urgent
> and it works as expected, i.e. the new fields are just discarded since they are
> stashed as a trailer in the MMAP, FORK, etc events, so old tools process new
> perf.data files just fine.
> 
> 	Also the new tools works on older kernels, also tested.
> 
> 	Ian, if you prefer, please test it before Ingo merges it.

Did so. Have some odd fallout:

    tracepoint event: type 65535

    data->tid 2621441 data->pid 9

Investigating. Please wait

	       tglx


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

* [GIT PULL 0/4] perf/core improvements
@ 2010-12-02 19:39 Arnaldo Carvalho de Melo
  2010-12-02 23:00 ` Thomas Gleixner
  2010-12-03  6:10 ` Ian Munsie
  0 siblings, 2 replies; 12+ messages in thread
From: Arnaldo Carvalho de Melo @ 2010-12-02 19:39 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Arnaldo Carvalho de Melo, Frederic Weisbecker,
	Ian Munsie, Mike Galbraith, Paul Mackerras, Peter Zijlstra,
	Stephane Eranian, Arnaldo Carvalho de Melo

Hi Ingo,

        Please consider pulling after at least Ian and Peter acks it:

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

	Peter already acked a previous version of this, so I left his acked by
there, this new one is much simpler than the first one he acked, so I think
he'll be happy with this one as well, Peter?

	I tested it using the perf tools built from what is in tip/perf/urgent
and it works as expected, i.e. the new fields are just discarded since they are
stashed as a trailer in the MMAP, FORK, etc events, so old tools process new
perf.data files just fine.

	Also the new tools works on older kernels, also tested.

	Ian, if you prefer, please test it before Ingo merges it.

Regards,

- Arnaldo

Arnaldo Carvalho de Melo (4):
  perf events: Separate the routines handling the PERF_SAMPLE_ identity fields
  perf events: Make sample_type identity fields available in all PERF_RECORD_ events
  perf session: Parse sample earlier
  perf tools: Ask for ID PERF_SAMPLE_ info on all PERF_RECORD_ events

 include/linux/perf_event.h               |   13 +-
 kernel/perf_event.c                      |  207 +++++++++++++------
 tools/perf/Documentation/perf-record.txt |    5 +
 tools/perf/builtin-annotate.c            |    6 +-
 tools/perf/builtin-diff.c                |   11 +-
 tools/perf/builtin-inject.c              |   39 ++--
 tools/perf/builtin-kmem.c                |   21 +--
 tools/perf/builtin-lock.c                |   12 +-
 tools/perf/builtin-record.c              |   23 ++
 tools/perf/builtin-report.c              |   15 +-
 tools/perf/builtin-sched.c               |   21 +--
 tools/perf/builtin-script.c              |   34 +--
 tools/perf/builtin-timechart.c           |   40 ++--
 tools/perf/builtin-top.c                 |   12 +-
 tools/perf/util/build-id.c               |    7 +-
 tools/perf/util/event.c                  |  341 +++++++++++++++++++----------
 tools/perf/util/event.h                  |   27 ++-
 tools/perf/util/header.c                 |   29 ++-
 tools/perf/util/header.h                 |    1 +
 tools/perf/util/hist.h                   |    2 +
 tools/perf/util/session.c                |  159 ++++++++++++---
 tools/perf/util/session.h                |   12 +-
 22 files changed, 696 insertions(+), 341 deletions(-)


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

end of thread, other threads:[~2010-12-03 13:05 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-08-10 21:53 [GIT PULL 0/4] perf/core improvements Arnaldo Carvalho de Melo
2010-08-10 21:53 ` [PATCH 1/4] perf ui: Make SPACE work as PGDN in all browsers Arnaldo Carvalho de Melo
2010-08-10 21:53 ` [PATCH 2/4] perf annotate: Cycle thru sorted lines with samples Arnaldo Carvalho de Melo
2010-08-10 21:53 ` [PATCH 3/4] perf ui browser: Add ui_browser__show counterpart: __hide Arnaldo Carvalho de Melo
2010-08-10 21:53 ` [PATCH 4/4] perf ui hist browser: Fixup key bindings Arnaldo Carvalho de Melo
2010-08-11  6:35 ` [GIT PULL 0/4] perf/core improvements Ingo Molnar
2010-12-02 19:39 Arnaldo Carvalho de Melo
2010-12-02 23:00 ` Thomas Gleixner
2010-12-03  0:44   ` Arnaldo Carvalho de Melo
2010-12-03 11:51     ` Thomas Gleixner
2010-12-03  6:10 ` Ian Munsie
2010-12-03 13:05   ` Arnaldo Carvalho de Melo

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.