From patchwork Fri Feb 14 09:02:47 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Naresh Kamboju X-Patchwork-Id: 24614 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-yh0-f70.google.com (mail-yh0-f70.google.com [209.85.213.70]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 3903C202E2 for ; Fri, 14 Feb 2014 09:03:59 +0000 (UTC) Received: by mail-yh0-f70.google.com with SMTP id c41sf26868283yho.1 for ; Fri, 14 Feb 2014 01:03:58 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:mime-version:date:message-id :subject:from:to:cc:sender:precedence:list-id:x-original-sender :x-original-authentication-results:mailing-list:list-post:list-help :list-archive:list-unsubscribe:content-type; bh=b5JUFvlps4mV2452UyCdTBS4GX0TKanKUDo23FMpidg=; b=QBLfUm/j8XUuQbOR9XGxPPqaJd0GpJjHj9/F78rY/PVD/5FUammSlYq8aGtxqqZUF1 hjI6Xllui4x+wf2YIuMZod6zlEcebMI7WP6tV9MwsxPVp7X+8h+L9x3qN78Zk70DjW6x DbPd99Ob3IWQ7p3BKviMLWdLArlT0E9AjM/AjeHDCRFaOPhi2Kj8lbNiW3N+6fCF9LS+ QRT0TiGoUiZQb5S6+PhPrCWuYSYPIpGcokIkf3InkZPjtU2i3FfPkQWidUVGujLmUeJ6 vCXKi2MEOYvsV16qHuCB7wu9cq7RqdEBYtq6MY6bLnI8EK8oJVolmSTTu6mvDuHHhJ5d cgBw== X-Gm-Message-State: ALoCoQkDjKzVRIAb+h/gNnz7amFaFeNbVTevV7FTRwVORk45xkOiCnpjNjq3I3S4sPFXbJmMSrrh X-Received: by 10.236.221.168 with SMTP id r38mr2444644yhp.54.1392368638474; Fri, 14 Feb 2014 01:03:58 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.81.20 with SMTP id e20ls16582qgd.58.gmail; Fri, 14 Feb 2014 01:03:58 -0800 (PST) X-Received: by 10.221.29.196 with SMTP id rz4mr4577496vcb.8.1392368638393; Fri, 14 Feb 2014 01:03:58 -0800 (PST) Received: from mail-vc0-f178.google.com (mail-vc0-f178.google.com [209.85.220.178]) by mx.google.com with ESMTPS id tj7si1723544vdc.59.2014.02.14.01.03.58 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 14 Feb 2014 01:03:58 -0800 (PST) Received-SPF: neutral (google.com: 209.85.220.178 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.220.178; Received: by mail-vc0-f178.google.com with SMTP id ik5so9047700vcb.37 for ; Fri, 14 Feb 2014 01:03:58 -0800 (PST) X-Received: by 10.220.188.10 with SMTP id cy10mr306631vcb.36.1392368638074; Fri, 14 Feb 2014 01:03:58 -0800 (PST) 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.220.174.196 with SMTP id u4csp92955vcz; Fri, 14 Feb 2014 01:03:57 -0800 (PST) X-Received: by 10.68.196.226 with SMTP id ip2mr7646272pbc.106.1392368637198; Fri, 14 Feb 2014 01:03:57 -0800 (PST) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id if4si5003355pbc.346.2014.02.14.01.03.40; Fri, 14 Feb 2014 01:03:40 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752377AbaBNJC6 (ORCPT + 27 others); Fri, 14 Feb 2014 04:02:58 -0500 Received: from mail-yh0-f42.google.com ([209.85.213.42]:53241 "EHLO mail-yh0-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752221AbaBNJCs (ORCPT ); Fri, 14 Feb 2014 04:02:48 -0500 Received: by mail-yh0-f42.google.com with SMTP id a41so11296961yho.15 for ; Fri, 14 Feb 2014 01:02:47 -0800 (PST) MIME-Version: 1.0 X-Received: by 10.236.15.102 with SMTP id e66mr317703yhe.69.1392368567550; Fri, 14 Feb 2014 01:02:47 -0800 (PST) Received: by 10.170.145.194 with HTTP; Fri, 14 Feb 2014 01:02:47 -0800 (PST) Date: Fri, 14 Feb 2014 14:32:47 +0530 Message-ID: Subject: How to get the Linux kernel coverage data on ARM arch when I run LTP test? From: Naresh Kamboju To: Arnd Bergmann , fhrbata@redhat.com, oberpar@linux.vnet.ibm.com, Paul Larson Cc: Deepak Saxena , Mark Brown , Milosz Wasilewski , "linux-kernel@vger.kernel.org" , ltp-coverage , ltp-list , "linux-arm-kernel@lists.infradead.org" Sender: linux-kernel-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: naresh.kamboju@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.220.178 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) 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 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , Hi All, Sorry for the wide distribution: According to LTP page info, http://ltp.sourceforge.net/coverage/gcov.php http://ltp.sourceforge.net/coverage/lcov.php My question is How to get kernel coverage when I run LTP test? Since we do not have direct GCOV support on ARM I have enabled ( just for experiment) $ git diff kernel/gcov/Kconfig I have enabled below kernel config and built the kernel. CONFIG_GCOV_KERNEL=y CONFIG_GCOV_PROFILE_ALL=y CONFIG_GCOV_FORMAT_AUTODETECT=y of course I have disabled gcov on below folders and files, because since it is an experiment i would like to be on safe side - arch/arm/mm/ - arch/arm/kernel/ - arch/arm/boot/ - arch/arm/boot/compressed/ - arch/arm/boot/bootp/ - arch/arm/boot/dts Arndale booted with this configuration successfully. Took more than 65 seconds to finish boot. gcov related files are found under /sys/ similer to X86 machine. And gcov supporting files filename.gcda are having links to kernel source root@linaro-developer:~# ls /sys/kernel/debug/gcov/ reset tmp root@linaro-developer:~# root@linaro-developer:~# ls /sys/kernel/debug/gcov/tmp/ linux-linaro-3.13-2014.01 root@linaro-developer:~# ls /sys/kernel/debug/gcov/tmp/linux-linaro-3.13-2014.01/ arch block crypto drivers fs init ipc kernel lib mm security virt root@linaro-developer:~# ls /sys/kernel/debug/gcov/tmp/linux-linaro-3.13-2014.01/kernel/time.* -l -rw------- 1 root root 0 Jan 1 1970 /sys/kernel/debug/gcov/tmp/linux-linaro-3.13-2014.01/kernel/time.gcda lrwxrwxrwx 1 root root 0 Jan 1 1970 /sys/kernel/debug/gcov/tmp/linux-linaro-3.13-2014.01/kernel/time.gcno -> /tmp/linux-linaro-3.13-2014.01/kernel/time.gcno root@linaro-developer:~# Source are placed under /tmp/ root@linaro-developer:/tmp/linux-linaro-3.13-2014.01# ls kernel/time.* -l -rw-rw-r-- 1 linaro linaro 19233 Jan 24 2014 kernel/time.c -rw-rw-r-- 1 linaro linaro 12768 Feb 13 2014 kernel/time.gcno -rw-rw-r-- 1 linaro linaro 136444 Feb 13 2014 kernel/time.o root@linaro-developer:/tmp/linux-linaro-3.13-2014.01# root@linaro-developer:/tmp/linux-linaro-3.13-2014.01# gcov kernel/gcov/base.c -o /sys/kernel/debug/gcov/tmp/linux-linaro-3.13-2014.01/kernel/gcov/ File 'kernel/gcov/base.c' Lines executed:43.18% of 44 Creating 'base.c.gcov' root@linaro-developer:/tmp/linux-linaro-3.13-2014.01# The above experiment gives coverage of a single file base.c when i run gcov manually. Is there any way to get Linux kernel coverage of all files after running LTP test cases ? Thanks in advance. Best regards Naresh Kamboju --- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/ diff --git a/kernel/gcov/Kconfig b/kernel/gcov/Kconfig index d4da55d..fceac85 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.