From: Jiri Olsa <jolsa@kernel.org>
To: linux-kernel@vger.kernel.org
Cc: Jiri Olsa <jolsa@kernel.org>,
Corey Ashford <cjashfor@linux.vnet.ibm.com>,
David Ahern <dsahern@gmail.com>,
Frederic Weisbecker <fweisbec@gmail.com>,
Ingo Molnar <mingo@kernel.org>,
Namhyung Kim <namhyung@kernel.org>,
Paul Mackerras <paulus@samba.org>,
Peter Zijlstra <a.p.zijlstra@chello.nl>,
Arnaldo Carvalho de Melo <acme@redhat.com>
Subject: [PATCH 1/3] perf tools: Update symtab_type with _KMODULE_COMP
Date: Fri, 30 Jan 2015 11:22:24 +0100 [thread overview]
Message-ID: <1422613346-22077-2-git-send-email-jolsa@kernel.org> (raw)
In-Reply-To: <1422613346-22077-1-git-send-email-jolsa@kernel.org>
We are missing update of dso->symtab_type when we actualize
modules paths in map_groups__set_modules_path_dir.
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/perf/util/machine.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/tools/perf/util/machine.c b/tools/perf/util/machine.c
index 1bca3a9f2b16..e750f829e84e 100644
--- a/tools/perf/util/machine.c
+++ b/tools/perf/util/machine.c
@@ -869,14 +869,17 @@ static int map_groups__set_modules_path_dir(struct map_groups *mg,
dso_name[PATH_MAX];
struct map *map;
char *long_name;
+ bool compressed = false;
if (dot == NULL)
continue;
/* On some system, modules are compressed like .ko.gz */
if (is_supported_compression(dot + 1) &&
- is_kmodule_extension(dot - 2))
+ is_kmodule_extension(dot - 2)) {
dot -= 3;
+ compressed = true;
+ }
snprintf(dso_name, sizeof(dso_name), "[%.*s]",
(int)(dot - dent->d_name), dent->d_name);
@@ -894,6 +897,10 @@ static int map_groups__set_modules_path_dir(struct map_groups *mg,
}
dso__set_long_name(map->dso, long_name, true);
dso__kernel_module_get_build_id(map->dso, "");
+
+ /* _KMODULE_COMP should be next to _KMODULE */
+ if (compressed)
+ map->dso->symtab_type++;
}
}
--
1.9.3
next prev parent reply other threads:[~2015-01-30 10:22 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-30 10:22 [RFC 0/3] perf tools: Adding xz decompression support Jiri Olsa
2015-01-30 10:22 ` Jiri Olsa [this message]
2015-01-30 10:22 ` [PATCH 2/3] perf tools: Add feature check for lzma library Jiri Olsa
2015-01-30 10:22 ` [PATCH 3/3] perf tools: Add lzma decompression support for kernel module Jiri Olsa
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=1422613346-22077-2-git-send-email-jolsa@kernel.org \
--to=jolsa@kernel.org \
--cc=a.p.zijlstra@chello.nl \
--cc=acme@redhat.com \
--cc=cjashfor@linux.vnet.ibm.com \
--cc=dsahern@gmail.com \
--cc=fweisbec@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=namhyung@kernel.org \
--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
Powered by JetHome