linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* How to get the Linux kernel coverage data on ARM arch when I run LTP test?
@ 2014-02-14  9:02 Naresh Kamboju
  2014-02-14  9:43 ` [LTP] " Peter Oberparleiter
  0 siblings, 1 reply; 4+ messages in thread
From: Naresh Kamboju @ 2014-02-14  9:02 UTC (permalink / raw)
  To: linux-arm-kernel

Hi All,

Sorry for the wide distribution:

According to LTP page info,
http://ltp.sourceforge.net/coverage/gcov.php
http://ltp.sourceforge.net/coverage/lcov.php

My question is
How to get kernel coverage when I run LTP test?

Since we do not have direct GCOV support on ARM I have enabled ( just
for experiment)

$ git diff  kernel/gcov/Kconfig
diff --git a/kernel/gcov/Kconfig b/kernel/gcov/Kconfig
index d4da55d..fceac85 100644
--- a/kernel/gcov/Kconfig
+++ b/kernel/gcov/Kconfig
@@ -35,7 +35,7 @@ config GCOV_KERNEL
 config GCOV_PROFILE_ALL
        bool "Profile entire Kernel"
        depends on GCOV_KERNEL
-       depends on SUPERH || S390 || X86 || PPC || MICROBLAZE
+       depends on SUPERH || S390 || X86 || PPC || MICROBLAZE || ARM
        default n
        ---help---
        This options activates profiling for the entire kernel.

I have enabled below kernel config and built the kernel.
CONFIG_GCOV_KERNEL=y
CONFIG_GCOV_PROFILE_ALL=y
CONFIG_GCOV_FORMAT_AUTODETECT=y

of course I have disabled gcov on below folders and files, because
since it is an experiment i would like to be on safe side
- arch/arm/mm/
- arch/arm/kernel/
- arch/arm/boot/
- arch/arm/boot/compressed/
- arch/arm/boot/bootp/
- arch/arm/boot/dts

Arndale booted with this configuration successfully.
Took more than 65 seconds to finish boot.

gcov related files are found under /sys/ similer to X86 machine.
And  gcov supporting files filename.gcda are having links to kernel source
root at linaro-developer:~# ls /sys/kernel/debug/gcov/
reset  tmp
root at linaro-developer:~#

root at linaro-developer:~# ls /sys/kernel/debug/gcov/tmp/
linux-linaro-3.13-2014.01
root at linaro-developer:~# ls
/sys/kernel/debug/gcov/tmp/linux-linaro-3.13-2014.01/
arch  block  crypto  drivers  fs  init  ipc  kernel  lib  mm  security  virt
root at linaro-developer:~# ls
/sys/kernel/debug/gcov/tmp/linux-linaro-3.13-2014.01/kernel/time.* -l
-rw------- 1 root root 0 Jan  1  1970
/sys/kernel/debug/gcov/tmp/linux-linaro-3.13-2014.01/kernel/time.gcda
lrwxrwxrwx 1 root root 0 Jan  1  1970
/sys/kernel/debug/gcov/tmp/linux-linaro-3.13-2014.01/kernel/time.gcno
-> /tmp/linux-linaro-3.13-2014.01/kernel/time.gcno
root at linaro-developer:~#

Source are placed under /tmp/
root at linaro-developer:/tmp/linux-linaro-3.13-2014.01# ls  kernel/time.* -l
-rw-rw-r-- 1 linaro linaro  19233 Jan 24  2014 kernel/time.c
-rw-rw-r-- 1 linaro linaro  12768 Feb 13  2014 kernel/time.gcno
-rw-rw-r-- 1 linaro linaro 136444 Feb 13  2014 kernel/time.o
root at linaro-developer:/tmp/linux-linaro-3.13-2014.01#


root at linaro-developer:/tmp/linux-linaro-3.13-2014.01# gcov kernel/gcov/base.c -o
 /sys/kernel/debug/gcov/tmp/linux-linaro-3.13-2014.01/kernel/gcov/
File 'kernel/gcov/base.c'
Lines executed:43.18% of 44
Creating 'base.c.gcov'

root at linaro-developer:/tmp/linux-linaro-3.13-2014.01#

The above experiment gives coverage of a single file base.c when i run
gcov manually.
Is there any way to get Linux kernel coverage of all files after
running LTP test cases ?

Thanks in advance.

Best regards
Naresh Kamboju

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [LTP] How to get the Linux kernel coverage data on ARM arch when I run LTP test?
  2014-02-14  9:02 How to get the Linux kernel coverage data on ARM arch when I run LTP test? Naresh Kamboju
@ 2014-02-14  9:43 ` Peter Oberparleiter
  2014-02-18 14:30   ` Naresh Kamboju
  0 siblings, 1 reply; 4+ messages in thread
From: Peter Oberparleiter @ 2014-02-14  9:43 UTC (permalink / raw)
  To: linux-arm-kernel

On 14.02.2014 10:02, Naresh Kamboju wrote:
> root at linaro-developer:/tmp/linux-linaro-3.13-2014.01# gcov kernel/gcov/base.c -o
>  /sys/kernel/debug/gcov/tmp/linux-linaro-3.13-2014.01/kernel/gcov/
> File 'kernel/gcov/base.c'
> Lines executed:43.18% of 44
> Creating 'base.c.gcov'
> 
> root at linaro-developer:/tmp/linux-linaro-3.13-2014.01#
> 
> The above experiment gives coverage of a single file base.c when i run
> gcov manually.
> Is there any way to get Linux kernel coverage of all files after
> running LTP test cases ?

1. Reset coverage data: lcov -z
2. Run LTP (or any other test case)
3. Capture coverage data: lcov -c -o coverage.info
4. Generate HTML output: genhtml coverage.info -o out
5. View HTML output: <browser> out/index.html

More information on lcov can be found on the page behind the second URL
your quoted in your mail.


Regards,
  Peter Oberparleiter

-- 
Peter Oberparleiter
Linux on System z Development - IBM Germany

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [LTP] How to get the Linux kernel coverage data on ARM arch when I run LTP test?
  2014-02-14  9:43 ` [LTP] " Peter Oberparleiter
