Filter out some ppc64 specific idle loop functions and remove leading '.' on
ppc64 text symbols.
Signed-off-by: Anton Blanchard <[email protected]>
---
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") ||
--
* Anton Blanchard <[email protected]> wrote:
> Filter out some ppc64 specific idle loop functions and remove leading '.' on
> ppc64 text symbols.
>
> Signed-off-by: Anton Blanchard <[email protected]>
> ---
>
> 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
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
Commit-ID: 3a3393ef75a14ae259a82f3f38624efa17884168
Gitweb: http://git.kernel.org/tip/3a3393ef75a14ae259a82f3f38624efa17884168
Author: Anton Blanchard <[email protected]>
AuthorDate: Wed, 1 Jul 2009 09:00:47 +1000
Committer: Ingo Molnar <[email protected]>
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 <[email protected]>
Cc: [email protected]
Cc: [email protected]
LKML-Reference: <[email protected]>
Signed-off-by: Ingo Molnar <[email protected]>
---
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") ||