linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tri Vo <trong@android.com>
To: oberpar@linux.ibm.com
Cc: ghackmann@android.com, ndesaulniers@google.com,
	linux-kernel@vger.kernel.org, kernel-team@android.com,
	yamada.masahiro@socionext.com, akpm@linux-foundation.org,
	Tri Vo <trong@android.com>
Subject: [PATCH v4 3/3] gcov: docs: add a note on GCC vs Clang differences
Date: Sun, 17 Mar 2019 19:54:11 -0700	[thread overview]
Message-ID: <20190318025411.98014-4-trong@android.com> (raw)
In-Reply-To: <20190318025411.98014-1-trong@android.com>

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.

Also adjust the documentation to account for the removal of config
symbol CONFIG_GCOV_FORMAT_AUTODETECT by commit 6a61b70b43c9
("gcov: remove CONFIG_GCOV_FORMAT_AUTODETECT").

Signed-off-by: Tri Vo <trong@android.com>
Reviewed-by: Peter Oberparleiter <oberpar@linux.ibm.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.21.0.225.g810b269d1ac-goog


      parent reply	other threads:[~2019-03-18  2:54 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-18  2:54 [PATCH v4 0/3] gcov: add Clang support Tri Vo
2019-03-18  2:54 ` [PATCH v4 1/3] gcov: Clang: move common GCC code into gcc_base.c Tri Vo
2019-03-18  2:54 ` [PATCH v4 2/3] gcov: Clang support Tri Vo
2019-03-18  2:54 ` Tri Vo [this message]

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=20190318025411.98014-4-trong@android.com \
    --to=trong@android.com \
    --cc=akpm@linux-foundation.org \
    --cc=ghackmann@android.com \
    --cc=kernel-team@android.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ndesaulniers@google.com \
    --cc=oberpar@linux.ibm.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 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).