[PATCH] riscv: enable kcov
Tobias Klauser
tklauser at distanz.ch
Fri Jun 26 08:02:35 EDT 2020
On 2020-06-25 at 20:45:55 +0200, Dmitry Vyukov <dvyukov at google.com> wrote:
> On Thu, Jun 25, 2020 at 8:39 PM Tobias Klauser <tklauser at distanz.ch> wrote:
> >
> > Add ARCH_HAS_KCOV and HAVE_GCC_PLUGINS to the riscv Kconfig.
> > Also disable instrumentation of vdso.
> >
> > Cc: Björn Töpel <bjorn.topel at gmail.com>
> > Cc: Dmitry Vyukov <dvyukov at google.com>
> > Signed-off-by: Tobias Klauser <tklauser at distanz.ch>
>
>
> If it boots:
>
> Acked-by: Dmitry Vyukov <dvyukov at google.com>
Yeah turns out I boot-tested this with a kernel which didn't have
CONFIG_KCOV enabled :-/ Will send a v2 patch.
> FWIW for x86 we needed to do much more of this:
>
> $ find arch/x86/ -name Makefile -exec grep KCOV_INSTRUMENT {} \; -print
> KCOV_INSTRUMENT := n
> arch/x86/kernel/Makefile
> KCOV_INSTRUMENT := n
> arch/x86/kernel/apic/Makefile
> KCOV_INSTRUMENT_common.o := n
> KCOV_INSTRUMENT_perf_event.o := n
> arch/x86/kernel/cpu/Makefile
> KCOV_INSTRUMENT := n
> arch/x86/realmode/rm/Makefile
> KCOV_INSTRUMENT := n
> arch/x86/boot/Makefile
> KCOV_INSTRUMENT := n
> arch/x86/boot/compressed/Makefile
> KCOV_INSTRUMENT := n
> arch/x86/entry/Makefile
> KCOV_INSTRUMENT := n
> arch/x86/entry/vdso/Makefile
> KCOV_INSTRUMENT := n
> arch/x86/um/vdso/Makefile
> KCOV_INSTRUMENT_delay.o := n
> KCOV_INSTRUMENT_cmdline.o := n
> arch/x86/lib/Makefile
> KCOV_INSTRUMENT_tlb.o := n
> KCOV_INSTRUMENT_mem_encrypt.o := n
> KCOV_INSTRUMENT_mem_encrypt_identity.o := n
> arch/x86/mm/Makefile
> KCOV_INSTRUMENT := n
> arch/x86/purgatory/Makefile
Thanks, that's very helpful.
More information about the linux-riscv
mailing list