* [patch 1/8] perf report: Fix -z option
2009-06-30 23:00 [patch 0/8] Various PCL fixes Anton Blanchard
@ 2009-06-30 23:00 ` Anton Blanchard
2009-06-30 23:27 ` [tip:perfcounters/urgent] " tip-bot for Anton Blanchard
2009-06-30 23:00 ` [patch 2/8] perf_counter tools: Remove zlib dependency Anton Blanchard
` (6 subsequent siblings)
7 siblings, 1 reply; 21+ messages in thread
From: Anton Blanchard @ 2009-06-30 23:00 UTC (permalink / raw)
To: a.p.zijlstra, paulus, mingo; +Cc: linux-kernel
[-- Attachment #1: pcl_skip_zero_option.patch --]
[-- Type: text/plain, Size: 757 bytes --]
Fix a copy and paste error, -z was setting the group option.
Signed-off-by: Anton Blanchard <anton@samba.org>
---
Index: linux-2.6-tip/tools/perf/builtin-top.c
===================================================================
--- linux-2.6-tip.orig/tools/perf/builtin-top.c 2009-07-01 08:21:13.000000000 +1000
+++ linux-2.6-tip/tools/perf/builtin-top.c 2009-07-01 08:21:24.000000000 +1000
@@ -675,7 +675,7 @@
"put the counters into a counter group"),
OPT_STRING('s', "sym-filter", &sym_filter, "pattern",
"only display symbols matchig this pattern"),
- OPT_BOOLEAN('z', "zero", &group,
+ OPT_BOOLEAN('z', "zero", &zero,
"zero history across updates"),
OPT_INTEGER('F', "freq", &freq,
"profile at this frequency"),
--
^ permalink raw reply [flat|nested] 21+ messages in thread* [tip:perfcounters/urgent] perf report: Fix -z option
2009-06-30 23:00 ` [patch 1/8] perf report: Fix -z option Anton Blanchard
@ 2009-06-30 23:27 ` tip-bot for Anton Blanchard
0 siblings, 0 replies; 21+ messages in thread
From: tip-bot for Anton Blanchard @ 2009-06-30 23:27 UTC (permalink / raw)
To: linux-tip-commits; +Cc: linux-kernel, anton, hpa, mingo, tglx, mingo
Commit-ID: 1f208ea67821703fd4de056ea6f0baa81f4ad4a5
Gitweb: http://git.kernel.org/tip/1f208ea67821703fd4de056ea6f0baa81f4ad4a5
Author: Anton Blanchard <anton@samba.org>
AuthorDate: Wed, 1 Jul 2009 09:00:44 +1000
Committer: Ingo Molnar <mingo@elte.hu>
CommitDate: Wed, 1 Jul 2009 01:25:18 +0200
perf report: Fix -z option
Fix a copy and paste error, -z was setting the group option.
Signed-off-by: Anton Blanchard <anton@samba.org>
Cc: a.p.zijlstra@chello.nl
Cc: paulus@samba.org
LKML-Reference: <20090630230140.714204656@samba.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
---
tools/perf/builtin-top.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/tools/perf/builtin-top.c b/tools/perf/builtin-top.c
index cf0d21f..5c29655 100644
--- a/tools/perf/builtin-top.c
+++ b/tools/perf/builtin-top.c
@@ -675,7 +675,7 @@ static const struct option options[] = {
"put the counters into a counter group"),
OPT_STRING('s', "sym-filter", &sym_filter, "pattern",
"only display symbols matchig this pattern"),
- OPT_BOOLEAN('z', "zero", &group,
+ OPT_BOOLEAN('z', "zero", &zero,
"zero history across updates"),
OPT_INTEGER('F', "freq", &freq,
"profile at this frequency"),
^ permalink raw reply related [flat|nested] 21+ messages in thread
* [patch 2/8] perf_counter tools: Remove zlib dependency
2009-06-30 23:00 [patch 0/8] Various PCL fixes Anton Blanchard
2009-06-30 23:00 ` [patch 1/8] perf report: Fix -z option Anton Blanchard
@ 2009-06-30 23:00 ` Anton Blanchard
2009-06-30 23:27 ` [tip:perfcounters/urgent] " tip-bot for Anton Blanchard
2009-06-30 23:00 ` [patch 3/8] perf top: Move skip symbols to an array Anton Blanchard
` (5 subsequent siblings)
7 siblings, 1 reply; 21+ messages in thread
From: Anton Blanchard @ 2009-06-30 23:00 UTC (permalink / raw)
To: a.p.zijlstra, paulus, mingo; +Cc: linux-kernel
[-- Attachment #1: pcl_nozlib.patch --]
[-- Type: text/plain, Size: 667 bytes --]
The zlib devel libraries may not be installed and since we aren't using zlib
we may as well remove it.
Signed-off-by: Anton Blanchard <anton@samba.org>
---
Index: linux-2.6-tip/tools/perf/Makefile
===================================================================
--- linux-2.6-tip.orig/tools/perf/Makefile 2009-07-01 08:21:13.000000000 +1000
+++ linux-2.6-tip/tools/perf/Makefile 2009-07-01 08:21:28.000000000 +1000
@@ -379,12 +379,6 @@
endif
endif
-ifdef ZLIB_PATH
- BASIC_CFLAGS += -I$(ZLIB_PATH)/include
- EXTLIBS += -L$(ZLIB_PATH)/$(lib) $(CC_LD_DYNPATH)$(ZLIB_PATH)/$(lib)
-endif
-EXTLIBS += -lz
-
ifdef NEEDS_SOCKET
EXTLIBS += -lsocket
endif
--
^ permalink raw reply [flat|nested] 21+ messages in thread* [tip:perfcounters/urgent] perf_counter tools: Remove zlib dependency
2009-06-30 23:00 ` [patch 2/8] perf_counter tools: Remove zlib dependency Anton Blanchard
@ 2009-06-30 23:27 ` tip-bot for Anton Blanchard
0 siblings, 0 replies; 21+ messages in thread
From: tip-bot for Anton Blanchard @ 2009-06-30 23:27 UTC (permalink / raw)
To: linux-tip-commits; +Cc: linux-kernel, anton, hpa, mingo, tglx, mingo
Commit-ID: 6717534ddc328ae5cdf89f1ef802db83fc451f19
Gitweb: http://git.kernel.org/tip/6717534ddc328ae5cdf89f1ef802db83fc451f19
Author: Anton Blanchard <anton@samba.org>
AuthorDate: Wed, 1 Jul 2009 09:00:45 +1000
Committer: Ingo Molnar <mingo@elte.hu>
CommitDate: Wed, 1 Jul 2009 01:25:18 +0200
perf_counter tools: Remove zlib dependency
The zlib devel libraries may not be installed and since we aren't
using zlib we may as well remove it.
Signed-off-by: Anton Blanchard <anton@samba.org>
Cc: a.p.zijlstra@chello.nl
Cc: paulus@samba.org
LKML-Reference: <20090630230140.802078956@samba.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
---
tools/perf/Makefile | 6 ------
1 files changed, 0 insertions(+), 6 deletions(-)
diff --git a/tools/perf/Makefile b/tools/perf/Makefile
index 9c6d0ae..f572c90 100644
--- a/tools/perf/Makefile
+++ b/tools/perf/Makefile
@@ -381,12 +381,6 @@ ifndef CC_LD_DYNPATH
endif
endif
-ifdef ZLIB_PATH
- BASIC_CFLAGS += -I$(ZLIB_PATH)/include
- EXTLIBS += -L$(ZLIB_PATH)/$(lib) $(CC_LD_DYNPATH)$(ZLIB_PATH)/$(lib)
-endif
-EXTLIBS += -lz
-
ifdef NEEDS_SOCKET
EXTLIBS += -lsocket
endif
^ permalink raw reply related [flat|nested] 21+ messages in thread
* [patch 3/8] perf top: Move skip symbols to an array
2009-06-30 23:00 [patch 0/8] Various PCL fixes Anton Blanchard
2009-06-30 23:00 ` [patch 1/8] perf report: Fix -z option Anton Blanchard
2009-06-30 23:00 ` [patch 2/8] perf_counter tools: Remove zlib dependency Anton Blanchard
@ 2009-06-30 23:00 ` Anton Blanchard
2009-06-30 23:28 ` [tip:perfcounters/urgent] " tip-bot for Anton Blanchard
2009-07-01 4:31 ` [patch 3/8] " Stephen Rothwell
2009-06-30 23:00 ` [patch 4/8] perf top: Add ppc64 specific skip symbols and strip ppc64 . prefix Anton Blanchard
` (4 subsequent siblings)
7 siblings, 2 replies; 21+ messages in thread
From: Anton Blanchard @ 2009-06-30 23:00 UTC (permalink / raw)
To: a.p.zijlstra, paulus, mingo; +Cc: linux-kernel
[-- Attachment #1: pcl_skip_symbols.patch --]
[-- Type: text/plain, Size: 1326 bytes --]
Move the list of symbols we skip into an array, making it easier to add new
ones.
Signed-off-by: Anton Blanchard <anton@samba.org>
---
Index: linux-2.6-tip/tools/perf/builtin-top.c
===================================================================
--- linux-2.6-tip.orig/tools/perf/builtin-top.c 2009-07-01 08:21:24.000000000 +1000
+++ linux-2.6-tip/tools/perf/builtin-top.c 2009-07-01 08:21:31.000000000 +1000
@@ -286,11 +286,22 @@
return NULL;
}
+/* Tag samples to be skipped. */
+char *skip_symbols[] = {
+ "default_idle",
+ "cpu_idle",
+ "enter_idle",
+ "exit_idle",
+ "mwait_idle",
+ NULL
+};
+
static int symbol_filter(struct dso *self, struct symbol *sym)
{
static int filter_match;
struct sym_entry *syme;
const char *name = sym->name;
+ int i;
if (!strcmp(name, "_text") ||
!strcmp(name, "_etext") ||
@@ -302,13 +313,12 @@
return 1;
syme = dso__sym_priv(self, sym);
- /* Tag samples to be skipped. */
- if (!strcmp("default_idle", name) ||
- !strcmp("cpu_idle", name) ||
- !strcmp("enter_idle", name) ||
- !strcmp("exit_idle", name) ||
- !strcmp("mwait_idle", name))
- syme->skip = 1;
+ for (i = 0; skip_symbols[i]; i++) {
+ if (!strcmp(skip_symbols[i], name)) {
+ syme->skip = 1;
+ break;
+ }
+ }
if (filter_match == 1) {
filter_end = sym->start;
--
^ permalink raw reply [flat|nested] 21+ messages in thread* [tip:perfcounters/urgent] perf top: Move skip symbols to an array
2009-06-30 23:00 ` [patch 3/8] perf top: Move skip symbols to an array Anton Blanchard
@ 2009-06-30 23:28 ` tip-bot for Anton Blanchard
2009-07-01 4:31 ` [patch 3/8] " Stephen Rothwell
1 sibling, 0 replies; 21+ messages in thread
From: tip-bot for Anton Blanchard @ 2009-06-30 23:28 UTC (permalink / raw)
To: linux-tip-commits; +Cc: linux-kernel, anton, hpa, mingo, tglx, mingo
Commit-ID: 2ab52083ffc057014e502cf3473adc41436922fa
Gitweb: http://git.kernel.org/tip/2ab52083ffc057014e502cf3473adc41436922fa
Author: Anton Blanchard <anton@samba.org>
AuthorDate: Wed, 1 Jul 2009 09:00:46 +1000
Committer: Ingo Molnar <mingo@elte.hu>
CommitDate: Wed, 1 Jul 2009 01:25:19 +0200
perf top: Move skip symbols to an array
Move the list of symbols we skip into an array, making it
easier to add new ones.
Signed-off-by: Anton Blanchard <anton@samba.org>
Cc: a.p.zijlstra@chello.nl
Cc: paulus@samba.org
LKML-Reference: <20090630230140.904782938@samba.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
---
tools/perf/builtin-top.c | 24 +++++++++++++++++-------
1 files changed, 17 insertions(+), 7 deletions(-)
diff --git a/tools/perf/builtin-top.c b/tools/perf/builtin-top.c
index 5c29655..731ec6d 100644
--- a/tools/perf/builtin-top.c
+++ b/tools/perf/builtin-top.c
@@ -286,11 +286,22 @@ static void *display_thread(void *arg)
return NULL;
}
+/* Tag samples to be skipped. */
+char *skip_symbols[] = {
+ "default_idle",
+ "cpu_idle",
+ "enter_idle",
+ "exit_idle",
+ "mwait_idle",
+ NULL
+};
+
static int symbol_filter(struct dso *self, struct symbol *sym)
{
static int filter_match;
struct sym_entry *syme;
const char *name = sym->name;
+ int i;
if (!strcmp(name, "_text") ||
!strcmp(name, "_etext") ||
@@ -302,13 +313,12 @@ static int symbol_filter(struct dso *self, struct symbol *sym)
return 1;
syme = dso__sym_priv(self, sym);
- /* Tag samples to be skipped. */
- if (!strcmp("default_idle", name) ||
- !strcmp("cpu_idle", name) ||
- !strcmp("enter_idle", name) ||
- !strcmp("exit_idle", name) ||
- !strcmp("mwait_idle", name))
- syme->skip = 1;
+ for (i = 0; skip_symbols[i]; i++) {
+ if (!strcmp(skip_symbols[i], name)) {
+ syme->skip = 1;
+ break;
+ }
+ }
if (filter_match == 1) {
filter_end = sym->start;
^ permalink raw reply related [flat|nested] 21+ messages in thread* Re: [patch 3/8] perf top: Move skip symbols to an array
2009-06-30 23:00 ` [patch 3/8] perf top: Move skip symbols to an array Anton Blanchard
2009-06-30 23:28 ` [tip:perfcounters/urgent] " tip-bot for Anton Blanchard
@ 2009-07-01 4:31 ` Stephen Rothwell
2009-07-01 10:50 ` Ingo Molnar
1 sibling, 1 reply; 21+ messages in thread
From: Stephen Rothwell @ 2009-07-01 4:31 UTC (permalink / raw)
To: Anton Blanchard; +Cc: a.p.zijlstra, paulus, mingo, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 288 bytes --]
HI Anton,
On Wed, 01 Jul 2009 09:00:46 +1000 Anton Blanchard <anton@samba.org> wrote:
>
> +/* Tag samples to be skipped. */
> +char *skip_symbols[] = {
"static const" ?
--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/
[-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --]
^ permalink raw reply [flat|nested] 21+ messages in thread* Re: [patch 3/8] perf top: Move skip symbols to an array
2009-07-01 4:31 ` [patch 3/8] " Stephen Rothwell
@ 2009-07-01 10:50 ` Ingo Molnar
0 siblings, 0 replies; 21+ messages in thread
From: Ingo Molnar @ 2009-07-01 10:50 UTC (permalink / raw)
To: Stephen Rothwell; +Cc: Anton Blanchard, a.p.zijlstra, paulus, linux-kernel
* Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> HI Anton,
>
> On Wed, 01 Jul 2009 09:00:46 +1000 Anton Blanchard <anton@samba.org> wrote:
> >
> > +/* Tag samples to be skipped. */
> > +char *skip_symbols[] = {
>
> "static const" ?
I fixed this. Too bad there's no GCC warning for that. (Sparse
catches is but it is not enabled yet for perf.)
Ingo
^ permalink raw reply [flat|nested] 21+ messages in thread
* [patch 4/8] perf top: Add ppc64 specific skip symbols and strip ppc64 . prefix
2009-06-30 23:00 [patch 0/8] Various PCL fixes Anton Blanchard
` (2 preceding siblings ...)
2009-06-30 23:00 ` [patch 3/8] perf top: Move skip symbols to an array Anton Blanchard
@ 2009-06-30 23:00 ` Anton Blanchard
2009-06-30 23:21 ` Ingo Molnar
2009-06-30 23:28 ` [tip:perfcounters/urgent] " tip-bot for Anton Blanchard
2009-06-30 23:00 ` [patch 5/8] perf report: Fix reporting of hypervisor Anton Blanchard
` (3 subsequent siblings)
7 siblings, 2 replies; 21+ messages in thread
From: Anton Blanchard @ 2009-06-30 23:00 UTC (permalink / raw)
To: a.p.zijlstra, paulus, mingo; +Cc: linux-kernel
[-- Attachment #1: pcl_skip_symbols_pseries.patch --]
[-- Type: text/plain, Size: 946 bytes --]
Filter out some ppc64 specific idle loop functions and remove leading '.' on
ppc64 text symbols.
Signed-off-by: Anton Blanchard <anton@samba.org>
---
Do we want to wrap them with #ifdef __PPC__ ?
Index: linux-2.6-tip/tools/perf/builtin-top.c
===================================================================
--- linux-2.6-tip.orig/tools/perf/builtin-top.c 2009-07-01 08:21:31.000000000 +1000
+++ linux-2.6-tip/tools/perf/builtin-top.c 2009-07-01 08:21:36.000000000 +1000
@@ -293,6 +293,8 @@
"enter_idle",
"exit_idle",
"mwait_idle",
+ "ppc64_runlatch_off",
+ "pseries_dedicated_idle_sleep",
NULL
};
@@ -303,6 +305,13 @@
const char *name = sym->name;
int i;
+ /*
+ * ppc64 uses function descriptors and appends a '.' to the
+ * start of every instruction address. Remove it.
+ */
+ if (name[0] == '.')
+ name++;
+
if (!strcmp(name, "_text") ||
!strcmp(name, "_etext") ||
!strcmp(name, "_sinittext") ||
--
^ permalink raw reply [flat|nested] 21+ messages in thread* Re: [patch 4/8] perf top: Add ppc64 specific skip symbols and strip ppc64 . prefix
2009-06-30 23:00 ` [patch 4/8] perf top: Add ppc64 specific skip symbols and strip ppc64 . prefix Anton Blanchard
@ 2009-06-30 23:21 ` Ingo Molnar
2009-06-30 23:26 ` Anton Blanchard
2009-06-30 23:28 ` [tip:perfcounters/urgent] " tip-bot for Anton Blanchard
1 sibling, 1 reply; 21+ messages in thread
From: Ingo Molnar @ 2009-06-30 23:21 UTC (permalink / raw)
To: Anton Blanchard; +Cc: a.p.zijlstra, paulus, linux-kernel
* Anton Blanchard <anton@samba.org> wrote:
> Filter out some ppc64 specific idle loop functions and remove leading '.' on
> ppc64 text symbols.
>
> Signed-off-by: Anton Blanchard <anton@samba.org>
> ---
>
> Do we want to wrap them with #ifdef __PPC__ ?
> "enter_idle",
> "exit_idle",
> "mwait_idle",
> + "ppc64_runlatch_off",
> + "pseries_dedicated_idle_sleep",
We only want to wrap them into #ifdef __PPC__ if we do so for the
x86 ones too.
I think it's fine as-is - the names should be pretty unique, right?
Ingo
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [patch 4/8] perf top: Add ppc64 specific skip symbols and strip ppc64 . prefix
2009-06-30 23:21 ` Ingo Molnar
@ 2009-06-30 23:26 ` Anton Blanchard
0 siblings, 0 replies; 21+ messages in thread
From: Anton Blanchard @ 2009-06-30 23:26 UTC (permalink / raw)
To: Ingo Molnar; +Cc: a.p.zijlstra, paulus, linux-kernel
Hi Ingo,
> > Do we want to wrap them with #ifdef __PPC__ ?
>
> > "enter_idle",
> > "exit_idle",
> > "mwait_idle",
> > + "ppc64_runlatch_off",
> > + "pseries_dedicated_idle_sleep",
>
> We only want to wrap them into #ifdef __PPC__ if we do so for the
> x86 ones too.
>
> I think it's fine as-is - the names should be pretty unique, right?
I agree, we can start wrapping them if things get out of hand.
Anton
^ permalink raw reply [flat|nested] 21+ messages in thread
* [tip:perfcounters/urgent] perf top: Add ppc64 specific skip symbols and strip ppc64 . prefix
2009-06-30 23:00 ` [patch 4/8] perf top: Add ppc64 specific skip symbols and strip ppc64 . prefix Anton Blanchard
2009-06-30 23:21 ` Ingo Molnar
@ 2009-06-30 23:28 ` tip-bot for Anton Blanchard
1 sibling, 0 replies; 21+ messages in thread
From: tip-bot for Anton Blanchard @ 2009-06-30 23:28 UTC (permalink / raw)
To: linux-tip-commits; +Cc: linux-kernel, anton, hpa, mingo, tglx, mingo
Commit-ID: 3a3393ef75a14ae259a82f3f38624efa17884168
Gitweb: http://git.kernel.org/tip/3a3393ef75a14ae259a82f3f38624efa17884168
Author: Anton Blanchard <anton@samba.org>
AuthorDate: Wed, 1 Jul 2009 09:00:47 +1000
Committer: Ingo Molnar <mingo@elte.hu>
CommitDate: Wed, 1 Jul 2009 01:25:19 +0200
perf top: Add ppc64 specific skip symbols and strip ppc64 . prefix
Filter out some ppc64 specific idle loop functions and remove
leading '.' on ppc64 text symbols.
Signed-off-by: Anton Blanchard <anton@samba.org>
Cc: a.p.zijlstra@chello.nl
Cc: paulus@samba.org
LKML-Reference: <20090630230140.995643441@samba.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
---
tools/perf/builtin-top.c | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
diff --git a/tools/perf/builtin-top.c b/tools/perf/builtin-top.c
index 731ec6d..0506cd6 100644
--- a/tools/perf/builtin-top.c
+++ b/tools/perf/builtin-top.c
@@ -293,6 +293,8 @@ char *skip_symbols[] = {
"enter_idle",
"exit_idle",
"mwait_idle",
+ "ppc64_runlatch_off",
+ "pseries_dedicated_idle_sleep",
NULL
};
@@ -303,6 +305,13 @@ static int symbol_filter(struct dso *self, struct symbol *sym)
const char *name = sym->name;
int i;
+ /*
+ * ppc64 uses function descriptors and appends a '.' to the
+ * start of every instruction address. Remove it.
+ */
+ if (name[0] == '.')
+ name++;
+
if (!strcmp(name, "_text") ||
!strcmp(name, "_etext") ||
!strcmp(name, "_sinittext") ||
^ permalink raw reply related [flat|nested] 21+ messages in thread
* [patch 5/8] perf report: Fix reporting of hypervisor
2009-06-30 23:00 [patch 0/8] Various PCL fixes Anton Blanchard
` (3 preceding siblings ...)
2009-06-30 23:00 ` [patch 4/8] perf top: Add ppc64 specific skip symbols and strip ppc64 . prefix Anton Blanchard
@ 2009-06-30 23:00 ` Anton Blanchard
2009-06-30 23:28 ` [tip:perfcounters/urgent] " tip-bot for Anton Blanchard
2009-06-30 23:00 ` [patch 6/8] perf report: Add hypervisor dso Anton Blanchard
` (2 subsequent siblings)
7 siblings, 1 reply; 21+ messages in thread
From: Anton Blanchard @ 2009-06-30 23:00 UTC (permalink / raw)
To: a.p.zijlstra, paulus, mingo; +Cc: linux-kernel
[-- Attachment #1: pcl_fix_hypervisor_report.patch --]
[-- Type: text/plain, Size: 1092 bytes --]
PERF_EVENT_MISC_* is not a bitmask, so we have to mask and compare.
Signed-off-by: Anton Blanchard <anton@samba.org>
---
Index: linux-2.6-tip/tools/perf/builtin-report.c
===================================================================
--- linux-2.6-tip.orig/tools/perf/builtin-report.c 2009-07-01 08:21:13.000000000 +1000
+++ linux-2.6-tip/tools/perf/builtin-report.c 2009-07-01 08:21:39.000000000 +1000
@@ -1210,6 +1210,7 @@
struct map *map = NULL;
void *more_data = event->ip.__more_data;
struct ip_callchain *chain = NULL;
+ int cpumode;
if (sample_type & PERF_SAMPLE_PERIOD) {
period = *(u64 *)more_data;
@@ -1250,7 +1251,9 @@
return -1;
}
- if (event->header.misc & PERF_EVENT_MISC_KERNEL) {
+ cpumode = event->header.misc & PERF_EVENT_MISC_CPUMODE_MASK;
+
+ if (cpumode == PERF_EVENT_MISC_KERNEL) {
show = SHOW_KERNEL;
level = 'k';
@@ -1258,7 +1261,7 @@
dprintf(" ...... dso: %s\n", dso->name);
- } else if (event->header.misc & PERF_EVENT_MISC_USER) {
+ } else if (cpumode == PERF_EVENT_MISC_USER) {
show = SHOW_USER;
level = '.';
--
^ permalink raw reply [flat|nested] 21+ messages in thread* [tip:perfcounters/urgent] perf report: Fix reporting of hypervisor
2009-06-30 23:00 ` [patch 5/8] perf report: Fix reporting of hypervisor Anton Blanchard
@ 2009-06-30 23:28 ` tip-bot for Anton Blanchard
0 siblings, 0 replies; 21+ messages in thread
From: tip-bot for Anton Blanchard @ 2009-06-30 23:28 UTC (permalink / raw)
To: linux-tip-commits; +Cc: linux-kernel, anton, hpa, mingo, tglx, mingo
Commit-ID: d8db1b57d31a6b30ea2f0df318eab50fc92b38d6
Gitweb: http://git.kernel.org/tip/d8db1b57d31a6b30ea2f0df318eab50fc92b38d6
Author: Anton Blanchard <anton@samba.org>
AuthorDate: Wed, 1 Jul 2009 09:00:48 +1000
Committer: Ingo Molnar <mingo@elte.hu>
CommitDate: Wed, 1 Jul 2009 01:25:20 +0200
perf report: Fix reporting of hypervisor
PERF_EVENT_MISC_* is not a bitmask, so we have to mask and compare.
Signed-off-by: Anton Blanchard <anton@samba.org>
Cc: a.p.zijlstra@chello.nl
Cc: paulus@samba.org
LKML-Reference: <20090630230141.088394681@samba.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
---
tools/perf/builtin-report.c | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/tools/perf/builtin-report.c b/tools/perf/builtin-report.c
index 135b783..88e88c5 100644
--- a/tools/perf/builtin-report.c
+++ b/tools/perf/builtin-report.c
@@ -1213,6 +1213,7 @@ process_sample_event(event_t *event, unsigned long offset, unsigned long head)
struct map *map = NULL;
void *more_data = event->ip.__more_data;
struct ip_callchain *chain = NULL;
+ int cpumode;
if (sample_type & PERF_SAMPLE_PERIOD) {
period = *(u64 *)more_data;
@@ -1256,7 +1257,9 @@ process_sample_event(event_t *event, unsigned long offset, unsigned long head)
if (comm_list && !strlist__has_entry(comm_list, thread->comm))
return 0;
- if (event->header.misc & PERF_EVENT_MISC_KERNEL) {
+ cpumode = event->header.misc & PERF_EVENT_MISC_CPUMODE_MASK;
+
+ if (cpumode == PERF_EVENT_MISC_KERNEL) {
show = SHOW_KERNEL;
level = 'k';
@@ -1264,7 +1267,7 @@ process_sample_event(event_t *event, unsigned long offset, unsigned long head)
dprintf(" ...... dso: %s\n", dso->name);
- } else if (event->header.misc & PERF_EVENT_MISC_USER) {
+ } else if (cpumode == PERF_EVENT_MISC_USER) {
show = SHOW_USER;
level = '.';
^ permalink raw reply related [flat|nested] 21+ messages in thread
* [patch 6/8] perf report: Add hypervisor dso
2009-06-30 23:00 [patch 0/8] Various PCL fixes Anton Blanchard
` (4 preceding siblings ...)
2009-06-30 23:00 ` [patch 5/8] perf report: Fix reporting of hypervisor Anton Blanchard
@ 2009-06-30 23:00 ` Anton Blanchard
2009-06-30 23:28 ` [tip:perfcounters/urgent] " tip-bot for Anton Blanchard
2009-06-30 23:00 ` [patch 7/8] powerpc: Cleanup PCL output by hiding and adding symbols Anton Blanchard
2009-06-30 23:00 ` [patch 8/8] powerpc: Fix PCL vdso detection Anton Blanchard
7 siblings, 1 reply; 21+ messages in thread
From: Anton Blanchard @ 2009-06-30 23:00 UTC (permalink / raw)
To: a.p.zijlstra, paulus, mingo; +Cc: linux-kernel
[-- Attachment #1: pcl_fix_add_hypervisor_dso.patch --]
[-- Type: text/plain, Size: 1504 bytes --]
Add a dso for hypervisor samples. We don't get any symbol information on
the ppc64 hypervisor but this at least gives us a high level summary of the
time spent in there.
Signed-off-by: Anton Blanchard <anton@samba.org>
---
Index: linux-2.6-tip/tools/perf/builtin-report.c
===================================================================
--- linux-2.6-tip.orig/tools/perf/builtin-report.c 2009-07-01 08:21:39.000000000 +1000
+++ linux-2.6-tip/tools/perf/builtin-report.c 2009-07-01 08:21:43.000000000 +1000
@@ -118,6 +118,7 @@
static LIST_HEAD(dsos);
static struct dso *kernel_dso;
static struct dso *vdso;
+static struct dso *hypervisor_dso;
static void dsos__add(struct dso *dso)
{
@@ -199,6 +200,11 @@
dsos__add(vdso);
+ hypervisor_dso = dso__new("[hypervisor]", 0);
+ if (!hypervisor_dso)
+ return -1;
+ dsos__add(hypervisor_dso);
+
return err;
}
@@ -637,7 +643,8 @@
if (self->sym) {
ret += fprintf(fp, "[%c] %s",
- self->dso == kernel_dso ? 'k' : '.', self->sym->name);
+ self->dso == kernel_dso ? 'k' :
+ self->dso == hypervisor_dso ? 'h' : '.', self->sym->name);
} else {
ret += fprintf(fp, "%#016llx", (u64)self->ip);
}
@@ -960,6 +967,9 @@
}
switch (context) {
+ case PERF_CONTEXT_HV:
+ dso = hypervisor_dso;
+ break;
case PERF_CONTEXT_KERNEL:
dso = kernel_dso;
break;
@@ -1269,6 +1279,9 @@
} else {
show = SHOW_HV;
level = 'H';
+
+ dso = hypervisor_dso;
+
dprintf(" ...... dso: [hypervisor]\n");
}
--
^ permalink raw reply [flat|nested] 21+ messages in thread* [tip:perfcounters/urgent] perf report: Add hypervisor dso
2009-06-30 23:00 ` [patch 6/8] perf report: Add hypervisor dso Anton Blanchard
@ 2009-06-30 23:28 ` tip-bot for Anton Blanchard
0 siblings, 0 replies; 21+ messages in thread
From: tip-bot for Anton Blanchard @ 2009-06-30 23:28 UTC (permalink / raw)
To: linux-tip-commits; +Cc: linux-kernel, anton, hpa, mingo, tglx, mingo
Commit-ID: fb9c818873a788c5c01c9868cc6050df96e2c7df
Gitweb: http://git.kernel.org/tip/fb9c818873a788c5c01c9868cc6050df96e2c7df
Author: Anton Blanchard <anton@samba.org>
AuthorDate: Wed, 1 Jul 2009 09:00:49 +1000
Committer: Ingo Molnar <mingo@elte.hu>
CommitDate: Wed, 1 Jul 2009 01:25:20 +0200
perf report: Add hypervisor dso
Add a dso for hypervisor samples. We don't get any symbol
information on the ppc64 hypervisor but this at least gives
us a high level summary of the time spent in there.
Signed-off-by: Anton Blanchard <anton@samba.org>
Cc: a.p.zijlstra@chello.nl
Cc: paulus@samba.org
LKML-Reference: <20090630230141.182536873@samba.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
---
tools/perf/builtin-report.c | 15 ++++++++++++++-
1 files changed, 14 insertions(+), 1 deletions(-)
diff --git a/tools/perf/builtin-report.c b/tools/perf/builtin-report.c
index 88e88c5..3f5d8ea 100644
--- a/tools/perf/builtin-report.c
+++ b/tools/perf/builtin-report.c
@@ -121,6 +121,7 @@ typedef union event_union {
static LIST_HEAD(dsos);
static struct dso *kernel_dso;
static struct dso *vdso;
+static struct dso *hypervisor_dso;
static void dsos__add(struct dso *dso)
{
@@ -202,6 +203,11 @@ static int load_kernel(void)
dsos__add(vdso);
+ hypervisor_dso = dso__new("[hypervisor]", 0);
+ if (!hypervisor_dso)
+ return -1;
+ dsos__add(hypervisor_dso);
+
return err;
}
@@ -640,7 +646,8 @@ sort__sym_print(FILE *fp, struct hist_entry *self)
if (self->sym) {
ret += fprintf(fp, "[%c] %s",
- self->dso == kernel_dso ? 'k' : '.', self->sym->name);
+ self->dso == kernel_dso ? 'k' :
+ self->dso == hypervisor_dso ? 'h' : '.', self->sym->name);
} else {
ret += fprintf(fp, "%#016llx", (u64)self->ip);
}
@@ -963,6 +970,9 @@ hist_entry__add(struct thread *thread, struct map *map, struct dso *dso,
}
switch (context) {
+ case PERF_CONTEXT_HV:
+ dso = hypervisor_dso;
+ break;
case PERF_CONTEXT_KERNEL:
dso = kernel_dso;
break;
@@ -1275,6 +1285,9 @@ process_sample_event(event_t *event, unsigned long offset, unsigned long head)
} else {
show = SHOW_HV;
level = 'H';
+
+ dso = hypervisor_dso;
+
dprintf(" ...... dso: [hypervisor]\n");
}
^ permalink raw reply related [flat|nested] 21+ messages in thread
* [patch 7/8] powerpc: Cleanup PCL output by hiding and adding symbols
2009-06-30 23:00 [patch 0/8] Various PCL fixes Anton Blanchard
` (5 preceding siblings ...)
2009-06-30 23:00 ` [patch 6/8] perf report: Add hypervisor dso Anton Blanchard
@ 2009-06-30 23:00 ` Anton Blanchard
2009-06-30 23:22 ` Ingo Molnar
2009-06-30 23:00 ` [patch 8/8] powerpc: Fix PCL vdso detection Anton Blanchard
7 siblings, 1 reply; 21+ messages in thread
From: Anton Blanchard @ 2009-06-30 23:00 UTC (permalink / raw)
To: a.p.zijlstra, paulus, mingo; +Cc: linux-kernel
[-- Attachment #1: pci_make_symbols_local.patch --]
[-- Type: text/plain, Size: 1516 bytes --]
A lot of hits in "setup" doesn't make much sense, so hide this symbol and
allow all the hits to end up in copy_4k_page.
Also add some dummy symbols for the branches at 0xf00, 0xf20 and 0xf40,
otherwise hits end up in trap_0e which is confusing.
Signed-off-by: Anton Blanchard <anton@samba.org>
---
Index: linux-2.6-tip/arch/powerpc/lib/copypage_64.S
===================================================================
--- linux-2.6-tip.orig/arch/powerpc/lib/copypage_64.S 2009-07-01 08:21:12.000000000 +1000
+++ linux-2.6-tip/arch/powerpc/lib/copypage_64.S 2009-07-01 08:21:50.000000000 +1000
@@ -26,11 +26,11 @@
srd r8,r5,r11
mtctr r8
-setup:
+.Lsetup:
dcbt r9,r4
dcbz r9,r3
add r9,r9,r12
- bdnz setup
+ bdnz .Lsetup
END_FTR_SECTION_IFSET(CPU_FTR_CP_USE_DCBTZ)
addi r3,r3,-8
srdi r8,r5,7 /* page is copied in 128 byte strides */
Index: linux-2.6-tip/arch/powerpc/kernel/exceptions-64s.S
===================================================================
--- linux-2.6-tip.orig/arch/powerpc/kernel/exceptions-64s.S 2009-07-01 08:21:12.000000000 +1000
+++ linux-2.6-tip/arch/powerpc/kernel/exceptions-64s.S 2009-07-01 08:21:50.000000000 +1000
@@ -185,12 +185,15 @@
* prolog code of the PerformanceMonitor one. A little
* trickery is thus necessary
*/
+performance_monitor_pSeries_1:
. = 0xf00
b performance_monitor_pSeries
+altivec_unavailable_pSeries_1:
. = 0xf20
b altivec_unavailable_pSeries
+vsx_unavailable_pSeries_1:
. = 0xf40
b vsx_unavailable_pSeries
--
^ permalink raw reply [flat|nested] 21+ messages in thread* Re: [patch 7/8] powerpc: Cleanup PCL output by hiding and adding symbols
2009-06-30 23:00 ` [patch 7/8] powerpc: Cleanup PCL output by hiding and adding symbols Anton Blanchard
@ 2009-06-30 23:22 ` Ingo Molnar
0 siblings, 0 replies; 21+ messages in thread
From: Ingo Molnar @ 2009-06-30 23:22 UTC (permalink / raw)
To: Anton Blanchard, Benjamin Herrenschmidt
Cc: a.p.zijlstra, paulus, linux-kernel
* Anton Blanchard <anton@samba.org> wrote:
> A lot of hits in "setup" doesn't make much sense, so hide this symbol and
> allow all the hits to end up in copy_4k_page.
>
> Also add some dummy symbols for the branches at 0xf00, 0xf20 and 0xf40,
> otherwise hits end up in trap_0e which is confusing.
>
> Signed-off-by: Anton Blanchard <anton@samba.org>
looks good (we have similar fixes for x86 too), but i think this one
should go via BenH (Cc:-ed) as it affects generic PowerPC code.
Ingo
^ permalink raw reply [flat|nested] 21+ messages in thread
* [patch 8/8] powerpc: Fix PCL vdso detection
2009-06-30 23:00 [patch 0/8] Various PCL fixes Anton Blanchard
` (6 preceding siblings ...)
2009-06-30 23:00 ` [patch 7/8] powerpc: Cleanup PCL output by hiding and adding symbols Anton Blanchard
@ 2009-06-30 23:00 ` Anton Blanchard
2009-06-30 23:23 ` Ingo Molnar
7 siblings, 1 reply; 21+ messages in thread
From: Anton Blanchard @ 2009-06-30 23:00 UTC (permalink / raw)
To: a.p.zijlstra, paulus, mingo; +Cc: linux-kernel
[-- Attachment #1: pcl_fix_powerpc_vdso_detection.patch --]
[-- Type: text/plain, Size: 1336 bytes --]
PCL uses arch_vma_name() to detect a vdso region which in turn uses
current->mm->context.vdso_base. We need to initialise this before doing
the mmap or else we fail to detect the vdso.
Signed-off-by: Anton Blanchard <anton@samba.org>
---
Index: linux-2.6-tip/arch/powerpc/kernel/vdso.c
===================================================================
--- linux-2.6-tip.orig/arch/powerpc/kernel/vdso.c 2009-06-30 09:57:23.000000000 +1000
+++ linux-2.6-tip/arch/powerpc/kernel/vdso.c 2009-06-30 09:58:37.000000000 +1000
@@ -235,6 +235,13 @@
}
/*
+ * Put vDSO base into mm struct. We need to do this before calling
+ * install_special_mapping or the perf counter mmap tracking code
+ * will fail to recognise it as a vDSO (since arch_vma_name fails).
+ */
+ current->mm->context.vdso_base = vdso_base;
+
+ /*
* our vma flags don't have VM_WRITE so by default, the process isn't
* allowed to write those pages.
* gdb can break that with ptrace interface, and thus trigger COW on
@@ -254,11 +261,10 @@
VM_MAYREAD|VM_MAYWRITE|VM_MAYEXEC|
VM_ALWAYSDUMP,
vdso_pagelist);
- if (rc)
+ if (rc) {
+ current->mm->context.vdso_base = 0;
goto fail_mmapsem;
-
- /* Put vDSO base into mm struct */
- current->mm->context.vdso_base = vdso_base;
+ }
up_write(&mm->mmap_sem);
return 0;
--
^ permalink raw reply [flat|nested] 21+ messages in thread