From 5464d4dc61a6bf55568746b3bd67ae317ba50a30 Mon Sep 17 00:00:00 2001 From: dsl Date: Thu, 24 Aug 2006 21:23:40 +0000 Subject: [PATCH] Create a linker map file. Very useful when trying to find out where recent 'bloat' has come from, as well as giving exact details of what is actually in the kernel. --- sys/conf/Makefile.kern.inc | 6 +++--- sys/conf/files | 9 ++++++++- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/sys/conf/Makefile.kern.inc b/sys/conf/Makefile.kern.inc index d6149718480e..b4235ffaf8ea 100644 --- a/sys/conf/Makefile.kern.inc +++ b/sys/conf/Makefile.kern.inc @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.kern.inc,v 1.82 2006/06/02 22:16:18 mrg Exp $ +# $NetBSD: Makefile.kern.inc,v 1.83 2006/08/24 21:23:40 dsl Exp $ # # This file contains common `MI' targets and definitions and it is included # at the bottom of each `MD' ${MACHINE}/conf/Makefile.${MACHINE}. @@ -177,8 +177,8 @@ SYSTEM_DEP?= Makefile ${SYSTEM_OBJ:O} .gdbinit SYSTEM_LD_HEAD?=@rm -f $@ SYSTEM_LD?= @${_MKSHMSG} " link ${.CURDIR:T}/${.TARGET}"; \ ${_MKSHECHO}\ - ${LD} ${LINKFLAGS} -o $@ '$${SYSTEM_OBJ}' '$${EXTRA_OBJ}' vers.o; \ - ${LD} ${LINKFLAGS} -o $@ ${SYSTEM_OBJ} ${EXTRA_OBJ} vers.o + ${LD} -Map $@.map --cref ${LINKFLAGS} -o $@ '$${SYSTEM_OBJ}' '$${EXTRA_OBJ}' vers.o; \ + ${LD} -Map $@.map --cref ${LINKFLAGS} -o $@ ${SYSTEM_OBJ} ${EXTRA_OBJ} vers.o SYSTEM_LD_TAIL?=@${SIZE} $@; chmod 755 $@ TEXTADDR?= ${LOADADDRESS} # backwards compatibility diff --git a/sys/conf/files b/sys/conf/files index 683b2dac95c9..0b53514e94af 100644 --- a/sys/conf/files +++ b/sys/conf/files @@ -1,4 +1,4 @@ -# $NetBSD: files,v 1.793 2006/08/05 17:20:54 pavel Exp $ +# $NetBSD: files,v 1.794 2006/08/24 21:23:40 dsl Exp $ # @(#)files.newconf 7.5 (Berkeley) 5/10/93 @@ -76,6 +76,13 @@ defflag opt_veriexec.h VERIFIED_EXEC_FP_SHA1 VERIFIED_EXEC_FP_MD5 VERIFIED_EXEC_FP_RMD160 +# Per system call number counts and times +defflag opt_syscall_stats.h SYSCALL_STATS +defflag opt_syscall_stats.h SYSCALL_TIMES: SYSCALL_STATS +# Assume cpu_hascounter() returns true - to use disabled rdtsc() (for soekris) +defflag opt_syscall_stats.h SYSCALL_TIMES_HASCOUNTER: SYSCALL_TIMES +file kern/subr_syscall_stats.c syscall_stats + defparam opt_pax.h PAX_MPROTECT defflag opt_fileassoc.h FILEASSOC