* [PATCH 0/2] perf tools: Fix symbol and object code resolution for vdso32 and vdsox32
@ 2018-06-04 12:56 Adrian Hunter
2018-06-04 12:56 ` [PATCH 1/2] perf tests kmod-path: Add tests " Adrian Hunter
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Adrian Hunter @ 2018-06-04 12:56 UTC (permalink / raw)
To: Arnaldo Carvalho de Melo; +Cc: Jiri Olsa, Wang Nan, linux-kernel
Hi
Here are a couple of small fixes for tracing 32-bit binaries on a 64-bit
kernel.
Adrian Hunter (2):
perf tests kmod-path: Add tests for vdso32 and vdsox32
perf tools: Fix symbol and object code resolution for vdso32 and vdsox32
tools/perf/tests/kmod-path.c | 16 ++++++++++++++++
tools/perf/util/dso.c | 2 ++
2 files changed, 18 insertions(+)
Regards
Adrian
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 1/2] perf tests kmod-path: Add tests for vdso32 and vdsox32
2018-06-04 12:56 [PATCH 0/2] perf tools: Fix symbol and object code resolution for vdso32 and vdsox32 Adrian Hunter
@ 2018-06-04 12:56 ` Adrian Hunter
2018-06-07 8:17 ` [tip:perf/urgent] " tip-bot for Adrian Hunter
2018-06-04 12:56 ` [PATCH 2/2] perf tools: Fix symbol and object code resolution " Adrian Hunter
2018-06-04 13:44 ` [PATCH 0/2] " Arnaldo Carvalho de Melo
2 siblings, 1 reply; 6+ messages in thread
From: Adrian Hunter @ 2018-06-04 12:56 UTC (permalink / raw)
To: Arnaldo Carvalho de Melo; +Cc: Jiri Olsa, Wang Nan, linux-kernel
Add tests for vdso32 and vdsox32. This will cause the overall test to fail
because __kmod_path__parse() does not handle vdso32 or vdsox32.
Fixes: 1f121b03d058 ("perf tools: Deal with kernel module names in '[]' correctly")
Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
---
tools/perf/tests/kmod-path.c | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/tools/perf/tests/kmod-path.c b/tools/perf/tests/kmod-path.c
index 8e57d46109de..148dd31cc201 100644
--- a/tools/perf/tests/kmod-path.c
+++ b/tools/perf/tests/kmod-path.c
@@ -127,6 +127,22 @@ int test__kmod_path__parse(struct test *t __maybe_unused, int subtest __maybe_un
M("[vdso]", PERF_RECORD_MISC_KERNEL, false);
M("[vdso]", PERF_RECORD_MISC_USER, false);
+ T("[vdso32]", true , true , false, false, "[vdso32]", NULL);
+ T("[vdso32]", false , true , false, false, NULL , NULL);
+ T("[vdso32]", true , false , false, false, "[vdso32]", NULL);
+ T("[vdso32]", false , false , false, false, NULL , NULL);
+ M("[vdso32]", PERF_RECORD_MISC_CPUMODE_UNKNOWN, false);
+ M("[vdso32]", PERF_RECORD_MISC_KERNEL, false);
+ M("[vdso32]", PERF_RECORD_MISC_USER, false);
+
+ T("[vdsox32]", true , true , false, false, "[vdsox32]", NULL);
+ T("[vdsox32]", false , true , false, false, NULL , NULL);
+ T("[vdsox32]", true , false , false, false, "[vdsox32]", NULL);
+ T("[vdsox32]", false , false , false, false, NULL , NULL);
+ M("[vdsox32]", PERF_RECORD_MISC_CPUMODE_UNKNOWN, false);
+ M("[vdsox32]", PERF_RECORD_MISC_KERNEL, false);
+ M("[vdsox32]", PERF_RECORD_MISC_USER, false);
+
/* path alloc_name alloc_ext kmod comp name ext */
T("[vsyscall]", true , true , false, false, "[vsyscall]", NULL);
T("[vsyscall]", false , true , false, false, NULL , NULL);
--
1.9.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 2/2] perf tools: Fix symbol and object code resolution for vdso32 and vdsox32
2018-06-04 12:56 [PATCH 0/2] perf tools: Fix symbol and object code resolution for vdso32 and vdsox32 Adrian Hunter
2018-06-04 12:56 ` [PATCH 1/2] perf tests kmod-path: Add tests " Adrian Hunter
@ 2018-06-04 12:56 ` Adrian Hunter
2018-06-07 8:18 ` [tip:perf/urgent] " tip-bot for Adrian Hunter
2018-06-04 13:44 ` [PATCH 0/2] " Arnaldo Carvalho de Melo
2 siblings, 1 reply; 6+ messages in thread
From: Adrian Hunter @ 2018-06-04 12:56 UTC (permalink / raw)
To: Arnaldo Carvalho de Melo; +Cc: Jiri Olsa, Wang Nan, linux-kernel
Fix __kmod_path__parse() so that perf tools does not treat vdso32 and
vdsox32 as kernel modules and fail to find the object.
Fixes: 1f121b03d058 ("perf tools: Deal with kernel module names in '[]' correctly")
Cc: stable@vger.kernel.org
Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
---
tools/perf/util/dso.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/tools/perf/util/dso.c b/tools/perf/util/dso.c
index cdfc2e5f55f5..51cf82cf1882 100644
--- a/tools/perf/util/dso.c
+++ b/tools/perf/util/dso.c
@@ -354,6 +354,8 @@ int __kmod_path__parse(struct kmod_path *m, const char *path,
if ((strncmp(name, "[kernel.kallsyms]", 17) == 0) ||
(strncmp(name, "[guest.kernel.kallsyms", 22) == 0) ||
(strncmp(name, "[vdso]", 6) == 0) ||
+ (strncmp(name, "[vdso32]", 8) == 0) ||
+ (strncmp(name, "[vdsox32]", 9) == 0) ||
(strncmp(name, "[vsyscall]", 10) == 0)) {
m->kmod = false;
--
1.9.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH 0/2] perf tools: Fix symbol and object code resolution for vdso32 and vdsox32
2018-06-04 12:56 [PATCH 0/2] perf tools: Fix symbol and object code resolution for vdso32 and vdsox32 Adrian Hunter
2018-06-04 12:56 ` [PATCH 1/2] perf tests kmod-path: Add tests " Adrian Hunter
2018-06-04 12:56 ` [PATCH 2/2] perf tools: Fix symbol and object code resolution " Adrian Hunter
@ 2018-06-04 13:44 ` Arnaldo Carvalho de Melo
2 siblings, 0 replies; 6+ messages in thread
From: Arnaldo Carvalho de Melo @ 2018-06-04 13:44 UTC (permalink / raw)
To: Adrian Hunter; +Cc: Jiri Olsa, Wang Nan, linux-kernel
Em Mon, Jun 04, 2018 at 03:56:52PM +0300, Adrian Hunter escreveu:
> Hi
>
> Here are a couple of small fixes for tracing 32-bit binaries on a 64-bit
> kernel.
Thanks, applied both to both perf/urgent and perf/core.
- Arnaldo
>
> Adrian Hunter (2):
> perf tests kmod-path: Add tests for vdso32 and vdsox32
> perf tools: Fix symbol and object code resolution for vdso32 and vdsox32
>
> tools/perf/tests/kmod-path.c | 16 ++++++++++++++++
> tools/perf/util/dso.c | 2 ++
> 2 files changed, 18 insertions(+)
>
>
> Regards
> Adrian
^ permalink raw reply [flat|nested] 6+ messages in thread
* [tip:perf/urgent] perf tests kmod-path: Add tests for vdso32 and vdsox32
2018-06-04 12:56 ` [PATCH 1/2] perf tests kmod-path: Add tests " Adrian Hunter
@ 2018-06-07 8:17 ` tip-bot for Adrian Hunter
0 siblings, 0 replies; 6+ messages in thread
From: tip-bot for Adrian Hunter @ 2018-06-07 8:17 UTC (permalink / raw)
To: linux-tip-commits
Cc: linux-kernel, wangnan0, mingo, tglx, acme, hpa, adrian.hunter, jolsa
Commit-ID: dcaeae4e2c266452e04dc3d83b10469be9fe419e
Gitweb: https://git.kernel.org/tip/dcaeae4e2c266452e04dc3d83b10469be9fe419e
Author: Adrian Hunter <adrian.hunter@intel.com>
AuthorDate: Mon, 4 Jun 2018 15:56:53 +0300
Committer: Arnaldo Carvalho de Melo <acme@redhat.com>
CommitDate: Wed, 6 Jun 2018 12:52:03 -0300
perf tests kmod-path: Add tests for vdso32 and vdsox32
Add tests for vdso32 and vdsox32. This will cause the overall test to
fail because __kmod_path__parse() does not handle vdso32 or vdsox32.
Fixes: 1f121b03d058 ("perf tools: Deal with kernel module names in '[]' correctly")
Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Wang Nan <wangnan0@huawei.com>
Link: http://lkml.kernel.org/r/1528117014-30032-2-git-send-email-adrian.hunter@intel.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/perf/tests/kmod-path.c | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/tools/perf/tests/kmod-path.c b/tools/perf/tests/kmod-path.c
index 8e57d46109de..148dd31cc201 100644
--- a/tools/perf/tests/kmod-path.c
+++ b/tools/perf/tests/kmod-path.c
@@ -127,6 +127,22 @@ int test__kmod_path__parse(struct test *t __maybe_unused, int subtest __maybe_un
M("[vdso]", PERF_RECORD_MISC_KERNEL, false);
M("[vdso]", PERF_RECORD_MISC_USER, false);
+ T("[vdso32]", true , true , false, false, "[vdso32]", NULL);
+ T("[vdso32]", false , true , false, false, NULL , NULL);
+ T("[vdso32]", true , false , false, false, "[vdso32]", NULL);
+ T("[vdso32]", false , false , false, false, NULL , NULL);
+ M("[vdso32]", PERF_RECORD_MISC_CPUMODE_UNKNOWN, false);
+ M("[vdso32]", PERF_RECORD_MISC_KERNEL, false);
+ M("[vdso32]", PERF_RECORD_MISC_USER, false);
+
+ T("[vdsox32]", true , true , false, false, "[vdsox32]", NULL);
+ T("[vdsox32]", false , true , false, false, NULL , NULL);
+ T("[vdsox32]", true , false , false, false, "[vdsox32]", NULL);
+ T("[vdsox32]", false , false , false, false, NULL , NULL);
+ M("[vdsox32]", PERF_RECORD_MISC_CPUMODE_UNKNOWN, false);
+ M("[vdsox32]", PERF_RECORD_MISC_KERNEL, false);
+ M("[vdsox32]", PERF_RECORD_MISC_USER, false);
+
/* path alloc_name alloc_ext kmod comp name ext */
T("[vsyscall]", true , true , false, false, "[vsyscall]", NULL);
T("[vsyscall]", false , true , false, false, NULL , NULL);
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [tip:perf/urgent] perf tools: Fix symbol and object code resolution for vdso32 and vdsox32
2018-06-04 12:56 ` [PATCH 2/2] perf tools: Fix symbol and object code resolution " Adrian Hunter
@ 2018-06-07 8:18 ` tip-bot for Adrian Hunter
0 siblings, 0 replies; 6+ messages in thread
From: tip-bot for Adrian Hunter @ 2018-06-07 8:18 UTC (permalink / raw)
To: linux-tip-commits
Cc: acme, linux-kernel, hpa, adrian.hunter, tglx, jolsa, mingo, wangnan0
Commit-ID: aef4feace285f27c8ed35830a5d575bec7f3e90a
Gitweb: https://git.kernel.org/tip/aef4feace285f27c8ed35830a5d575bec7f3e90a
Author: Adrian Hunter <adrian.hunter@intel.com>
AuthorDate: Mon, 4 Jun 2018 15:56:54 +0300
Committer: Arnaldo Carvalho de Melo <acme@redhat.com>
CommitDate: Wed, 6 Jun 2018 12:52:04 -0300
perf tools: Fix symbol and object code resolution for vdso32 and vdsox32
Fix __kmod_path__parse() so that perf tools does not treat vdso32 and
vdsox32 as kernel modules and fail to find the object.
Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Wang Nan <wangnan0@huawei.com>
Cc: stable@vger.kernel.org
Fixes: 1f121b03d058 ("perf tools: Deal with kernel module names in '[]' correctly")
Link: http://lkml.kernel.org/r/1528117014-30032-3-git-send-email-adrian.hunter@intel.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/perf/util/dso.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/tools/perf/util/dso.c b/tools/perf/util/dso.c
index cdfc2e5f55f5..51cf82cf1882 100644
--- a/tools/perf/util/dso.c
+++ b/tools/perf/util/dso.c
@@ -354,6 +354,8 @@ int __kmod_path__parse(struct kmod_path *m, const char *path,
if ((strncmp(name, "[kernel.kallsyms]", 17) == 0) ||
(strncmp(name, "[guest.kernel.kallsyms", 22) == 0) ||
(strncmp(name, "[vdso]", 6) == 0) ||
+ (strncmp(name, "[vdso32]", 8) == 0) ||
+ (strncmp(name, "[vdsox32]", 9) == 0) ||
(strncmp(name, "[vsyscall]", 10) == 0)) {
m->kmod = false;
^ permalink raw reply related [flat|nested] 6+ messages in thread
end of thread, other threads:[~2018-06-07 8:18 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-06-04 12:56 [PATCH 0/2] perf tools: Fix symbol and object code resolution for vdso32 and vdsox32 Adrian Hunter
2018-06-04 12:56 ` [PATCH 1/2] perf tests kmod-path: Add tests " Adrian Hunter
2018-06-07 8:17 ` [tip:perf/urgent] " tip-bot for Adrian Hunter
2018-06-04 12:56 ` [PATCH 2/2] perf tools: Fix symbol and object code resolution " Adrian Hunter
2018-06-07 8:18 ` [tip:perf/urgent] " tip-bot for Adrian Hunter
2018-06-04 13:44 ` [PATCH 0/2] " Arnaldo Carvalho de Melo
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.