From owner-freebsd-bugs Sun May 4 04:30:03 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id EAA20582 for bugs-outgoing; Sun, 4 May 1997 04:30:03 -0700 (PDT) Received: (from gnats@localhost) by hub.freebsd.org (8.8.5/8.8.5) id EAA20575; Sun, 4 May 1997 04:30:02 -0700 (PDT) Resent-Date: Sun, 4 May 1997 04:30:02 -0700 (PDT) Resent-Message-Id: <199705041130.EAA20575@hub.freebsd.org> Resent-From: gnats (GNATS Management) Resent-To: freebsd-bugs Resent-Reply-To: FreeBSD-gnats@FreeBSD.ORG, andreas@klemm.gtn.com Received: from news1.gtn.com (news1.gtn.com [194.77.0.15]) by hub.freebsd.org (8.8.5/8.8.5) with ESMTP id EAA20350 for ; Sun, 4 May 1997 04:21:18 -0700 (PDT) Received: (from uucp@localhost) by news1.gtn.com (8.7.2/8.7.2) with UUCP id NAA06052 for FreeBSD-gnats-submit@freebsd.org; Sun, 4 May 1997 13:15:22 +0200 (MET DST) Received: (from andreas@localhost) by klemm.gtn.com (8.8.5/8.8.2) id NAA19872; Sun, 4 May 1997 13:32:57 +0200 (CEST) Message-Id: <199705041132.NAA19872@klemm.gtn.com> Date: Sun, 4 May 1997 13:32:57 +0200 (CEST) From: Andreas Klemm Reply-To: andreas@klemm.gtn.com To: FreeBSD-gnats-submit@FreeBSD.ORG X-Send-Pr-Version: 3.2 Subject: kern/3491: kernel profiling broken with SMP kernel Sender: owner-bugs@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk >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: