All of lore.kernel.org
 help / color / mirror / Atom feed
From: Nick Desaulniers <ndesaulniers@google.com>
To: Tri Vo <trong@android.com>
Cc: Peter Oberparleiter <oberpar@linux.ibm.com>,
	Greg Hackmann <ghackmann@android.com>,
	LKML <linux-kernel@vger.kernel.org>,
	kernel-team@android.com,
	Masahiro Yamada <yamada.masahiro@socionext.com>
Subject: Re: [PATCH v3 3/3] gcov: docs: add a note on GCC vs Clang differences
Date: Tue, 22 Jan 2019 15:50:16 -0800	[thread overview]
Message-ID: <CAKwvOdkACNJhHtPWG5VXR3o7S9RfHiBqkb4x=RnjF2y3ixnQGg@mail.gmail.com> (raw)
In-Reply-To: <20190122233749.42220-4-trong@android.com>

On Tue, Jan 22, 2019 at 3:39 PM Tri Vo <trong@android.com> wrote:
>
> Document some things of note to gcov users:
> 1. GCC gcov and Clang llvm-cov tools are not compatible.
> 2. The use of GCC vs Clang is transparent at build-time.
>
> Signed-off-by: Tri Vo <trong@android.com>

Thanks for adding this note (I made the mistake myself when testing
out these patches that the coverage format is slightly different).
And good find removing the documentation on the now obsolete config.
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>

> ---
>  Documentation/dev-tools/gcov.rst | 18 ++++++++++++++----
>  1 file changed, 14 insertions(+), 4 deletions(-)
>
> diff --git a/Documentation/dev-tools/gcov.rst b/Documentation/dev-tools/gcov.rst
> index 69a7d90c320a..46aae52a41d0 100644
> --- a/Documentation/dev-tools/gcov.rst
> +++ b/Documentation/dev-tools/gcov.rst
> @@ -34,10 +34,6 @@ Configure the kernel with::
>          CONFIG_DEBUG_FS=y
>          CONFIG_GCOV_KERNEL=y
>
> -select the gcc's gcov format, default is autodetect based on gcc version::
> -
> -        CONFIG_GCOV_FORMAT_AUTODETECT=y
> -
>  and to get coverage data for the entire kernel::
>
>          CONFIG_GCOV_PROFILE_ALL=y
> @@ -169,6 +165,20 @@ b) gcov is run on the BUILD machine
>        [user@build] gcov -o /tmp/coverage/tmp/out/init main.c
>
>
> +Note on compilers
> +-----------------
> +
> +GCC and LLVM gcov tools are not necessarily compatible. Use gcov_ to work with
> +GCC-generated .gcno and .gcda files, and use llvm-cov_ for Clang.
> +
> +.. _gcov: http://gcc.gnu.org/onlinedocs/gcc/Gcov.html
> +.. _llvm-cov: https://llvm.org/docs/CommandGuide/llvm-cov.html
> +
> +Build differences between GCC and Clang gcov are handled by Kconfig. It
> +automatically selects the appropriate gcov format depending on the detected
> +toolchain.
> +
> +
>  Troubleshooting
>  ---------------
>
> --
> 2.20.1.321.g9e740568ce-goog
>


-- 
Thanks,
~Nick Desaulniers

  reply	other threads:[~2019-01-22 23:50 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-22 23:37 [PATCH v3 0/3] gcov: add Clang support Tri Vo
2019-01-22 23:37 ` [PATCH v3 1/3] gcov: Clang: move common GCC code into gcc_base.c Tri Vo
2019-03-05 13:40   ` Peter Oberparleiter
2019-01-22 23:37 ` [PATCH v3 2/3] gcov: Clang support Tri Vo
2019-03-05 13:57   ` Peter Oberparleiter
2019-01-22 23:37 ` [PATCH v3 3/3] gcov: docs: add a note on GCC vs Clang differences Tri Vo
2019-01-22 23:50   ` Nick Desaulniers [this message]
2019-03-05 14:07   ` Peter Oberparleiter
2019-02-07  0:52 ` [PATCH v3 0/3] gcov: add Clang support Nick Desaulniers
2019-02-22  0:57   ` Nick Desaulniers
2019-03-05 14:29 ` Peter Oberparleiter
2019-03-12  4:57   ` Tri Vo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAKwvOdkACNJhHtPWG5VXR3o7S9RfHiBqkb4x=RnjF2y3ixnQGg@mail.gmail.com' \
    --to=ndesaulniers@google.com \
    --cc=ghackmann@android.com \
    --cc=kernel-team@android.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=oberpar@linux.ibm.com \
    --cc=trong@android.com \
    --cc=yamada.masahiro@socionext.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.