[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <4A940A11.2040706@petalogix.com>
Date: Tue, 25 Aug 2009 17:58:09 +0200
From: Michal Simek <michal.simek@...alogix.com>
To: Linux Kernel list <linux-kernel@...r.kernel.org>,
oberpar@...ux.vnet.ibm.com,
"subrata@...ux.vnet.ibm.com" <subrata@...ux.vnet.ibm.com>
Subject: Gcov and lcov
Hi All,
I am trying to run gcov to see source code coverage.
First of all there should be DEBUG_FS instead of DEBUG in documentation.
diff --git a/Documentation/gcov.txt b/Documentation/gcov.txt
index 40ec633..e7ca647 100644
--- a/Documentation/gcov.txt
+++ b/Documentation/gcov.txt
@@ -47,7 +47,7 @@ Possible uses:
Configure the kernel with:
- CONFIG_DEBUGFS=y
+ CONFIG_DEBUG_FS=y
CONFIG_GCOV_KERNEL=y
I am missing any option to be possible to stop capture coveradge data.
I am running in on Microblaze and it takes me a lot of time to grap all
gcda data from debugfs.
I can't run gcov on Microblaze that's why I have to run option b in doc
"gcov is run on the BUILD machine"
I copied gcda to kernel source code and currently I am able to generate
statistic for every file.
That copy I have to do because I need to connect counters value with
source file
[root@...str linux-monstr_eu-commit]# mb-linux-gcov -o
arch/microblaze/kernel/ heartbeat.c
File 'arch/microblaze/kernel/heartbeat.c'
Lines executed:100.00% of 24
arch/microblaze/kernel/heartbeat.c:creating 'heartbeat.c.gcov'
File
'/home/projects/xils/_full/software/linux-monstr_eu-commit/arch/microblaze/include/asm/io.h'
Lines executed:100.00% of 3
/home/projects/xils/_full/software/linux-monstr_eu-commit/arch/microblaze/include/asm/io.h:creating
'io.h.gcov'
And content of that file
[root@...str linux-monstr_eu-commit]# cat heartbeat.c.gcov
-: 0:Source:arch/microblaze/kernel/heartbeat.c
-: 0:Graph:arch/microblaze/kernel/heartbeat.gcno
-: 0:Data:arch/microblaze/kernel/heartbeat.gcda
-: 0:Runs:0
-: 0:Programs:0
-: 1:/*
-: 2: * Copyright (C) 2007-2009 Michal Simek <monstr@...str.eu>
-: 3: * Copyright (C) 2007-2009 PetaLogix
-: 4: * Copyright (C) 2006 Atmark Techno, Inc.
-: 5: *
-: 6: * This file is subject to the terms and conditions of
the GNU General Public
-: 7: * License. See the file "COPYING" in the main directory
of this archive
-: 8: * for more details.
-: 9: */
-: 10:
-: 11:#include <linux/sched.h>
-: 12:#include <linux/io.h>
-: 13:
-: 14:#include <asm/setup.h>
-: 15:#include <asm/page.h>
-: 16:#include <asm/prom.h>
-: 17:
-: 18:static unsigned int base_addr;
-: 19:
-: 20:void heartbeat(void)
69918: 21:{
-: 22: static unsigned int cnt, period, dist;
-: 23:
69918: 24: if (base_addr) {
71379: 25: if (cnt == 0 || cnt == dist)
1461: 26: out_be32(base_addr, 1);
68457: 27: else if (cnt == 7 || cnt == dist + 7)
1460: 28: out_be32(base_addr, 0);
-: 29:
69918: 30: if (++cnt > period) {
730: 31: cnt = 0;
-: 32: /*
-: 33: * The hyperbolic function below
modifies the heartbeat
-: 34: * period length in dependency of t
....
Then I would like to use lcov and generate html sites. This could be
possible but I haven't found
a way how to do it.
I used lcov --capture --directory . --output-file out
There is this mishmash in version string
/home/projects/xils/_full/software/linux-monstr_eu-commit/kernel/spinlock.gcno:version
'401*', prefer '401p'
/home/projects/xils/_full/software/linux-monstr_eu-commit/kernel/spinlock.gcda:version
'401*', prefer version '401p'
and then genhtml out which end with fault because my out file contain
wrong patches where is part of path repeated.
arch/microblaze/kernel/arch/microblaze/kernel
It is a little bit mess but I hope that you understand what I mean. If
not please let me know.
Can you give me any hint how to do it?
Thanks,
Michal
--
Michal Simek, Ing. (M.Eng)
PetaLogix - Linux Solutions for a Reconfigurable World
w: www.petalogix.com p: +61-7-30090663,+42-0-721842854 f: +61-7-30090663
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists