Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 28 Feb 2019 17:39:43 -0800
From:      Matthew Macy <mmacy@freebsd.org>
To:        Alan Somers <asomers@freebsd.org>
Cc:        src-committers <src-committers@freebsd.org>, svn-src-all <svn-src-all@freebsd.org>,  svn-src-head <svn-src-head@freebsd.org>
Subject:   Re: svn commit: r344487 - in head/sys: conf gnu/gcov
Message-ID:  <CAPrugNrnKeDkqsqDtPyTCsPBK6rUsAThog1KO1u3FPCGihD3sw@mail.gmail.com>
In-Reply-To: <CAOtMX2hD=o%2BF1z1sErDuBxaL8qm%2BS-BDAwvLr=1z0MhmAJ8ang@mail.gmail.com>
References:  <201902232114.x1NLE0cH085345@repo.freebsd.org> <CAOtMX2hD=o%2BF1z1sErDuBxaL8qm%2BS-BDAwvLr=1z0MhmAJ8ang@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
to config add:
options LINDEBUGFS
options GCOV

compile kernel with gcc (otherwise it will be a no-op)

sysctl debug.gcov.enable=1

mount -t debugfs debugfs /sys/kernel/debug

(or wherever) and the output artifacts will appear under gcov/<kernel
build path> - you need to be root to see the artifacts

gcov can then generate the results as it would normally from the
profiling and the build time artifacts

bug reports welcome


-M














On Thu, Feb 28, 2019 at 2:50 PM Alan Somers <asomers@freebsd.org> wrote:
>
> On Sat, Feb 23, 2019 at 2:14 PM Matt Macy <mmacy@freebsd.org> wrote:
> >
> > Author: mmacy
> > Date: Sat Feb 23 21:14:00 2019
> > New Revision: 344487
> > URL: https://svnweb.freebsd.org/changeset/base/344487
> >
> > Log:
> >   gcov support
> >
> >   add gcov support and export results as files in debugfs
> >
> >   Reviewed by:  hps@
> >   MFC after:    1 week
> >   Sponsored by: iX Systems
> >   Differential Revision:        https://reviews.freebsd.org/D19260
> >
> > Added:
> >   head/sys/gnu/gcov/
> >   head/sys/gnu/gcov/gcc_4_7.c   (contents, props changed)
> >   head/sys/gnu/gcov/gcov.h   (contents, props changed)
> >   head/sys/gnu/gcov/gcov_fs.c   (contents, props changed)
> >   head/sys/gnu/gcov/gcov_subr.c   (contents, props changed)
> > Modified:
> >   head/sys/conf/files
> >   head/sys/conf/kern.mk
> >   head/sys/conf/kern.post.mk
> >   head/sys/conf/kern.pre.mk
> >   head/sys/conf/kmod.mk
> >   head/sys/conf/options
>
> On a more practical note, how does one use this new feature?  It looks
> like it could be quite useful.
> -Alan



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAPrugNrnKeDkqsqDtPyTCsPBK6rUsAThog1KO1u3FPCGihD3sw>