Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 4 May 1997 13:32:57 +0200 (CEST)
From:      Andreas Klemm <andreas@klemm.gtn.com>
To:        FreeBSD-gnats-submit@FreeBSD.ORG
Subject:   kern/3491: kernel profiling broken with SMP kernel
Message-ID:  <199705041132.NAA19872@klemm.gtn.com>
Resent-Message-ID: <199705041130.EAA20575@hub.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         3491
>Category:       kern
>Synopsis:       SMP kernel, profiling broken, prof_machdep.c: i586_ctr_freq undeclared
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun May  4 04:30:01 PDT 1997
>Last-Modified:
>Originator:     Andreas Klemm
>Organization:
>Release:        FreeBSD 3.0-CURRENT i386
>Environment:

	FreeBSD-current of today

>Description:

Tried to create a kernel with enhanced profiling support.

	config -pp BISDNSMP

Compilation stops with this error:

cc -c -O -pipe -Wreturn-type -Wcomment -Wredundant-decls -Wimplicit  -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes  -Wpointer-arith  -nostdinc -I- -I. -I../.. -I/usr/include -DGPROF -DTELES_HAS_MEMCPYB -DMD5 -DCOMPAT_43 -DNSWAPDEV=3 -DCD9660 -DMSDOSFS -DMFS -DNFS -DFFS -DINET -DSMP_INVLTLB -DGPROF4 -DGUPROF -DKERNEL -include opt_global.h -DMAXUSERS=64 ../../i386/isa/prof_machdep.c
../../i386/isa/prof_machdep.c: In function `startguprof':
../../i386/isa/prof_machdep.c:238: `i586_ctr_freq' undeclared (first use this function)
../../i386/isa/prof_machdep.c:238: (Each undeclared identifier is reported only once
../../i386/isa/prof_machdep.c:238: for each function it appears in.)
*** Error code 1

>How-To-Repeat:

	Simply try to build a kernel with profiling support

>Fix:
	
Browsed through .../isa/clock.c
Seems to be ifdef'ed out for the SMP case ... Why ?

[...snip...]
#if (defined(I586_CPU) || defined(I686_CPU)) && !defined(SMP)
u_int	i586_ctr_bias;
u_int	i586_ctr_comultiplier;
u_int	i586_ctr_freq;
u_int	i586_ctr_multiplier;
#endif
[...snip...]
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199705041132.NAA19872>