From e45d35c3f83859dbb0d9d7a58f1b8326d7bcb0b9 Mon Sep 17 00:00:00 2001 From: Bruce Evans Date: Sun, 29 Jan 1995 03:03:23 +0000 Subject: [PATCH] Don't waste 1264K for each MB of unused text. Remove misplaced comment. --- sys/kern/subr_prof.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/sys/kern/subr_prof.c b/sys/kern/subr_prof.c index e7e15d21ca7f..e0cdb2f191a3 100644 --- a/sys/kern/subr_prof.c +++ b/sys/kern/subr_prof.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)subr_prof.c 8.3 (Berkeley) 9/23/93 - * $Id: subr_prof.c,v 1.3 1994/08/02 07:42:32 davidg Exp $ + * $Id: subr_prof.c,v 1.4 1994/09/21 21:58:39 bde Exp $ */ #include @@ -45,11 +45,9 @@ #include #include -/* - * Froms is actually a bunch of unsigned shorts indexing tos - */ struct gmonparam _gmonparam = { GMON_PROF_OFF }; +extern char btext[]; extern char etext[]; void @@ -61,7 +59,7 @@ kmstartup() * Round lowpc and highpc to multiples of the density we're using * so the rest of the scaling (here and in gprof) stays in ints. */ - p->lowpc = ROUNDDOWN(KERNBASE, HISTFRACTION * sizeof(HISTCOUNTER)); + p->lowpc = ROUNDDOWN((u_long)btext, HISTFRACTION * sizeof(HISTCOUNTER)); p->highpc = ROUNDUP((u_long)etext, HISTFRACTION * sizeof(HISTCOUNTER)); p->textsize = p->highpc - p->lowpc; printf("Profiling kernel, textsize=%d [%x..%x]\n",