Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756410Ab3HZOTi (ORCPT ); Mon, 26 Aug 2013 10:19:38 -0400 Received: from e06smtp17.uk.ibm.com ([195.75.94.113]:38886 "EHLO e06smtp17.uk.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751801Ab3HZOTg (ORCPT ); Mon, 26 Aug 2013 10:19:36 -0400 Message-ID: <521B63F7.9050409@linux.vnet.ibm.com> Date: Mon, 26 Aug 2013 16:19:35 +0200 From: Peter Oberparleiter MIME-Version: 1.0 To: "LF.Tan" CC: Frantisek Hrbata , linux-kernel@vger.kernel.org, jstancek@redhat.com, keescook@chromium.org, Christophe Guillon , rusty@rustcorp.com.au, linux-arch@vger.kernel.org, Arnd Bergmann , mgahagan@redhat.com, agospoda@redhat.com Subject: Re: [RFC PATCH 0/4] add support for gcov format introduced in gcc 4.7 References: <1377247176-13537-1-git-send-email-fhrbata@redhat.com> <52177AD7.1030709@linux.vnet.ibm.com> <20130823161532.GA2336@localhost.localdomain> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-TM-AS-MML: No X-Content-Scanned: Fidelis XPS MAILER x-cbid: 13082614-0542-0000-0000-0000063E6C7D Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1609 Lines: 40 On 26.08.2013 13:39, LF.Tan wrote: > Hi all > > I am interested to enable Gcov on my platform (on a target board). I > have tried to apply the 4 patches submitted by Frantisek Hrbata. But, > the *.gcda is always empty. Note, I am using GCC 4.7.3. > > I have followed the steps in Documentation/gcov.txt. I've mounted the > NFS filesystem and it has access to the kernel build directory on host > machine.The path for the kernel source in host and target are same. > > Let said my kernel module is under drivers/misc, > drivers/misc/module.ko. Turn on Gcov in drivers/misc/Makefile. > > 1. mount -t debugfs none /sys/kernel/debug/ > 2. insmod /module.ko > 3. Perform some actions to excute code in module.ko > 4. rmmod /module.ko > 5. Check /sys/kernel/debug/gcov//drivers/misc/. There is a soft > link of module.gcno (I check the soft link is working), but > module.gcda is empty. Are you sure they are empty? .gcda files report a file size of 0 as many virtual files do, but you can read data from them nevertheless. You could try running "cat" on them to copy their contents for example. > Any step is incorrect or missing? Or anyone know how to enable GCOV on > target board? Please advice. > I would like to enable GCOV in arch/ code as well. > Thank you very much. -- Peter Oberparleiter Linux on System z Development - IBM Germany -- 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/