mbox series

[0/2] um: kunit: Add Clang support for CONFIG_GCOV

Message ID 20231020092159.2486063-1-michal.winiarski@intel.com (mailing list archive)
Headers show
Series um: kunit: Add Clang support for CONFIG_GCOV | expand

Message

Michał Winiarski Oct. 20, 2023, 9:21 a.m. UTC
Clang uses a different set of CLI args for coverage, and the output
needs to be processed by a different set of tools.
Update the Makefile and add an example of usage in kunit docs.

Michał Winiarski (2):
  arch: um: Add Clang coverage support
  Documentation: kunit: Add clang UML coverage example

 Documentation/dev-tools/kunit/running_tips.rst | 11 +++++++++++
 arch/um/Makefile-skas                          |  5 +++++
 2 files changed, 16 insertions(+)

Comments

Arthur Grillo Oct. 23, 2023, 2:58 p.m. UTC | #1
On 20/10/23 06:21, Michał Winiarski wrote:
> Clang uses a different set of CLI args for coverage, and the output
> needs to be processed by a different set of tools.
> Update the Makefile and add an example of usage in kunit docs.

Great change! It's great not to rely on older versions of GCC for
that.

I was able to generate coverage reports, but I have a few of things to
note:

When I ran the kunit.py it generated this warning several times:

WARNING: modpost: vmlinux (__llvm_covfun): unexpected non-allocatable section.
Did you forget to use "ax"/"aw" in a .S file?
Note that for example <linux/init.h> contains
section definitions for use in .S files.

Maybe it would be great to know why this is happening.

Also, the linker consumed a lot of RAM to build the kernel with those
additional flags, but maybe this is expected :P.

Best Regards,
~Arthur Grillo

> 
> Michał Winiarski (2):
>   arch: um: Add Clang coverage support
>   Documentation: kunit: Add clang UML coverage example
> 
>  Documentation/dev-tools/kunit/running_tips.rst | 11 +++++++++++
>  arch/um/Makefile-skas                          |  5 +++++
>  2 files changed, 16 insertions(+)
>