* [GIT PULL 0/6] perf/core improvements and fixes
@ 2011-02-16 22:54 Arnaldo Carvalho de Melo
2011-02-16 22:54 ` [PATCH 1/6] perf ui: Serialize screen updates Arnaldo Carvalho de Melo
` (6 more replies)
0 siblings, 7 replies; 8+ messages in thread
From: Arnaldo Carvalho de Melo @ 2011-02-16 22:54 UTC (permalink / raw)
To: Ingo Molnar
Cc: linux-kernel, Arnaldo Carvalho de Melo, 2nddept-manager,
Franck Bui-Huu, Frederic Weisbecker, Ingo Molnar,
Jesse Brandeburg, Masami Hiramatsu, Mike Galbraith,
Paul Mackerras, Peter Zijlstra, Stephane Eranian, Tom Zanussi,
Arnaldo Carvalho de Melo
Hi Ingo,
Please consider pulling 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: Serialize screen updates
perf annotate: Check if offset is less than symbol size
perf annotate browser: Use the percent color for the whole line
Jesse Brandeburg (1):
perf tools: Update Makefile with some help
Masami Hiramatsu (2):
perf probe: Support function@filename syntax for --line
perf probe: Show filename which contains target function
tools/perf/Documentation/Makefile | 19 ++++++++++---------
tools/perf/Documentation/perf-probe.txt | 7 ++++---
tools/perf/Makefile | 31 +++++++++++++++++++++++++++++++
tools/perf/util/annotate.c | 3 ++-
tools/perf/util/probe-event.c | 17 +++++++++++++----
tools/perf/util/ui/browser.c | 7 +++++++
tools/perf/util/ui/browsers/annotate.c | 5 +++--
tools/perf/util/ui/helpline.c | 5 ++++-
tools/perf/util/ui/setup.c | 3 +++
tools/perf/util/ui/ui.h | 8 ++++++++
10 files changed, 85 insertions(+), 20 deletions(-)
create mode 100644 tools/perf/util/ui/ui.h
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH 1/6] perf ui: Serialize screen updates
2011-02-16 22:54 [GIT PULL 0/6] perf/core improvements and fixes Arnaldo Carvalho de Melo
@ 2011-02-16 22:54 ` Arnaldo Carvalho de Melo
2011-02-16 22:54 ` [PATCH 2/6] perf annotate: Check if offset is less than symbol size Arnaldo Carvalho de Melo
` (5 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: Arnaldo Carvalho de Melo @ 2011-02-16 22:54 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, Tom Zanussi
From: Arnaldo Carvalho de Melo <acme@redhat.com>
The ui operations so far were used by just one thread, but 'perf top
--tui' now has two threads updating the screen, so we need to use a
mutex to avoid garbling the screen.
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>
Cc: Tom Zanussi <tzanussi@gmail.com>
LKML-Reference: <new-submission>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/perf/Makefile | 1 +
tools/perf/util/ui/browser.c | 7 +++++++
tools/perf/util/ui/helpline.c | 5 ++++-
tools/perf/util/ui/setup.c | 3 +++
tools/perf/util/ui/ui.h | 8 ++++++++
5 files changed, 23 insertions(+), 1 deletions(-)
create mode 100644 tools/perf/util/ui/ui.h
diff --git a/tools/perf/Makefile b/tools/perf/Makefile
index bc4d9bf..ffd1047 100644
--- a/tools/perf/Makefile
+++ b/tools/perf/Makefile
@@ -637,6 +637,7 @@ else
LIB_H += util/ui/libslang.h
LIB_H += util/ui/progress.h
LIB_H += util/ui/util.h
+ LIB_H += util/ui/ui.h
endif
endif
diff --git a/tools/perf/util/ui/browser.c b/tools/perf/util/ui/browser.c
index 8bc010e..60d6c81 100644
--- a/tools/perf/util/ui/browser.c
+++ b/tools/perf/util/ui/browser.c
@@ -1,4 +1,5 @@
#include "libslang.h"
+#include "ui.h"
#include <linux/compiler.h>
#include <linux/list.h>
#include <linux/rbtree.h>
@@ -178,6 +179,7 @@ int ui_browser__show(struct ui_browser *self, const char *title,
if (self->sb == NULL)
return -1;
+ pthread_mutex_lock(&ui__lock);
SLsmg_gotorc(0, 0);
ui_browser__set_color(self, NEWT_COLORSET_ROOT);
slsmg_write_nstring(title, self->width);
@@ -188,25 +190,30 @@ int ui_browser__show(struct ui_browser *self, const char *title,
va_start(ap, helpline);
ui_helpline__vpush(helpline, ap);
va_end(ap);
+ pthread_mutex_unlock(&ui__lock);
return 0;
}
void ui_browser__hide(struct ui_browser *self)
{
+ pthread_mutex_lock(&ui__lock);
newtFormDestroy(self->form);
self->form = NULL;
ui_helpline__pop();
+ pthread_mutex_unlock(&ui__lock);
}
int ui_browser__refresh(struct ui_browser *self)
{
int row;
+ pthread_mutex_lock(&ui__lock);
newtScrollbarSet(self->sb, self->index, self->nr_entries - 1);
row = self->refresh(self);
ui_browser__set_color(self, HE_COLORSET_NORMAL);
SLsmg_fill_region(self->y + row, self->x,
self->height - row, self->width, ' ');
+ pthread_mutex_unlock(&ui__lock);
return 0;
}
diff --git a/tools/perf/util/ui/helpline.c b/tools/perf/util/ui/helpline.c
index 8d79daa..f36d2ff 100644
--- a/tools/perf/util/ui/helpline.c
+++ b/tools/perf/util/ui/helpline.c
@@ -5,6 +5,7 @@
#include "../debug.h"
#include "helpline.h"
+#include "ui.h"
void ui_helpline__pop(void)
{
@@ -55,7 +56,8 @@ int ui_helpline__show_help(const char *format, va_list ap)
int ret;
static int backlog;
- ret = vsnprintf(ui_helpline__last_msg + backlog,
+ pthread_mutex_lock(&ui__lock);
+ ret = vsnprintf(ui_helpline__last_msg + backlog,
sizeof(ui_helpline__last_msg) - backlog, format, ap);
backlog += ret;
@@ -64,6 +66,7 @@ int ui_helpline__show_help(const char *format, va_list ap)
newtRefresh();
backlog = 0;
}
+ pthread_mutex_unlock(&ui__lock);
return ret;
}
diff --git a/tools/perf/util/ui/setup.c b/tools/perf/util/ui/setup.c
index fbf1a14..ee46d67 100644
--- a/tools/perf/util/ui/setup.c
+++ b/tools/perf/util/ui/setup.c
@@ -6,6 +6,9 @@
#include "../debug.h"
#include "browser.h"
#include "helpline.h"
+#include "ui.h"
+
+pthread_mutex_t ui__lock = PTHREAD_MUTEX_INITIALIZER;
static void newt_suspend(void *d __used)
{
diff --git a/tools/perf/util/ui/ui.h b/tools/perf/util/ui/ui.h
new file mode 100644
index 0000000..d264e05
--- /dev/null
+++ b/tools/perf/util/ui/ui.h
@@ -0,0 +1,8 @@
+#ifndef _PERF_UI_H_
+#define _PERF_UI_H_ 1
+
+#include <pthread.h>
+
+extern pthread_mutex_t ui__lock;
+
+#endif /* _PERF_UI_H_ */
--
1.6.2.5
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 2/6] perf annotate: Check if offset is less than symbol size
2011-02-16 22:54 [GIT PULL 0/6] perf/core improvements and fixes Arnaldo Carvalho de Melo
2011-02-16 22:54 ` [PATCH 1/6] perf ui: Serialize screen updates Arnaldo Carvalho de Melo
@ 2011-02-16 22:54 ` Arnaldo Carvalho de Melo
2011-02-16 22:54 ` [PATCH 3/6] perf annotate browser: Use the percent color for the whole line Arnaldo Carvalho de Melo
` (4 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: Arnaldo Carvalho de Melo @ 2011-02-16 22:54 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, Tom Zanussi
From: Arnaldo Carvalho de Melo <acme@redhat.com>
Just like done on symbol__inc_addr_samples to catch misparsed offsets
from objdump.
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>
Cc: Tom Zanussi <tzanussi@gmail.com>
LKML-Reference: <new-submission>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/perf/util/annotate.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/tools/perf/util/annotate.c b/tools/perf/util/annotate.c
index 02976b8..70ec422 100644
--- a/tools/perf/util/annotate.c
+++ b/tools/perf/util/annotate.c
@@ -541,11 +541,12 @@ void symbol__annotate_decay_histogram(struct symbol *sym, int evidx)
struct annotation *notes = symbol__annotation(sym);
struct sym_hist *h = annotation__histogram(notes, evidx);
struct objdump_line *pos;
+ int len = sym->end - sym->start;
h->sum = 0;
list_for_each_entry(pos, ¬es->src->source, node) {
- if (pos->offset != -1) {
+ if (pos->offset != -1 && pos->offset < len) {
h->addr[pos->offset] = h->addr[pos->offset] * 7 / 8;
h->sum += h->addr[pos->offset];
}
--
1.6.2.5
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 3/6] perf annotate browser: Use the percent color for the whole line
2011-02-16 22:54 [GIT PULL 0/6] perf/core improvements and fixes Arnaldo Carvalho de Melo
2011-02-16 22:54 ` [PATCH 1/6] perf ui: Serialize screen updates Arnaldo Carvalho de Melo
2011-02-16 22:54 ` [PATCH 2/6] perf annotate: Check if offset is less than symbol size Arnaldo Carvalho de Melo
@ 2011-02-16 22:54 ` Arnaldo Carvalho de Melo
2011-02-16 22:54 ` [PATCH 4/6] perf tools: Update Makefile with some help Arnaldo Carvalho de Melo
` (3 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: Arnaldo Carvalho de Melo @ 2011-02-16 22:54 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, Tom Zanussi
From: Arnaldo Carvalho de Melo <acme@redhat.com>
Not just for the percentage number, to see the hot lines more easily.
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>
Cc: Tom Zanussi <tzanussi@gmail.com>
LKML-Reference: <new-submission>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/perf/util/ui/browsers/annotate.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/tools/perf/util/ui/browsers/annotate.c b/tools/perf/util/ui/browsers/annotate.c
index 1aa3965..cfb5a27 100644
--- a/tools/perf/util/ui/browsers/annotate.c
+++ b/tools/perf/util/ui/browsers/annotate.c
@@ -44,8 +44,6 @@ static void annotate_browser__write(struct ui_browser *self, void *entry, int ro
struct objdump_line_rb_node *olrb = objdump_line__rb(ol);
ui_browser__set_percent_color(self, olrb->percent, current_entry);
slsmg_printf(" %7.2f ", olrb->percent);
- if (!current_entry)
- ui_browser__set_color(self, HE_COLORSET_CODE);
} else {
ui_browser__set_percent_color(self, 0, current_entry);
slsmg_write_nstring(" ", 9);
@@ -57,6 +55,9 @@ static void annotate_browser__write(struct ui_browser *self, void *entry, int ro
slsmg_write_nstring(" ", width - 18);
else
slsmg_write_nstring(ol->line, width - 18);
+
+ if (!current_entry)
+ ui_browser__set_color(self, HE_COLORSET_CODE);
}
static double objdump_line__calc_percent(struct objdump_line *self,
--
1.6.2.5
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 4/6] perf tools: Update Makefile with some help
2011-02-16 22:54 [GIT PULL 0/6] perf/core improvements and fixes Arnaldo Carvalho de Melo
` (2 preceding siblings ...)
2011-02-16 22:54 ` [PATCH 3/6] perf annotate browser: Use the percent color for the whole line Arnaldo Carvalho de Melo
@ 2011-02-16 22:54 ` Arnaldo Carvalho de Melo
2011-02-16 22:54 ` [PATCH 5/6] perf probe: Support function@filename syntax for --line Arnaldo Carvalho de Melo
` (2 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: Arnaldo Carvalho de Melo @ 2011-02-16 22:54 UTC (permalink / raw)
To: Ingo Molnar; +Cc: linux-kernel, Jesse Brandeburg, Arnaldo Carvalho de Melo
From: Jesse Brandeburg <jesse.brandeburg@intel.com>
The perf makefile is nicely complete except for
a) an uninstall option
b) a 'make help' description
This patch implements b)
it also comments out other non-working makefile targets
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
LKML-Reference: <new-submission>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/perf/Documentation/Makefile | 19 ++++++++++---------
tools/perf/Makefile | 30 ++++++++++++++++++++++++++++++
2 files changed, 40 insertions(+), 9 deletions(-)
diff --git a/tools/perf/Documentation/Makefile b/tools/perf/Documentation/Makefile
index bd498d4..4626a39 100644
--- a/tools/perf/Documentation/Makefile
+++ b/tools/perf/Documentation/Makefile
@@ -178,8 +178,8 @@ install-pdf: pdf
$(INSTALL) -d -m 755 $(DESTDIR)$(pdfdir)
$(INSTALL) -m 644 user-manual.pdf $(DESTDIR)$(pdfdir)
-install-html: html
- '$(SHELL_PATH_SQ)' ./install-webdoc.sh $(DESTDIR)$(htmldir)
+#install-html: html
+# '$(SHELL_PATH_SQ)' ./install-webdoc.sh $(DESTDIR)$(htmldir)
../PERF-VERSION-FILE: .FORCE-PERF-VERSION-FILE
$(QUIET_SUBDIR0)../ $(QUIET_SUBDIR1) PERF-VERSION-FILE
@@ -288,15 +288,16 @@ $(patsubst %.txt,%.html,$(wildcard howto/*.txt)): %.html : %.txt
sed -e '1,/^$$/d' $< | $(ASCIIDOC) -b xhtml11 - >$@+ && \
mv $@+ $@
-install-webdoc : html
- '$(SHELL_PATH_SQ)' ./install-webdoc.sh $(WEBDOC_DEST)
+# UNIMPLEMENTED
+#install-webdoc : html
+# '$(SHELL_PATH_SQ)' ./install-webdoc.sh $(WEBDOC_DEST)
-quick-install: quick-install-man
+# quick-install: quick-install-man
-quick-install-man:
- '$(SHELL_PATH_SQ)' ./install-doc-quick.sh $(DOC_REF) $(DESTDIR)$(mandir)
+# quick-install-man:
+# '$(SHELL_PATH_SQ)' ./install-doc-quick.sh $(DOC_REF) $(DESTDIR)$(mandir)
-quick-install-html:
- '$(SHELL_PATH_SQ)' ./install-doc-quick.sh $(HTML_REF) $(DESTDIR)$(htmldir)
+#quick-install-html:
+# '$(SHELL_PATH_SQ)' ./install-doc-quick.sh $(HTML_REF) $(DESTDIR)$(htmldir)
.PHONY: .FORCE-PERF-VERSION-FILE
diff --git a/tools/perf/Makefile b/tools/perf/Makefile
index ffd1047..7c75f1d 100644
--- a/tools/perf/Makefile
+++ b/tools/perf/Makefile
@@ -1102,6 +1102,36 @@ $(sort $(dir $(DIRECTORY_DEPS))):
$(LIB_FILE): $(LIB_OBJS)
$(QUIET_AR)$(RM) $@ && $(AR) rcs $@ $(LIB_OBJS)
+help:
+ @echo 'Perf make targets:'
+ @echo ' doc - make *all* documentation (see below)'
+ @echo ' man - make manpage documentation (access with man <foo>)'
+ @echo ' html - make html documentation'
+ @echo ' info - make GNU info documentation (access with info <foo>)'
+ @echo ' pdf - make pdf documentation'
+ @echo ' TAGS - use etags to make tag information for source browsing'
+ @echo ' tags - use ctags to make tag information for source browsing'
+ @echo ' cscope - use cscope to make interactive browsing database'
+ @echo ''
+ @echo 'Perf install targets:'
+ @echo ' NOTE: documentation build requires asciidoc, xmlto packages to be installed'
+ @echo ' HINT: use "make prefix=<path> <install target>" to install to a particular'
+ @echo ' path like make prefix=/usr/local install install-doc'
+ @echo ' install - install compiled binaries'
+ @echo ' install-doc - install *all* documentation'
+ @echo ' install-man - install manpage documentation'
+ @echo ' install-html - install html documentation'
+ @echo ' install-info - install GNU info documentation'
+ @echo ' install-pdf - install pdf documentation'
+ @echo ''
+ @echo ' quick-install-doc - alias for quick-install-man'
+ @echo ' quick-install-man - install the documentation quickly'
+ @echo ' quick-install-html - install the html documentation quickly'
+ @echo ''
+ @echo 'Perf maintainer targets:'
+ @echo ' distclean - alias to clean'
+ @echo ' clean - clean all binary objects and build output'
+
doc:
$(MAKE) -C Documentation all
--
1.6.2.5
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 5/6] perf probe: Support function@filename syntax for --line
2011-02-16 22:54 [GIT PULL 0/6] perf/core improvements and fixes Arnaldo Carvalho de Melo
` (3 preceding siblings ...)
2011-02-16 22:54 ` [PATCH 4/6] perf tools: Update Makefile with some help Arnaldo Carvalho de Melo
@ 2011-02-16 22:54 ` Arnaldo Carvalho de Melo
2011-02-16 22:54 ` [PATCH 6/6] perf probe: Show filename which contains target function Arnaldo Carvalho de Melo
2011-02-17 13:50 ` [GIT PULL 0/6] perf/core improvements and fixes Ingo Molnar
6 siblings, 0 replies; 8+ messages in thread
From: Arnaldo Carvalho de Melo @ 2011-02-16 22:54 UTC (permalink / raw)
To: Ingo Molnar
Cc: linux-kernel, Masami Hiramatsu, 2nddept-manager, Franck Bui-Huu,
Ingo Molnar, Paul Mackerras, Peter Zijlstra,
Arnaldo Carvalho de Melo
From: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Since "perf probe --add" supports function@filename syntax, --line
option should also support it.
Cc: 2nddept-manager@sdl.hitachi.co.jp
Cc: Franck Bui-Huu <fbuihuu@gmail.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: linux-kernel@vger.kernel.org
LKML-Reference: <20110210090810.1809.26913.stgit@ltc236.sdl.hitachi.co.jp>
Signed-off-by: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/perf/Documentation/perf-probe.txt | 7 ++++---
tools/perf/util/probe-event.c | 15 ++++++++++++---
2 files changed, 16 insertions(+), 6 deletions(-)
diff --git a/tools/perf/Documentation/perf-probe.txt b/tools/perf/Documentation/perf-probe.txt
index 81c3220..02bafce 100644
--- a/tools/perf/Documentation/perf-probe.txt
+++ b/tools/perf/Documentation/perf-probe.txt
@@ -16,7 +16,7 @@ or
or
'perf probe' --list
or
-'perf probe' [options] --line='FUNC[:RLN[+NUM|:RLN2]]|SRC:ALN[+NUM|:ALN2]'
+'perf probe' [options] --line='LINE'
or
'perf probe' [options] --vars='PROBEPOINT'
@@ -128,13 +128,14 @@ LINE SYNTAX
-----------
Line range is described by following syntax.
- "FUNC[:RLN[+NUM|-RLN2]]|SRC[:ALN[+NUM|-ALN2]]"
+ "FUNC[@SRC][:RLN[+NUM|-RLN2]]|SRC[:ALN[+NUM|-ALN2]]"
FUNC specifies the function name of showing lines. 'RLN' is the start line
number from function entry line, and 'RLN2' is the end line number. As same as
probe syntax, 'SRC' means the source file path, 'ALN' is start line number,
and 'ALN2' is end line number in the file. It is also possible to specify how
-many lines to show by using 'NUM'.
+many lines to show by using 'NUM'. Moreover, 'FUNC@SRC' combination is good
+for searching a specific function when several functions share same name.
So, "source.c:100-120" shows lines between 100th to l20th in source.c file. And "func:10+20" shows 20 lines from 10th line of func function.
LAZY MATCHING
diff --git a/tools/perf/util/probe-event.c b/tools/perf/util/probe-event.c
index 9d237e3..cbd7650 100644
--- a/tools/perf/util/probe-event.c
+++ b/tools/perf/util/probe-event.c
@@ -595,11 +595,11 @@ static int parse_line_num(char **ptr, int *val, const char *what)
* The line range syntax is described by:
*
* SRC[:SLN[+NUM|-ELN]]
- * FNC[:SLN[+NUM|-ELN]]
+ * FNC[@SRC][:SLN[+NUM|-ELN]]
*/
int parse_line_range_desc(const char *arg, struct line_range *lr)
{
- char *range, *name = strdup(arg);
+ char *range, *file, *name = strdup(arg);
int err;
if (!name)
@@ -649,7 +649,16 @@ int parse_line_range_desc(const char *arg, struct line_range *lr)
}
}
- if (strchr(name, '.'))
+ file = strchr(name, '@');
+ if (file) {
+ *file = '\0';
+ lr->file = strdup(++file);
+ if (lr->file == NULL) {
+ err = -ENOMEM;
+ goto err;
+ }
+ lr->function = name;
+ } else if (strchr(name, '.'))
lr->file = name;
else
lr->function = name;
--
1.6.2.5
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 6/6] perf probe: Show filename which contains target function
2011-02-16 22:54 [GIT PULL 0/6] perf/core improvements and fixes Arnaldo Carvalho de Melo
` (4 preceding siblings ...)
2011-02-16 22:54 ` [PATCH 5/6] perf probe: Support function@filename syntax for --line Arnaldo Carvalho de Melo
@ 2011-02-16 22:54 ` Arnaldo Carvalho de Melo
2011-02-17 13:50 ` [GIT PULL 0/6] perf/core improvements and fixes Ingo Molnar
6 siblings, 0 replies; 8+ messages in thread
From: Arnaldo Carvalho de Melo @ 2011-02-16 22:54 UTC (permalink / raw)
To: Ingo Molnar
Cc: linux-kernel, Masami Hiramatsu, 2nddept-manager, Franck Bui-Huu,
Ingo Molnar, Paul Mackerras, Peter Zijlstra,
Arnaldo Carvalho de Melo
From: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Show filename which contains a target function with the function name on
"--lines" mode, because perf-probe just shows the first function even if
there are many same-name functions.
Originally adopted by Franck Bui-Huu's patch which shows file name
instead of function name. I've just modified it to show both of function
name and file name, because of completeness of output.
E.g.)
$ perf probe -L t_show
<t_show@/home/mhiramat/ksrc/linux-2.6-tip/kernel/trace/ftrace.c:0>
0 static int t_show(struct seq_file *m, void *v)
1 {
2 struct ftrace_iterator *iter = m->private;
...
$ perf probe -L t_show@trace/trace.c
<t_show@/home/mhiramat/ksrc/linux-2.6-tip/kernel/trace/trace.c:0>
0 static int t_show(struct seq_file *m, void *v)
1 {
struct tracer *t = v;
...
Original-patch-by: Franck Bui-Huu <fbuihuu@gmail.com>
Cc: 2nddept-manager@sdl.hitachi.co.jp
Cc: Franck Bui-Huu <fbuihuu@gmail.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
LKML-Reference: <20110210090816.1809.43426.stgit@ltc236.sdl.hitachi.co.jp>
Signed-off-by: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/perf/util/probe-event.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/tools/perf/util/probe-event.c b/tools/perf/util/probe-event.c
index cbd7650..0e3ea13 100644
--- a/tools/perf/util/probe-event.c
+++ b/tools/perf/util/probe-event.c
@@ -409,7 +409,7 @@ int show_line_range(struct line_range *lr, const char *module)
setup_pager();
if (lr->function)
- fprintf(stdout, "<%s:%d>\n", lr->function,
+ fprintf(stdout, "<%s@%s:%d>\n", lr->function, lr->path,
lr->start - lr->offset);
else
fprintf(stdout, "<%s:%d>\n", lr->path, lr->start);
--
1.6.2.5
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [GIT PULL 0/6] perf/core improvements and fixes
2011-02-16 22:54 [GIT PULL 0/6] perf/core improvements and fixes Arnaldo Carvalho de Melo
` (5 preceding siblings ...)
2011-02-16 22:54 ` [PATCH 6/6] perf probe: Show filename which contains target function Arnaldo Carvalho de Melo
@ 2011-02-17 13:50 ` Ingo Molnar
6 siblings, 0 replies; 8+ messages in thread
From: Ingo Molnar @ 2011-02-17 13:50 UTC (permalink / raw)
To: Arnaldo Carvalho de Melo
Cc: linux-kernel, 2nddept-manager, Franck Bui-Huu,
Frederic Weisbecker, Jesse Brandeburg, Masami Hiramatsu,
Mike Galbraith, Paul Mackerras, Peter Zijlstra, Stephane Eranian,
Tom Zanussi, Arnaldo Carvalho de Melo
* Arnaldo Carvalho de Melo <acme@infradead.org> wrote:
> Hi Ingo,
>
> Please consider pulling 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: Serialize screen updates
> perf annotate: Check if offset is less than symbol size
> perf annotate browser: Use the percent color for the whole line
>
> Jesse Brandeburg (1):
> perf tools: Update Makefile with some help
>
> Masami Hiramatsu (2):
> perf probe: Support function@filename syntax for --line
> perf probe: Show filename which contains target function
>
> tools/perf/Documentation/Makefile | 19 ++++++++++---------
> tools/perf/Documentation/perf-probe.txt | 7 ++++---
> tools/perf/Makefile | 31 +++++++++++++++++++++++++++++++
> tools/perf/util/annotate.c | 3 ++-
> tools/perf/util/probe-event.c | 17 +++++++++++++----
> tools/perf/util/ui/browser.c | 7 +++++++
> tools/perf/util/ui/browsers/annotate.c | 5 +++--
> tools/perf/util/ui/helpline.c | 5 ++++-
> tools/perf/util/ui/setup.c | 3 +++
> tools/perf/util/ui/ui.h | 8 ++++++++
> 10 files changed, 85 insertions(+), 20 deletions(-)
> create mode 100644 tools/perf/util/ui/ui.h
Pulled, thanks a lot Arnaldo!
Ingo
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2011-02-17 13:51 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-02-16 22:54 [GIT PULL 0/6] perf/core improvements and fixes Arnaldo Carvalho de Melo
2011-02-16 22:54 ` [PATCH 1/6] perf ui: Serialize screen updates Arnaldo Carvalho de Melo
2011-02-16 22:54 ` [PATCH 2/6] perf annotate: Check if offset is less than symbol size Arnaldo Carvalho de Melo
2011-02-16 22:54 ` [PATCH 3/6] perf annotate browser: Use the percent color for the whole line Arnaldo Carvalho de Melo
2011-02-16 22:54 ` [PATCH 4/6] perf tools: Update Makefile with some help Arnaldo Carvalho de Melo
2011-02-16 22:54 ` [PATCH 5/6] perf probe: Support function@filename syntax for --line Arnaldo Carvalho de Melo
2011-02-16 22:54 ` [PATCH 6/6] perf probe: Show filename which contains target function Arnaldo Carvalho de Melo
2011-02-17 13:50 ` [GIT PULL 0/6] perf/core improvements and 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;
as well as URLs for NNTP newsgroup(s).