From patchwork Fri Jul 27 12:10:25 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Masami Hiramatsu (Google)" X-Patchwork-Id: 10546985 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 45AC7112B for ; Fri, 27 Jul 2018 12:10:51 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 333612B8C7 for ; Fri, 27 Jul 2018 12:10:51 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 316EC2B8C0; Fri, 27 Jul 2018 12:10:51 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EDA882B8CC for ; Fri, 27 Jul 2018 12:10:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730801AbeG0Nc1 (ORCPT ); Fri, 27 Jul 2018 09:32:27 -0400 Received: from mail.kernel.org ([198.145.29.99]:33450 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730425AbeG0Nc0 (ORCPT ); Fri, 27 Jul 2018 09:32:26 -0400 Received: from localhost.localdomain (NE2965lan1.rev.em-net.ne.jp [210.141.244.193]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id C1D56208AF; Fri, 27 Jul 2018 12:10:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1532693448; bh=Uy+1ilz6+WDIhZsXuINSjcBP5nV05v+ArQP8BLD5g1s=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=rHoXqEglrYzY714e4RhOQX2/IpMIp/s1rykTGjG8nZiapkd7ooyRS5GP69XrreoD7 DPi+EzZZl5ywokekuobQrV1ZZjfHAvKy8PYTv5eHV5bcv6uNBAk8iW8pS4pG2wDHTf mUQYfMvWAz+cteIdnnzwVhVlgxf9vNcGipjAO0Z8= From: Masami Hiramatsu To: Shuah Khan , Steven Rostedt Cc: Ingo Molnar , Masami Hiramatsu , linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 01/25] tracing: Allow gcov profiling on only ftrace subsystem Date: Fri, 27 Jul 2018 21:10:25 +0900 Message-Id: <153269342571.3084.3307543750811437921.stgit@devbox> X-Mailer: git-send-email 2.13.6 In-Reply-To: <153269339575.3084.16279591141931053689.stgit@devbox> References: <153269339575.3084.16279591141931053689.stgit@devbox> User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 Sender: linux-kselftest-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kselftest@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Add GCOV_PROFILE_FTRACE to allow gcov profiling on only files in ftrace subsystem. This kconfig flag will be used for checking kselftest/ftrace coverage. Signed-off-by: Masami Hiramatsu --- kernel/trace/Kconfig | 13 +++++++++++++ kernel/trace/Makefile | 5 +++++ 2 files changed, 18 insertions(+) -- To unsubscribe from this list: send the line "unsubscribe linux-kselftest" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/kernel/trace/Kconfig b/kernel/trace/Kconfig index a47f77d27673..a628e8cbc1ef 100644 --- a/kernel/trace/Kconfig +++ b/kernel/trace/Kconfig @@ -722,6 +722,19 @@ config TRACING_EVENTS_GPIO help Enable tracing events for gpio subsystem +config GCOV_PROFILE_FTRACE + bool "Enable GCOV profiling on ftrace subsystem" + depends on GCOV_KERNEL + help + Enable GCOV profiling on ftrace subsystem for checking + which functions/lines are tested. + + If unsure, say N. + + Note that on a kernel compiled with this flags, ftrace will be + significantly run slower. So do not enable it for production + kernel. + endif # FTRACE endif # TRACING_SUPPORT diff --git a/kernel/trace/Makefile b/kernel/trace/Makefile index e2538c7638d4..443d53392f61 100644 --- a/kernel/trace/Makefile +++ b/kernel/trace/Makefile @@ -18,6 +18,11 @@ ifdef CONFIG_TRACING_BRANCHES KBUILD_CFLAGS += -DDISABLE_BRANCH_PROFILING endif +# for GCOV coverage profiling +ifdef CONFIG_GCOV_PROFILE_FTRACE +GCOV_PROFILE := y +endif + CFLAGS_trace_benchmark.o := -I$(src) CFLAGS_trace_events_filter.o := -I$(src)