riscv: gcov: enable gcov for RISC-V
authorZong Li <zong.li@sifive.com>
Thu, 2 Jan 2020 03:09:54 +0000 (11:09 +0800)
committerPaul Walmsley <paul.walmsley@sifive.com>
Fri, 3 Jan 2020 08:47:02 +0000 (00:47 -0800)
This patch enables GCOV code coverage measurement on RISC-V.
Lightly tested on QEMU and Hifive Unleashed board, seems to work as
expected.

Signed-off-by: Zong Li <zong.li@sifive.com>
Reviewed-by: Anup Patel <anup@brainfault.org>
Acked-by: Jonathan Corbet <corbet@lwn.net>
Signed-off-by: Paul Walmsley <paul.walmsley@sifive.com>
Documentation/features/debug/gcov-profile-all/arch-support.txt
arch/riscv/Kconfig

index 059d58a..6fb2b06 100644 (file)
@@ -23,7 +23,7 @@
     |    openrisc: | TODO |
     |      parisc: | TODO |
     |     powerpc: |  ok  |
-    |       riscv: | TODO |
+    |       riscv: |  ok  |
     |        s390: |  ok  |
     |          sh: |  ok  |
     |       sparc: | TODO |
index d8efbaa..a31169b 100644 (file)
@@ -64,6 +64,7 @@ config RISCV
        select SPARSEMEM_STATIC if 32BIT
        select ARCH_WANT_DEFAULT_TOPDOWN_MMAP_LAYOUT if MMU
        select HAVE_ARCH_MMAP_RND_BITS if MMU
+       select ARCH_HAS_GCOV_PROFILE_ALL
 
 config ARCH_MMAP_RND_BITS_MIN
        default 18 if 64BIT