* [PATCH 06/21] perf symbols: Ignore mapping symbols on aarch64
2015-02-11 21:08 [GIT PULL 00/21] perf/core improvements and fixes Arnaldo Carvalho de Melo
@ 2015-02-11 21:09 ` Arnaldo Carvalho de Melo
2015-02-11 21:09 ` [PATCH 07/21] perf symbols: debuglink should take symfs option into account Arnaldo Carvalho de Melo
2015-03-05 4:30 ` [GIT PULL 00/21] perf/core improvements and fixes Victor Kamensky
2 siblings, 0 replies; 6+ messages in thread
From: Arnaldo Carvalho de Melo @ 2015-02-11 21:09 UTC (permalink / raw)
To: linux-arm-kernel
From: Victor Kamensky <victor.kamensky@linaro.org>
Aarch64 ELF files use mapping symbols with special names $x, $d
to identify regions of Aarch64 code (see Aarch64 ELF ABI - "ARM
IHI 0056B", section "4.5.4 Mapping symbols").
The patch filters out these symbols at load time, similar to
"696b97a perf symbols: Ignore mapping symbols on ARM" changes
done for ARM before V8.
Also added handling of mapping symbols that has format
"$d.<any>" and similar for both cases.
Note we are not making difference between EM_ARM and
EM_AARCH64 mapping symbols instead code handles superset
of both.
Signed-off-by: Victor Kamensky <victor.kamensky@linaro.org>
Acked-by: Namhyung Kim <namhyung@kernel.org>
Acked-by: Will Deacon <will.deacon@arm.com>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Anton Blanchard <anton@samba.org>
Cc: Avi Kivity <avi@cloudius-systems.com>
Cc: Dave Martin <Dave.Martin@arm.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: linux-arm-kernel at lists.infradead.org
Cc: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Russell King <linux@arm.linux.org.uk>
Link: http://lkml.kernel.org/r/1422340442-4673-2-git-send-email-victor.kamensky at linaro.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/perf/util/symbol-elf.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/tools/perf/util/symbol-elf.c b/tools/perf/util/symbol-elf.c
index b24f9d8727a8..225eb73ee78b 100644
--- a/tools/perf/util/symbol-elf.c
+++ b/tools/perf/util/symbol-elf.c
@@ -859,10 +859,9 @@ int dso__load_sym(struct dso *dso, struct map *map,
/* Reject ARM ELF "mapping symbols": these aren't unique and
* don't identify functions, so will confuse the profile
* output: */
- if (ehdr.e_machine == EM_ARM) {
- if (!strcmp(elf_name, "$a") ||
- !strcmp(elf_name, "$d") ||
- !strcmp(elf_name, "$t"))
+ if (ehdr.e_machine == EM_ARM || ehdr.e_machine == EM_AARCH64) {
+ if (elf_name[0] == '$' && strchr("adtx", elf_name[1])
+ && (elf_name[2] == '\0' || elf_name[2] == '.'))
continue;
}
--
1.9.3
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 07/21] perf symbols: debuglink should take symfs option into account
2015-02-11 21:08 [GIT PULL 00/21] perf/core improvements and fixes Arnaldo Carvalho de Melo
2015-02-11 21:09 ` [PATCH 06/21] perf symbols: Ignore mapping symbols on aarch64 Arnaldo Carvalho de Melo
@ 2015-02-11 21:09 ` Arnaldo Carvalho de Melo
2015-03-05 4:30 ` [GIT PULL 00/21] perf/core improvements and fixes Victor Kamensky
2 siblings, 0 replies; 6+ messages in thread
From: Arnaldo Carvalho de Melo @ 2015-02-11 21:09 UTC (permalink / raw)
To: linux-arm-kernel
From: Victor Kamensky <victor.kamensky@linaro.org>
Currently code that tries to read corresponding debug symbol file from
.gnu_debuglink section (DSO_BINARY_TYPE__DEBUGLINK) does not take in
account symfs option, so filename__read_debuglink function cannot open
ELF file, if symfs option is used.
Fix is to add proper handling of symfs as it is done in other places:
use __symbol__join_symfs function to get real file name of target ELF
file.
Signed-off-by: Victor Kamensky <victor.kamensky@linaro.org>
Tested-by: David Ahern <dsahern@gmail.com>
Acked-by: David Ahern <dsahern@gmail.com>
Acked-by: Namhyung Kim <namhyung@kernel.org>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Anton Blanchard <anton@samba.org>
Cc: Avi Kivity <avi@cloudius-systems.com>
Cc: Dave Martin <Dave.Martin@arm.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Russell King <linux@arm.linux.org.uk>
Cc: Waiman Long <Waiman.Long@hp.com>
Cc: Will Deacon <will.deacon@arm.com>
Cc: linux-arm-kernel at lists.infradead.org
Link: http://lkml.kernel.org/r/1422340442-4673-3-git-send-email-victor.kamensky at linaro.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/perf/util/dso.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/tools/perf/util/dso.c b/tools/perf/util/dso.c
index a8b3f18db1a5..814554d1b857 100644
--- a/tools/perf/util/dso.c
+++ b/tools/perf/util/dso.c
@@ -45,13 +45,13 @@ int dso__read_binary_type_filename(const struct dso *dso,
case DSO_BINARY_TYPE__DEBUGLINK: {
char *debuglink;
- strncpy(filename, dso->long_name, size);
- debuglink = filename + dso->long_name_len;
+ len = __symbol__join_symfs(filename, size, dso->long_name);
+ debuglink = filename + len;
while (debuglink != filename && *debuglink != '/')
debuglink--;
if (*debuglink == '/')
debuglink++;
- ret = filename__read_debuglink(dso->long_name, debuglink,
+ ret = filename__read_debuglink(filename, debuglink,
size - (debuglink - filename));
}
break;
--
1.9.3
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [GIT PULL 00/21] perf/core improvements and fixes
2015-02-11 21:08 [GIT PULL 00/21] perf/core improvements and fixes Arnaldo Carvalho de Melo
2015-02-11 21:09 ` [PATCH 06/21] perf symbols: Ignore mapping symbols on aarch64 Arnaldo Carvalho de Melo
2015-02-11 21:09 ` [PATCH 07/21] perf symbols: debuglink should take symfs option into account Arnaldo Carvalho de Melo
@ 2015-03-05 4:30 ` Victor Kamensky
2015-03-05 6:37 ` Ingo Molnar
2 siblings, 1 reply; 6+ messages in thread
From: Victor Kamensky @ 2015-03-05 4:30 UTC (permalink / raw)
To: linux-arm-kernel
Hi Arnaldo, Ingo,
What happened with this pull request? I already
see in v4.0-rc2 changes additions to one requested
by this pull request, but I don't see this series itself.
For example e370a3d57664cd5e39c0b95d157ebc841b568409
"perf symbols: Define EM_AARCH64 for older OSes" by David
is already in v4.0-rc2 and it is supposed to be addition to
"perf symbols: Ignore mapping symbols on aarch64" that is part
of this pull request but it did not make into v4.0-rcX yet. Looks
quite strange.
Thanks,
Victor
On 11 February 2015 at 13:08, Arnaldo Carvalho de Melo <acme@kernel.org> wrote:
> Hi Ingo,
>
> Please consider pulling,
>
> - Arnaldo
>
> The following changes since commit 2fde4f94e0a9531251e706fa57131b51b0df042e:
>
> perf: Decouple unthrottling and rotating (2015-02-04 08:07:16 +0100)
>
> are available in the git repository at:
>
> git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux.git tags/perf-core-for-mingo
>
> for you to fetch changes up to 39f5704399042fff5f0d5f6af32bbbc3e787a897:
>
> perf tools: Define _GNU_SOURCE on pthread_attr_setaffinity_np feature check (2015-02-11 17:38:55 -0300)
>
> ----------------------------------------------------------------
> perf/core improvement and fixes:
>
> User visible:
>
> - No need to explicitely enable evsels for workload started from perf, let it
> be enabled via perf_event_attr.enable_on_exec, removing some events that take
> place in the 'perf trace' before a workload is really started by it.
> (Arnaldo Carvalho de Melo)
>
> - Fix to handle optimized not-inlined functions in 'perf probe' (Masami Hiramatsu)
>
> - Update 'perf probe' man page (Masami Hiramatsu)
>
> Infrastructure:
>
> Arnaldo Carvalho de Melo (4):
> - Introduce {trace_seq_do,event_format_}_fprintf functions to allow
> a default tracepoint field list printer to be used in tools that allows
> redirecting output to a file. (Arnaldo Carvalho de Melo)
>
> - The man page for pthread_attr_set_affinity_np states that _GNU_SOURCE
> must be defined before pthread.h, do it to fix the build in some
> systems (Josh Boyer)
>
> - Cleanups in 'perf buildid-cache' (Masami Hiramatsu)
>
> - Fix dso cache test case (Namhyung Kim)
>
> - Do Not rely on dso__data_read_offset() to open DSO (Namhyung Kim)
>
> - Make perf aware of tracefs (Steven Rostedt).
>
> - Fix build by defining STT_GNU_IFUNC for glibc 2.9 and older (Vinson Lee)
>
> - AArch64 symbol resolution fixes (Victor Kamensky)
>
> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
>
> ----------------------------------------------------------------
> Arnaldo Carvalho de Melo (4):
> tools lib traceevent: Introduce trace_seq_do_fprintf function
> perf tools: Introduce event_format__fprintf method
> perf trace: No need to enable evsels for workload started from perf
> perf evlist: Fix typo in comment
>
> Josh Boyer (1):
> perf tools: Define _GNU_SOURCE on pthread_attr_setaffinity_np feature check
>
> Masami Hiramatsu (4):
> perf probe: Fix to handle optimized not-inlined functions
> perf probe: Update man page
> perf buildid-cache: Remove unneeded debugdir parameters
> perf buildid-cache: Consolidate .build-id cache path generators
>
> Namhyung Kim (3):
> perf test: Fix dso cache testcase
> perf tests: Do not rely on dso__data_read_offset() to open dso
> perf tools: Fix a dso open fail message
>
> Steven Rostedt (Red Hat) (6):
> perf tools: Do not check debugfs MAGIC for tracing files
> tools lib fs: Add helper to find mounted file systems
> tools lib api fs: Add tracefs mount helper functions
> tools lib api debugfs: Add DEBUGFS_DEFAULT_PATH macro
> tools lib api fs: Add {tracefs,debugfs}_configured() functions
> perf tools: Make perf aware of tracefs
>
> Victor Kamensky (2):
> perf symbols: Ignore mapping symbols on aarch64
> perf symbols: debuglink should take symfs option into account
>
> Vinson Lee (1):
> perf symbols: Define STT_GNU_IFUNC for glibc 2.9 and older.
>
> tools/lib/api/Makefile | 4 ++
> tools/lib/api/fs/debugfs.c | 69 +++++++---------------
> tools/lib/api/fs/debugfs.h | 13 +----
> tools/lib/api/fs/findfs.c | 63 ++++++++++++++++++++
> tools/lib/api/fs/findfs.h | 23 ++++++++
> tools/lib/api/fs/tracefs.c | 78 +++++++++++++++++++++++++
> tools/lib/api/fs/tracefs.h | 21 +++++++
> tools/lib/traceevent/event-parse.h | 2 +
> tools/lib/traceevent/trace-seq.c | 13 +++--
> tools/perf/Documentation/perf-probe.txt | 16 +++++-
> tools/perf/builtin-buildid-cache.c | 37 ++++++------
> tools/perf/builtin-trace.c | 4 +-
> tools/perf/config/feature-checks/Makefile | 2 +-
> tools/perf/tests/dso-data.c | 22 ++++---
> tools/perf/tests/open-syscall-all-cpus.c | 7 ++-
> tools/perf/tests/open-syscall.c | 7 ++-
> tools/perf/tests/parse-events.c | 13 ++++-
> tools/perf/util/build-id.c | 96 +++++++++++++++++++------------
> tools/perf/util/build-id.h | 4 +-
> tools/perf/util/cache.h | 1 +
> tools/perf/util/dso.c | 8 +--
> tools/perf/util/dwarf-aux.c | 15 +++++
> tools/perf/util/dwarf-aux.h | 3 +
> tools/perf/util/evlist.c | 3 +-
> tools/perf/util/parse-events.c | 19 ------
> tools/perf/util/parse-events.h | 2 +-
> tools/perf/util/probe-event.c | 24 +++++---
> tools/perf/util/probe-finder.c | 12 ++--
> tools/perf/util/symbol-elf.c | 11 ++--
> tools/perf/util/trace-event-parse.c | 12 +++-
> tools/perf/util/trace-event.h | 3 +
> tools/perf/util/util.c | 60 +++++++++++++++----
> tools/perf/util/util.h | 1 +
> 33 files changed, 468 insertions(+), 200 deletions(-)
> create mode 100644 tools/lib/api/fs/findfs.c
> create mode 100644 tools/lib/api/fs/findfs.h
> create mode 100644 tools/lib/api/fs/tracefs.c
> create mode 100644 tools/lib/api/fs/tracefs.h
^ permalink raw reply [flat|nested] 6+ messages in thread
* [GIT PULL 00/21] perf/core improvements and fixes
2015-03-05 4:30 ` [GIT PULL 00/21] perf/core improvements and fixes Victor Kamensky
@ 2015-03-05 6:37 ` Ingo Molnar
2015-03-05 6:49 ` Victor Kamensky
0 siblings, 1 reply; 6+ messages in thread
From: Ingo Molnar @ 2015-03-05 6:37 UTC (permalink / raw)
To: linux-arm-kernel
* Victor Kamensky <victor.kamensky@linaro.org> wrote:
> Hi Arnaldo, Ingo,
>
> What happened with this pull request? [...]
This pull request was for v4.1, and I merged it in:
commit 8a26ce4e544659256349551283414df504889a59
Merge: acba3c7e4652 726f3234dd12
Author: Ingo Molnar <mingo@kernel.org>
Date: Wed Feb 18 19:14:54 2015 +0100
Merge tag 'perf-core-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core
Pull perf/core improvements and fixes from Arnaldo Carvalho de Melo:
User visible changes:
> [...] I already see in v4.0-rc2 changes additions to one requested
> by this pull request, but I don't see this series itself.
>
> For example e370a3d57664cd5e39c0b95d157ebc841b568409
> "perf symbols: Define EM_AARCH64 for older OSes" by David
> is already in v4.0-rc2 and it is supposed to be addition to
> "perf symbols: Ignore mapping symbols on aarch64" that is part
> of this pull request but it did not make into v4.0-rcX yet. Looks
> quite strange.
If some commits of the v4.1 queue are needed in v4.0 as well then they
should be cherry-picked back into the urgent queue.
But maybe e370a3d57 was merged prematurely - in that case it appears
to be harmless and v4.1 will sort it out.
Arnaldo?
Thanks,
Ingo
^ permalink raw reply [flat|nested] 6+ messages in thread
* [GIT PULL 00/21] perf/core improvements and fixes
2015-03-05 6:37 ` Ingo Molnar
@ 2015-03-05 6:49 ` Victor Kamensky
0 siblings, 0 replies; 6+ messages in thread
From: Victor Kamensky @ 2015-03-05 6:49 UTC (permalink / raw)
To: linux-arm-kernel
On 4 March 2015 at 22:37, Ingo Molnar <mingo@kernel.org> wrote:
>
> * Victor Kamensky <victor.kamensky@linaro.org> wrote:
>
>> Hi Arnaldo, Ingo,
>>
>> What happened with this pull request? [...]
>
> This pull request was for v4.1, and I merged it in:
Ok, I got it. Sorry I missed that before.
> commit 8a26ce4e544659256349551283414df504889a59
> Merge: acba3c7e4652 726f3234dd12
> Author: Ingo Molnar <mingo@kernel.org>
> Date: Wed Feb 18 19:14:54 2015 +0100
>
> Merge tag 'perf-core-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core
>
> Pull perf/core improvements and fixes from Arnaldo Carvalho de Melo:
>
> User visible changes:
>
>> [...] I already see in v4.0-rc2 changes additions to one requested
>> by this pull request, but I don't see this series itself.
>>
>> For example e370a3d57664cd5e39c0b95d157ebc841b568409
>> "perf symbols: Define EM_AARCH64 for older OSes" by David
>> is already in v4.0-rc2 and it is supposed to be addition to
>> "perf symbols: Ignore mapping symbols on aarch64" that is part
>> of this pull request but it did not make into v4.0-rcX yet. Looks
>> quite strange.
>
> If some commits of the v4.1 queue are needed in v4.0 as well then they
> should be cherry-picked back into the urgent queue.
>
> But maybe e370a3d57 was merged prematurely - in that case it appears
> to be harmless and v4.1 will sort it out.
Yes, this merge is harmless. Indeed it should be OK with v4.1.
Thanks for explanation.
- Victor
> Arnaldo?
>
> Thanks,
>
> Ingo
^ permalink raw reply [flat|nested] 6+ messages in thread