Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1660838 > unrolled thread
| Started by | Namhyung Kim <namhyung@kernel.org> |
|---|---|
| First post | 2017-06-08 09:40 +0200 |
| Last post | 2017-06-09 01:00 +0200 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
[PATCH v4 5/9] perf tools: Decompress kernel module when reading DSO data Namhyung Kim <namhyung@kernel.org> - 2017-06-08 09:40 +0200
[tip:perf/urgent] perf tools: Decompress kernel module when reading DSO data tip-bot for Namhyung Kim <tipbot@zytor.com> - 2017-06-09 01:00 +0200
| From | Namhyung Kim <namhyung@kernel.org> |
|---|---|
| Date | 2017-06-08 09:40 +0200 |
| Subject | [PATCH v4 5/9] perf tools: Decompress kernel module when reading DSO data |
| Message-ID | <tQ0cV-1hd-5@gated-at.bofh.it> |
Currently perf decompresses kernel modules when loading symbol table but
it missed to do it when reading raw data.
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
---
tools/perf/util/dso.c | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/tools/perf/util/dso.c b/tools/perf/util/dso.c
index b346b8eba65c..c63525d845c5 100644
--- a/tools/perf/util/dso.c
+++ b/tools/perf/util/dso.c
@@ -475,7 +475,23 @@ static int __open_dso(struct dso *dso, struct machine *machine)
return -EINVAL;
}
+ if (dso__needs_decompress(dso)) {
+ char newpath[KMOD_DECOMP_LEN];
+ size_t len = sizeof(newpath);
+
+ if (dso__decompress_kmodule_path(dso, name, newpath, len) < 0) {
+ free(name);
+ return -dso->load_errno;
+ }
+
+ strcpy(name, newpath);
+ }
+
fd = do_open(name);
+
+ if (dso__needs_decompress(dso))
+ unlink(name);
+
free(name);
return fd;
}
--
2.13.1
[toc] | [next] | [standalone]
| From | tip-bot for Namhyung Kim <tipbot@zytor.com> |
|---|---|
| Date | 2017-06-09 01:00 +0200 |
| Subject | [tip:perf/urgent] perf tools: Decompress kernel module when reading DSO data |
| Message-ID | <tQezf-1Qn-1@gated-at.bofh.it> |
| In reply to | #1660838 |
Commit-ID: 1d6b3c9ba756a5134fd7ad1959acac776d17404b
Gitweb: http://git.kernel.org/tip/1d6b3c9ba756a5134fd7ad1959acac776d17404b
Author: Namhyung Kim <namhyung@kernel.org>
AuthorDate: Thu, 8 Jun 2017 16:31:05 +0900
Committer: Arnaldo Carvalho de Melo <acme@redhat.com>
CommitDate: Thu, 8 Jun 2017 15:39:07 -0300
perf tools: Decompress kernel module when reading DSO data
Currently perf decompresses kernel modules when loading the symbol table
but it missed to do it when reading raw data.
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Acked-by: Jiri Olsa <jolsa@kernel.org>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Wang Nan <wangnan0@huawei.com>
Cc: kernel-team@lge.com
Link: http://lkml.kernel.org/r/20170608073109.30699-6-namhyung@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/perf/util/dso.c | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/tools/perf/util/dso.c b/tools/perf/util/dso.c
index b346b8e..c63525d 100644
--- a/tools/perf/util/dso.c
+++ b/tools/perf/util/dso.c
@@ -475,7 +475,23 @@ static int __open_dso(struct dso *dso, struct machine *machine)
return -EINVAL;
}
+ if (dso__needs_decompress(dso)) {
+ char newpath[KMOD_DECOMP_LEN];
+ size_t len = sizeof(newpath);
+
+ if (dso__decompress_kmodule_path(dso, name, newpath, len) < 0) {
+ free(name);
+ return -dso->load_errno;
+ }
+
+ strcpy(name, newpath);
+ }
+
fd = do_open(name);
+
+ if (dso__needs_decompress(dso))
+ unlink(name);
+
free(name);
return fd;
}
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web