From: Arnaldo Carvalho de Melo <acme@infradead.org>
To: Ingo Molnar <mingo@elte.hu>
Cc: linux-kernel@vger.kernel.org, Anton Blanchard <anton@samba.org>,
Eric B Munson <emunson@mgebm.net>, Ingo Molnar <mingo@elte.hu>,
Paul Mackerras <paulus@samba.org>,
Peter Zijlstra <a.p.zijlstra@chello.nl>,
Arnaldo Carvalho de Melo <acme@redhat.com>
Subject: [PATCH 4/6] perf symbols: Preserve symbol scope when parsing /proc/kallsyms
Date: Fri, 26 Aug 2011 12:37:09 -0300 [thread overview]
Message-ID: <1314373031-6687-5-git-send-email-acme@infradead.org> (raw)
In-Reply-To: <1314373031-6687-1-git-send-email-acme@infradead.org>
From: Anton Blanchard <anton@samba.org>
kallsyms__parse capitalises the symbol type, so every symbol is marked
global. Remove this and fix symbol_type__is_a to handle both local and
global symbols.
Cc: Eric B Munson <emunson@mgebm.net>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/20110824065243.077125989@samba.org
Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/perf/util/symbol.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/tools/perf/util/symbol.c b/tools/perf/util/symbol.c
index f119e85..0d94ddb 100644
--- a/tools/perf/util/symbol.c
+++ b/tools/perf/util/symbol.c
@@ -74,11 +74,13 @@ static void dso__set_sorted_by_name(struct dso *dso, enum map_type type)
bool symbol_type__is_a(char symbol_type, enum map_type map_type)
{
+ symbol_type = toupper(symbol_type);
+
switch (map_type) {
case MAP__FUNCTION:
return symbol_type == 'T' || symbol_type == 'W';
case MAP__VARIABLE:
- return symbol_type == 'D' || symbol_type == 'd';
+ return symbol_type == 'D';
default:
return false;
}
@@ -463,7 +465,7 @@ int kallsyms__parse(const char *filename, void *arg,
if (len + 2 >= line_len)
continue;
- symbol_type = toupper(line[len]);
+ symbol_type = line[len];
len += 2;
symbol_name = line + len;
len = line_len - len;
--
1.6.2.5
next prev parent reply other threads:[~2011-08-26 15:37 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-26 15:37 [GIT PULL 0/6] perf/urgent fixes Arnaldo Carvalho de Melo
2011-08-26 15:37 ` [PATCH 1/6] perf probe: Fix regression of variable finder Arnaldo Carvalho de Melo
2011-08-26 15:37 ` [PATCH 2/6] perf symbols: Fix ppc64 SEGV in dso__load_sym with debuginfo files Arnaldo Carvalho de Melo
2011-08-26 15:37 ` [PATCH 3/6] perf symbols: /proc/kallsyms does not sort module symbols Arnaldo Carvalho de Melo
2011-08-26 15:37 ` Arnaldo Carvalho de Melo [this message]
2011-08-26 15:37 ` [PATCH 5/6] perf symbols: Add some heuristics for choosing the best duplicate symbol Arnaldo Carvalho de Melo
2011-08-26 15:37 ` [PATCH 6/6] perf record: Create events initially disabled and enable after init Arnaldo Carvalho de Melo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1314373031-6687-5-git-send-email-acme@infradead.org \
--to=acme@infradead.org \
--cc=a.p.zijlstra@chello.nl \
--cc=acme@redhat.com \
--cc=anton@samba.org \
--cc=emunson@mgebm.net \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=paulus@samba.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).