@ 2014-02-18 14:30   ` Naresh Kamboju
       [not found]     ` <CAHTX3dLrfW_Hbqx_-vEfcHGCh7c4n=Hs1OATfvjJ9UEaxJTCaQ@mail.gmail.com>
  0 siblings, 1 reply; 4+ messages in thread
From: Naresh Kamboju @ 2014-02-18 14:30 UTC (permalink / raw)
  To: linux-arm-kernel

On 14 February 2014 15:13, Peter Oberparleiter
<oberpar@linux.vnet.ibm.com> wrote:
> On 14.02.2014 10:02, Naresh Kamboju wrote:
>> root at linaro-developer:/tmp/linux-linaro-3.13-2014.01# gcov kernel/gcov/base.c -o
>>  /sys/kernel/debug/gcov/tmp/linux-linaro-3.13-2014.01/kernel/gcov/
>> File 'kernel/gcov/base.c'
>> Lines executed:43.18% of 44
>> Creating 'base.c.gcov'
>>
>> root at linaro-developer:/tmp/linux-linaro-3.13-2014.01#
>>
>> The above experiment gives coverage of a single file base.c when i run
>> gcov manually.
>> Is there any way to get Linux kernel coverage of all files after
>> running LTP test cases ?
>
> 1. Reset coverage data: lcov -z
> 2. Run LTP (or any other test case)
> 3. Capture coverage data: lcov -c -o coverage.info
> 4. Generate HTML output: genhtml coverage.info -o out
> 5. View HTML output: <browser> out/index.html

It is working !!!
LTP executed on linux-linaro build on vexpress-tc2 target.
Please find results obtained
http://people.linaro.org/~naresh.kamboju/linux-linaro-coverage-by-ltp/

The plan is to run all linaro test suite and to get coverage date.

Peter Oberparleiter,
Thank you very much for your help.

Best regards
Naresh Kamboju

>
> More information on lcov can be found on the page behind the second URL
> your quoted in your mail.
>
>
> Regards,
>   Peter Oberparleiter
>
> --
> Peter Oberparleiter
> Linux on System z Development - IBM Germany
>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [LTP] How to get the Linux kernel coverage data on ARM arch when I run LTP test?
       [not found]     ` <CAHTX3dLrfW_Hbqx_-vEfcHGCh7c4n=Hs1OATfvjJ9UEaxJTCaQ@mail.gmail.com>
@ 2014-04-04 11:00       ` Naresh Kamboju
  0 siblings, 0 replies; 4+ messages in thread
From: Naresh Kamboju @ 2014-04-04 11:00 UTC (permalink / raw)
  To: linux-arm-kernel

On 3 March 2014 20:51, Michal Simek <monstr@monstr.eu> wrote:
> HI,
>
>
> 2014-02-18 15:30 GMT+01:00 Naresh Kamboju <naresh.kamboju@linaro.org>:
>
>> On 14 February 2014 15:13, Peter Oberparleiter
>> <oberpar@linux.vnet.ibm.com> wrote:
>> > On 14.02.2014 10:02, Naresh Kamboju wrote:
>> >> root at linaro-developer:/tmp/linux-linaro-3.13-2014.01# gcov
>> >> kernel/gcov/base.c -o
>> >>  /sys/kernel/debug/gcov/tmp/linux-linaro-3.13-2014.01/kernel/gcov/
>> >> File 'kernel/gcov/base.c'
>> >> Lines executed:43.18% of 44
>> >> Creating 'base.c.gcov'
>> >>
>> >> root at linaro-developer:/tmp/linux-linaro-3.13-2014.01#
>> >>
>> >> The above experiment gives coverage of a single file base.c when i run
>> >> gcov manually.
>> >> Is there any way to get Linux kernel coverage of all files after
>> >> running LTP test cases ?
>> >
>> > 1. Reset coverage data: lcov -z
>> > 2. Run LTP (or any other test case)
>> > 3. Capture coverage data: lcov -c -o coverage.info
>> > 4. Generate HTML output: genhtml coverage.info -o out
>> > 5. View HTML output: <browser> out/index.html
>>
>> It is working !!!
>> LTP executed on linux-linaro build on vexpress-tc2 target.
>> Please find results obtained
>> http://people.linaro.org/~naresh.kamboju/linux-linaro-coverage-by-ltp/
>>
>> The plan is to run all linaro test suite and to get coverage date.
>
>
> Have you already run it? Are these test cases available?


I have tested LTP on vexpress-tc2. I did not try all test suites.
We ( In Linaro) Linaro Test Suites is a package that contains test
suites that can be run in LAVA.
http://releases.linaro.org/14.03/components/platform/linaro-test-suites

>
> Thanks,
> Michal
>

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2014-04-04 11:00 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-02-14  9:02 How to get the Linux kernel coverage data on ARM arch when I run LTP test? Naresh Kamboju
2014-02-14  9:43 ` [LTP] " Peter Oberparleiter
2014-02-18 14:30   ` Naresh Kamboju
     [not found]     ` <CAHTX3dLrfW_Hbqx_-vEfcHGCh7c4n=Hs1OATfvjJ9UEaxJTCaQ@mail.gmail.com>
2014-04-04 11:00       ` Naresh Kamboju

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).