From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934105AbcLMPVJ (ORCPT ); Tue, 13 Dec 2016 10:21:09 -0500 Received: from mail-wm0-f50.google.com ([74.125.82.50]:36807 "EHLO mail-wm0-f50.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933759AbcLMPVF (ORCPT ); Tue, 13 Dec 2016 10:21:05 -0500 From: Dmitry Vyukov To: akpm@linux-foundation.org, keescook@google.com, corbet@lwn.net Cc: Dmitry Vyukov , Vegard Nossum , linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, syzkaller@googlegroups.com Subject: [PATCH] Documentation: note that KCOV is supported since gcc 4.5 Date: Tue, 13 Dec 2016 16:20:59 +0100 Message-Id: <1481642459-51193-1-git-send-email-dvyukov@google.com> X-Mailer: git-send-email 2.8.0.rc3.226.g39d4020 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Now that we have gcc plugins and in particular sancov plugin, KCOV can be used with gcc 4.5+. Note this in the docs. I've tested CONFIG_KCOV with gcc 4.8.4 (stock for ubuntu 14.04) and it works. It even emits very comparable number of coverage callbacks: 420153 vs 422211 for gcc 7.0. Cc: Jonathan Corbet Cc: Andrew Morton Cc: Kees Cook Cc: Vegard Nossum Cc: linux-kernel@vger.kernel.org Cc: linux-doc@vger.kernel.org Cc: syzkaller@googlegroups.com Signed-off-by: Dmitry Vyukov --- Documentation/dev-tools/kcov.rst | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Documentation/dev-tools/kcov.rst b/Documentation/dev-tools/kcov.rst index 2c41b71..50d515a 100644 --- a/Documentation/dev-tools/kcov.rst +++ b/Documentation/dev-tools/kcov.rst @@ -19,7 +19,9 @@ Configure the kernel with:: CONFIG_KCOV=y -CONFIG_KCOV requires gcc built on revision 231296 or later. +CONFIG_KCOV is natively supported by gcc 6.0+ (revision 231296) via +-fsanitize-coverage=trace-pc flag. gcc 4.5+ supports CONFIG_KCOV with plugins +(see Documentation/gcc-plugins.txt and CONFIG_GCC_PLUGIN_SANCOV). Profiling data will only become accessible once debugfs has been mounted:: mount -t debugfs none /sys/kernel/debug -- 2.8.0.rc3.226.g39d4020