diff options
author | AKASHI Takahiro <takahiro.akashi@linaro.org> | 2014-04-30 05:54:32 -0400 |
---|---|---|
committer | Will Deacon <will.deacon@arm.com> | 2014-05-29 04:04:31 -0400 |
commit | af64d2aa872a174772ffc00e2558083f70193acb (patch) | |
tree | 28f7400e62fa0e764cb12761d103362480dcd6ed /arch | |
parent | 26e2ae39995469b9289aa1ec0144e256d56eb044 (diff) |
ftrace: Add arm64 support to recordmcount
Recordmcount utility under scripts is run, after compiling each object,
to find out all the locations of calling _mcount() and put them into
specific seciton named __mcount_loc.
Then linker collects all such information into a table in the kernel image
(between __start_mcount_loc and __stop_mcount_loc) for later use by ftrace.
This patch adds arm64 specific definitions to identify such locations.
There are two types of implementation, C and Perl. On arm64, only C version
is used to build the kernel now that CONFIG_HAVE_C_RECORDMCOUNT is on.
But Perl version is also maintained.
This patch also contains a workaround just in case where a header file,
elf.h, on host machine doesn't have definitions of EM_AARCH64 nor
R_AARCH64_ABS64. Without them, compiling C version of recordmcount will
fail.
Acked-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm64/Kconfig | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig index 78b356d079dd..c7022a9d5eeb 100644 --- a/arch/arm64/Kconfig +++ b/arch/arm64/Kconfig | |||
@@ -30,12 +30,14 @@ config ARM64 | |||
30 | select HAVE_ARCH_JUMP_LABEL | 30 | select HAVE_ARCH_JUMP_LABEL |
31 | select HAVE_ARCH_KGDB | 31 | select HAVE_ARCH_KGDB |
32 | select HAVE_ARCH_TRACEHOOK | 32 | select HAVE_ARCH_TRACEHOOK |
33 | select HAVE_C_RECORDMCOUNT | ||
33 | select HAVE_DEBUG_BUGVERBOSE | 34 | select HAVE_DEBUG_BUGVERBOSE |
34 | select HAVE_DEBUG_KMEMLEAK | 35 | select HAVE_DEBUG_KMEMLEAK |
35 | select HAVE_DMA_API_DEBUG | 36 | select HAVE_DMA_API_DEBUG |
36 | select HAVE_DMA_ATTRS | 37 | select HAVE_DMA_ATTRS |
37 | select HAVE_DMA_CONTIGUOUS | 38 | select HAVE_DMA_CONTIGUOUS |
38 | select HAVE_EFFICIENT_UNALIGNED_ACCESS | 39 | select HAVE_EFFICIENT_UNALIGNED_ACCESS |
40 | select HAVE_FTRACE_MCOUNT_RECORD | ||
39 | select HAVE_GENERIC_DMA_COHERENT | 41 | select HAVE_GENERIC_DMA_COHERENT |
40 | select HAVE_HW_BREAKPOINT if PERF_EVENTS | 42 | select HAVE_HW_BREAKPOINT if PERF_EVENTS |
41 | select HAVE_MEMBLOCK | 43 | select HAVE_MEMBLOCK |