tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Adding new feature - Kcov



In article <CAB5-aq6SSL_rwoTHGOXh1hgYgOPp+hj4qyhQMwG=g+LuuZF+WQ%mail.gmail.com@localhost>,
Siddharth Muralee  <siddharth.muralee%gmail.com@localhost> wrote:
>On Wed, 2 Jan 2019 at 23:12, Christos Zoulas <christos%astron.com@localhost> wrote:
>>
>> In article
><CAB5-aq5KCpKOD1T9SFGQm2+NyhG4yFjQRit7F+4jFr=SMuFEmw%mail.gmail.com@localhost>,
>> Siddharth Muralee  <siddharth.muralee%gmail.com@localhost> wrote:
>> >-=-=-=-=-=-
>> >
>> >On Wed, 2 Jan 2019 at 09:26, Siddharth Muralee <siddharth.muralee%gmail.com@localhost>
>> >wrote:
>> >>
>> >> Hello, I have attached a modified patch for kcov(4). I have modified
>> >> it to be a per-process lookup instead of the earlier per-unit lookup.
>> >>
>> >> It seems to working fine. I have tested it with a couple of system
>> >> calls. There is however a lot of unnecessary output coming during a
>> >> simple system call. I have attached below the output of kcov(4) for
>> >> the system call `read(-1, NULL, 0)`. I would also like to get some
>> >> input on how to reduce the noise if possible.
>> >
>> >Seems like the attachments got missed somewhere along the way (Not sure
>> >what happened!).
>> >kcov diff - https://github.com/R3x/scratch-files/blob/master/kcov/kcov.diff
>> >output of kcov(4) for read() -
>> >https://github.com/R3x/scratch-files/blob/master/kcov/sample_output.txt
>>
>> What source version do those line numbers correspond it?
>
>It is of NetBSD-current probably a week old. I have made this one with
>the latest version(from GitHub) to avoid any confusion
>latest output -
>https://github.com/R3x/scratch-files/blob/master/kcov/latest_output.txt

Thanks! The way other profilers summarize the output is to identify common
code calling sequences, abstract them and refer to them by id. For example:

/src/sys/arch/x86/x86/pmap.c:3069
/src/sys/arch/x86/x86/pmap.c:3080
/repos/obj1/sys/arch/amd64/compile/GENERIC/./x86/pmap.h:411
/src/sys/arch/x86/x86/pmap.c:3028
/src/sys/arch/x86/x86/pmap.c:3029
/src/sys/arch/x86/x86/pmap.c:3031
/src/sys/arch/x86/x86/pmap.c:3028 (discriminator 1)
/src/sys/arch/x86/x86/pmap.c:3029
/src/sys/arch/x86/x86/pmap.c:3031
/src/sys/arch/x86/x86/pmap.c:3028 (discriminator 1)
/src/sys/arch/x86/x86/pmap.c:3029
/src/sys/arch/x86/x86/pmap.c:3031
/src/sys/arch/x86/x86/pmap.c:3034
/src/sys/arch/x86/x86/pmap.c:3035
/src/sys/arch/x86/x86/pmap.c:3037
/src/sys/arch/x86/x86/pmap.c:3088
/src/sys/arch/x86/x86/pmap.c:3092
/src/sys/arch/x86/x86/pmap.c:3097
/src/sys/arch/x86/x86/pmap.c:3100

is repeated; also putting function names next to line numbers is also helpful
to identify stack traces. What tools are other people using to post-process
this output?

christos



Home | Main Index | Thread Index | Old Index