[prev in list] [next in list] [prev in thread] [next in thread]
List: ltp-cvs
Subject: [Ltp-cvs] utils/analysis/gcov-kernel
From: Peter Oberparleiter <oberpapr () users ! sourceforge ! net>
Date: 2008-01-30 12:46:24
Message-ID: E1JKCKf-0008CO-RU () mail ! sourceforge ! net
[Download RAW message or body]
Update of /cvsroot/ltp/utils/analysis/gcov-kernel
In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv23123
Added Files:
linux-2.6.24-gcov-arm-eabi.patch
linux-2.6.24-gcov-arm-hack.patch linux-2.6.24-gcov.patch
Log Message:
added gcov-kernel patches for linux-2.6.24
--- NEW FILE: linux-2.6.24-gcov.patch ---
#
# gcov-kernel-2.6.24-1 (2008-01-30)
# Provides GCOV code coverage infrastructure for Linux kernel 2.6.24.
# See http://ltp.sourceforge.net/coverage/gcov.php for details.
#
# Makefile | 19
# Makefile | 19
# arch/arm/boot/compressed/Makefile | 1
# arch/powerpc/kernel/vmlinux.lds.S | 4
# arch/ppc/boot/Makefile | 2
# arch/ppc/boot/common/misc-common.c | 4
# arch/ppc/boot/simple/misc-prep.c | 4
# include/asm-generic/vmlinux.lds.h | 17
# include/linux/gcov.h | 243 +++
# include/linux/module.h | 4
# kernel/Makefile | 1
# kernel/gcov/Kconfig | 55
# kernel/gcov/Makefile | 13
# kernel/gcov/gcov-core.c | 295 +++
[...3056 lines suppressed...]
--- linux-2.6.24/scripts/Makefile.lib 2008-01-24 23:58:37.000000000 +0100
+++ linux-2.6.24-gcov/scripts/Makefile.lib 2008-01-29 13:50:42.000000000 +0100
@@ -97,7 +97,7 @@ _cpp_flags = $(KBUILD_CPPFLAGS) $(cp
# If building the kernel in a separate objtree expand all occurrences
# of -Idir to -I$(srctree)/dir except for absolute paths (starting with '/').
-ifeq ($(KBUILD_SRC),)
+ifeq ($(KBUILD_SRC)$(CONFIG_GCOV_PROFILE),)
__c_flags = $(_c_flags)
__a_flags = $(_a_flags)
__cpp_flags = $(_cpp_flags)
@@ -107,7 +107,7 @@ else
# $(call addtree,-I$(obj)) locates .h files in srctree, from generated .c files
# and locates generated .h files
# FIXME: Replace both with specific CFLAGS* statements in the makefiles
-__c_flags = $(call addtree,-I$(obj)) $(call flags,_c_flags)
+__c_flags = $(call addtree,-I$(obj)) $(call addtree2,-I$(obj)) $(call \
flags,_c_flags) __a_flags = $(call flags,_a_flags)
__cpp_flags = $(call flags,_cpp_flags)
endif
--- NEW FILE: linux-2.6.24-gcov-arm-hack.patch ---
#
# gcov-kernel-2.6.24-1 (2008-01-30)
#
# anderson.lizardo@gmail.com:
# The following parts of the kernel code had coverage disabled by
# default for now (on ARM platform only) because they consistently cause
# kernel problems:
#
# arch/arm/nwfpe/: make FP operations results go wrong
# fs/: soft lockup at the end of kernel boot
# fs/nfs/: generates BUG_ON() in net/sunrpc/xdr.c when mounting NFS root
# lib/: kernel hangs right after decompression
# mm/: many commands fail with "File size limit exceeded"
# net/ipv4/: NFS root mount fails
#
# TODO: find the specific problematic .c files files in these
# directories and either (a) fix the buggy code or (b) disable coverage
# for those specific file(s) using "CFLAGS_file.o".
#
# arch/arm/nwfpe/Makefile | 3 +++
# arch/arm/nwfpe/Makefile | 3 +++
# fs/Makefile | 3 +++
# fs/nfs/Makefile | 3 +++
# lib/Makefile | 3 +++
# mm/Makefile | 3 +++
# net/ipv4/Makefile | 3 +++
# 6 files changed, 18 insertions(+)
#
diff -Naurp linux-2.6.24-gcov/arch/arm/nwfpe/Makefile \
linux-2.6.24-gcov-arm-hack/arch/arm/nwfpe/Makefile
--- linux-2.6.24-gcov/arch/arm/nwfpe/Makefile 2008-01-24 23:58:37.000000000 +0100
+++ linux-2.6.24-gcov-arm-hack/arch/arm/nwfpe/Makefile 2008-01-30 10:51:45.000000000 \
+0100 @@ -1,6 +1,9 @@
#
# Copyright (C) 1998, 1999, 2001 Philip Blundell
#
+ifeq ($(CONFIG_ARM),y)
+KBUILD_CFLAGS := $(KBUILD_CFLAGS_NOGCOV)
+endif
obj-$(CONFIG_FPE_NWFPE) += nwfpe.o
diff -Naurp linux-2.6.24-gcov/fs/Makefile linux-2.6.24-gcov-arm-hack/fs/Makefile
--- linux-2.6.24-gcov/fs/Makefile 2008-01-24 23:58:37.000000000 +0100
+++ linux-2.6.24-gcov-arm-hack/fs/Makefile 2008-01-30 10:52:06.000000000 +0100
@@ -4,6 +4,9 @@
# 14 Sep 2000, Christoph Hellwig <hch@infradead.org>
# Rewritten to use lists instead of if-statements.
#
+ifeq ($(CONFIG_ARM),y)
+KBUILD_CFLAGS := $(KBUILD_CFLAGS_NOGCOV)
+endif
obj-y := open.o read_write.o file_table.o super.o \
char_dev.o stat.o exec.o pipe.o namei.o fcntl.o \
diff -Naurp linux-2.6.24-gcov/fs/nfs/Makefile \
linux-2.6.24-gcov-arm-hack/fs/nfs/Makefile
--- linux-2.6.24-gcov/fs/nfs/Makefile 2008-01-24 23:58:37.000000000 +0100
+++ linux-2.6.24-gcov-arm-hack/fs/nfs/Makefile 2008-01-30 10:54:18.000000000 +0100
@@ -1,6 +1,9 @@
#
# Makefile for the Linux nfs filesystem routines.
#
+ifeq ($(CONFIG_ARM),y)
+KBUILD_CFLAGS := $(KBUILD_CFLAGS_NOGCOV)
+endif
obj-$(CONFIG_NFS_FS) += nfs.o
diff -Naurp linux-2.6.24-gcov/lib/Makefile linux-2.6.24-gcov-arm-hack/lib/Makefile
--- linux-2.6.24-gcov/lib/Makefile 2008-01-24 23:58:37.000000000 +0100
+++ linux-2.6.24-gcov-arm-hack/lib/Makefile 2008-01-30 10:52:18.000000000 +0100
@@ -1,6 +1,9 @@
#
# Makefile for some libs needed in the kernel.
#
+ifeq ($(CONFIG_ARM),y)
+KBUILD_CFLAGS := $(KBUILD_CFLAGS_NOGCOV)
+endif
lib-y := ctype.o string.o vsprintf.o cmdline.o \
rbtree.o radix-tree.o dump_stack.o \
diff -Naurp linux-2.6.24-gcov/mm/Makefile linux-2.6.24-gcov-arm-hack/mm/Makefile
--- linux-2.6.24-gcov/mm/Makefile 2008-01-24 23:58:37.000000000 +0100
+++ linux-2.6.24-gcov-arm-hack/mm/Makefile 2008-01-30 10:52:31.000000000 +0100
@@ -1,6 +1,9 @@
#
# Makefile for the linux memory manager.
#
+ifeq ($(CONFIG_ARM),y)
+KBUILD_CFLAGS := $(KBUILD_CFLAGS_NOGCOV)
+endif
mmu-y := nommu.o
mmu-$(CONFIG_MMU) := fremap.o highmem.o madvise.o memory.o mincore.o \
diff -Naurp linux-2.6.24-gcov/net/ipv4/Makefile \
linux-2.6.24-gcov-arm-hack/net/ipv4/Makefile
--- linux-2.6.24-gcov/net/ipv4/Makefile 2008-01-24 23:58:37.000000000 +0100
+++ linux-2.6.24-gcov-arm-hack/net/ipv4/Makefile 2008-01-30 10:52:45.000000000 +0100
@@ -1,6 +1,9 @@
#
# Makefile for the Linux TCP/IP (INET) layer.
#
+ifeq ($(CONFIG_ARM),y)
+KBUILD_CFLAGS := $(KBUILD_CFLAGS_NOGCOV)
+endif
obj-y := route.o inetpeer.o protocol.o \
ip_input.o ip_fragment.o ip_forward.o ip_options.o \
--- NEW FILE: linux-2.6.24-gcov-arm-eabi.patch ---
#
# gcov-kernel-2.6.24-1 (2008-01-30)
#
# rgottimu@qualcomm.com:
# We use GCC from Codesourcery, which is EABI compliant. It uses
# .init_array instead of .ctors for static constructors. It is a
# convention for C++ constructors than GCC uses.
# http://gcc.gnu.org/ml/gcc-patches/2005-04/msg02328.html
#
# matkoshy007@yahoo.com:
# I faced the same issue with 2.6.18 and done the
# following changes. it works fine.
#
# arch/arm/kernel/module.c | 1 +
# arch/arm/kernel/module.c | 1 +
# include/asm-arm/elf.h | 1 +
# include/asm-generic/vmlinux.lds.h | 2 +-
# kernel/module.c | 2 +-
# 4 files changed, 4 insertions(+), 2 deletions(-)
#
diff -Naurp linux-2.6.24-gcov-arm-hack/arch/arm/kernel/module.c \
linux-2.6.24-gcov-arm-eabi/arch/arm/kernel/module.c
--- linux-2.6.24-gcov-arm-hack/arch/arm/kernel/module.c 2008-01-24 23:58:37.000000000 \
+0100
+++ linux-2.6.24-gcov-arm-eabi/arch/arm/kernel/module.c 2008-01-30 10:56:19.000000000 \
+0100 @@ -104,6 +104,7 @@ apply_relocate(Elf32_Shdr *sechdrs, cons
switch (ELF32_R_TYPE(rel->r_info)) {
case R_ARM_ABS32:
+ case R_ARM_TARGET1:
*(u32 *)loc += sym->st_value;
break;
diff -Naurp linux-2.6.24-gcov-arm-hack/include/asm-arm/elf.h \
linux-2.6.24-gcov-arm-eabi/include/asm-arm/elf.h
--- linux-2.6.24-gcov-arm-hack/include/asm-arm/elf.h 2008-01-24 23:58:37.000000000 \
+0100
+++ linux-2.6.24-gcov-arm-eabi/include/asm-arm/elf.h 2008-01-30 10:56:19.000000000 \
+0100 @@ -29,6 +29,7 @@ typedef struct user_fp elf_fpregset_t;
#define R_ARM_ABS32 2
#define R_ARM_CALL 28
#define R_ARM_JUMP24 29
+#define R_ARM_TARGET1 38
/*
* These are used to set parameters in the core dumps.
diff -Naurp linux-2.6.24-gcov-arm-hack/include/asm-generic/vmlinux.lds.h \
linux-2.6.24-gcov-arm-eabi/include/asm-generic/vmlinux.lds.h
--- linux-2.6.24-gcov-arm-hack/include/asm-generic/vmlinux.lds.h 2008-01-30 \
10:51:23.000000000 +0100
+++ linux-2.6.24-gcov-arm-eabi/include/asm-generic/vmlinux.lds.h 2008-01-30 \
10:56:19.000000000 +0100 @@ -271,7 +271,7 @@
LONG((__CTOR_END__ - __CTOR_LIST__) / \
(__CTOR_LIST2__ - __CTOR_LIST__) - 2) \
__CTOR_LIST2__ = .; \
- *(SORT(.ctors)) \
+ *(SORT(.init_array)) \
LONG(0) \
__CTOR_END__ = .; \
__DTOR_LIST__ = .; \
diff -Naurp linux-2.6.24-gcov-arm-hack/kernel/module.c \
linux-2.6.24-gcov-arm-eabi/kernel/module.c
--- linux-2.6.24-gcov-arm-hack/kernel/module.c 2008-01-30 10:51:23.000000000 +0100
+++ linux-2.6.24-gcov-arm-eabi/kernel/module.c 2008-01-30 10:56:19.000000000 +0100
@@ -1888,7 +1888,7 @@ static struct module *load_module(void _
mod = (void *)sechdrs[modindex].sh_addr;
#ifdef CONFIG_GCOV_PROFILE
- modindex = find_sec(hdr, sechdrs, secstrings, ".ctors");
+ modindex = find_sec(hdr, sechdrs, secstrings, ".init_array");
mod->ctors_start = (char *)sechdrs[modindex].sh_addr;
mod->ctors_end = (char *)(mod->ctors_start +
sechdrs[modindex].sh_size);
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Ltp-cvs mailing list
Ltp-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-cvs
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic