From patchwork Mon Sep 8 12:59:34 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Riku Voipio X-Patchwork-Id: 36976 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-yk0-f199.google.com (mail-yk0-f199.google.com [209.85.160.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id B34082054D for ; Mon, 8 Sep 2014 13:01:44 +0000 (UTC) Received: by mail-yk0-f199.google.com with SMTP id 19sf1615186ykq.10 for ; Mon, 08 Sep 2014 06:01:44 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:subject:date:message-id:cc :precedence:list-id:list-unsubscribe:list-archive:list-post :list-help:list-subscribe:mime-version:sender:errors-to :x-original-sender:x-original-authentication-results:mailing-list :content-type:content-transfer-encoding; bh=h4yw3oLdaUgQzbR/DSktsvQ8tLI77KPgdxj4f1iem+s=; b=QjQ5VuEmLA5BtcEbhvuG4fosQIkY32DBPWxu6rkOhqsLB2V7ysQe/iCRWpyUHmxWdS S02G5AOEhAj/UD0/+EN0KyN1B5bIIdaTq00q2OL6NW0XtIA974R5poF+DFdlYzA7+Qo7 cduQCcw0n4HU8YD+pVmv9D8OFWWmgoaY+VQJNprYJx+CJa/LJPSeHioAVxDCvn61C0dU Nc5wPnrOqjSj+oIx0xxxvHU3Zc9cRv7DMtDcDpemexxhMn/sYU5Zj8mgDsO3koM0Adh4 CbxRBSZUOcRjaNxDfw7eEaSMrpMrkuCZ/JzvruTpGsHsuWEhz3nR5vpPvrr1qog/6uaS yz7A== X-Gm-Message-State: ALoCoQlSMyAAbThhPoYM61CaiU/DZsTJ+rp4+TDQSCIaiqR0hKrTps7wrebDSTcLEHz/tz3n0Z8t X-Received: by 10.236.201.99 with SMTP id a63mr160073yho.19.1410181304532; Mon, 08 Sep 2014 06:01:44 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.101.40 with SMTP id t37ls1035435qge.42.gmail; Mon, 08 Sep 2014 06:01:44 -0700 (PDT) X-Received: by 10.52.141.76 with SMTP id rm12mr140823vdb.71.1410181304420; Mon, 08 Sep 2014 06:01:44 -0700 (PDT) Received: from mail-vc0-f173.google.com (mail-vc0-f173.google.com [209.85.220.173]) by mx.google.com with ESMTPS id i9si3850040vca.73.2014.09.08.06.01.44 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 08 Sep 2014 06:01:44 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.173 as permitted sender) client-ip=209.85.220.173; Received: by mail-vc0-f173.google.com with SMTP id le20so1309307vcb.18 for ; Mon, 08 Sep 2014 06:01:44 -0700 (PDT) X-Received: by 10.221.64.142 with SMTP id xi14mr9749393vcb.31.1410181304104; Mon, 08 Sep 2014 06:01:44 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.221.45.67 with SMTP id uj3csp130033vcb; Mon, 8 Sep 2014 06:01:42 -0700 (PDT) X-Received: by 10.68.139.74 with SMTP id qw10mr20044226pbb.100.1410181301765; Mon, 08 Sep 2014 06:01:41 -0700 (PDT) Received: from bombadil.infradead.org (bombadil.infradead.org. [2001:1868:205::9]) by mx.google.com with ESMTPS id zs4si17798139pbb.69.2014.09.08.06.01.41 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 08 Sep 2014 06:01:41 -0700 (PDT) Received-SPF: none (google.com: linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org does not designate permitted sender hosts) client-ip=2001:1868:205::9; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1XQyYE-0000nB-4i; Mon, 08 Sep 2014 13:00:10 +0000 Received: from afflict.kos.to ([92.243.29.197]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1XQyYA-000828-TH for linux-arm-kernel@lists.infradead.org; Mon, 08 Sep 2014 13:00:08 +0000 Received: from afflict.kos.to (afflict [92.243.29.197]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by afflict.kos.to (Postfix) with ESMTPSA id E42DF264D5; Mon, 8 Sep 2014 14:59:42 +0200 (CEST) From: Riku Voipio To: linux-arm-kernel@lists.infradead.org Subject: [PATCH] Enable gcov support on the ARM architecture Date: Mon, 8 Sep 2014 15:59:34 +0300 Message-Id: <1410181174-14977-1-git-send-email-riku.voipio@linaro.org> X-Mailer: git-send-email 1.7.10.4 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140908_060007_121374_9D6B3050 X-CRM114-Status: GOOD ( 12.95 ) X-Spam-Score: 0.0 (/) X-Spam-Report: SpamAssassin version 3.4.0 on bombadil.infradead.org summary: Content analysis details: (0.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- Cc: linaro-kernel@lists.linaro.org, Russell King , Vincent Sanders , Arnd Bergmann , Andrey Ryabinin , Riku Voipio , Naresh Kamboju X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: , List-Help: , List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: riku.voipio@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.173 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 Enable gcov support for ARM based on original patches by David Singleton and George G. Davis Riku - updated to patch to current mainline kernel. The patch has been submitted in 2010, 2012 - for symmetry, now in 2014 too. https://lwn.net/Articles/390419/ http://marc.info/?l=linux-arm-kernel&m=133823081813044 From: Vincent Sanders Cc: Andrey Ryabinin Cc: Arnd Bergmann Cc: Russell King Cc: Naresh Kamboju Signed-off-by: Riku Voipio Signed-off-by: Vincent Sanders --- arch/arm/boot/bootp/Makefile | 2 ++ arch/arm/boot/compressed/Makefile | 2 ++ arch/arm/kernel/Makefile | 2 ++ kernel/gcov/Kconfig | 2 +- 4 files changed, 7 insertions(+), 1 deletion(-) diff --git a/arch/arm/boot/bootp/Makefile b/arch/arm/boot/bootp/Makefile index c394e30..5761f00 100644 --- a/arch/arm/boot/bootp/Makefile +++ b/arch/arm/boot/bootp/Makefile @@ -5,6 +5,8 @@ # architecture-specific flags and dependencies. # +GCOV_PROFILE := n + LDFLAGS_bootp :=-p --no-undefined -X \ --defsym initrd_phys=$(INITRD_PHYS) \ --defsym params_phys=$(PARAMS_PHYS) -T diff --git a/arch/arm/boot/compressed/Makefile b/arch/arm/boot/compressed/Makefile index 76a50ec..3ea230a 100644 --- a/arch/arm/boot/compressed/Makefile +++ b/arch/arm/boot/compressed/Makefile @@ -37,6 +37,8 @@ ifeq ($(CONFIG_ARM_VIRT_EXT),y) OBJS += hyp-stub.o endif +GCOV_PROFILE := n + # # Architecture dependencies # diff --git a/arch/arm/kernel/Makefile b/arch/arm/kernel/Makefile index 38ddd9f..979c4e9 100644 --- a/arch/arm/kernel/Makefile +++ b/arch/arm/kernel/Makefile @@ -5,6 +5,8 @@ CPPFLAGS_vmlinux.lds := -DTEXT_OFFSET=$(TEXT_OFFSET) AFLAGS_head.o := -DTEXT_OFFSET=$(TEXT_OFFSET) +GCOV_PROFILE := n + ifdef CONFIG_FUNCTION_TRACER CFLAGS_REMOVE_ftrace.o = -pg CFLAGS_REMOVE_insn.o = -pg diff --git a/kernel/gcov/Kconfig b/kernel/gcov/Kconfig index d04ce8a..cf66c5c 100644 --- a/kernel/gcov/Kconfig +++ b/kernel/gcov/Kconfig @@ -35,7 +35,7 @@ config GCOV_KERNEL config GCOV_PROFILE_ALL bool "Profile entire Kernel" depends on GCOV_KERNEL - depends on SUPERH || S390 || X86 || PPC || MICROBLAZE + depends on SUPERH || S390 || X86 || PPC || MICROBLAZE || ARM default n ---help--- This options activates profiling for the entire kernel.