From owner-freebsd-current@FreeBSD.ORG Sun Jan 8 20:11:15 2012 Return-Path: Delivered-To: freebsd-current@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 85E741065670 for ; Sun, 8 Jan 2012 20:11:15 +0000 (UTC) (envelope-from andreast-list@fgznet.ch) Received: from smtp.fgznet.ch (mail.fgznet.ch [81.92.96.47]) by mx1.freebsd.org (Postfix) with ESMTP id 1317C8FC0A for ; Sun, 8 Jan 2012 20:11:14 +0000 (UTC) Received: from deuterium.andreas.nets (dhclient-91-190-14-19.flashcable.ch [91.190.14.19]) by smtp.fgznet.ch (8.13.8/8.13.8/Submit_SMTPAUTH) with ESMTP id q08K6hIR099827 for ; Sun, 8 Jan 2012 21:06:47 +0100 (CET) (envelope-from andreast-list@fgznet.ch) Message-ID: <4F09F85C.2060303@fgznet.ch> Date: Sun, 08 Jan 2012 21:11:08 +0100 From: Andreas Tobler User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.5; rv:8.0) Gecko/20111105 Thunderbird/8.0 MIME-Version: 1.0 To: Current Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.64 on 81.92.96.47 Cc: Subject: disable GUPROF for archs other than i386 and amd64 X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 Jan 2012 20:11:15 -0000 Hi, I'm working on profiling support for powerpc64 and I struggled over the mprofiler-epilogue option not being known on the ppc gcc. Disabling this option for ppc uncovered the next thing, MCOUNT_OVERHEAD, MEXITCOUNT_OVERHEAD and MEXITCOUNT_OVERHEAD_GETLABEL are also not defined. Not only on ppc but everywhere except on i386 and amd64. So for the time being, would it be ok if I disable GUPROF on archs other than i386 and amd64? The patch below would be a candidate. Thoughts? TIA, Andreas Index: conf/kern.pre.mk =================================================================== --- conf/kern.pre.mk (revision 229741) +++ conf/kern.pre.mk (working copy) @@ -103,13 +103,16 @@ .if defined(PROFLEVEL) && ${PROFLEVEL} >= 1 CFLAGS+= -DGPROF -falign-functions=16 +PROF= -pg .if ${PROFLEVEL} >= 2 CFLAGS+= -DGPROF4 -DGUPROF -PROF= -pg -mprofiler-epilogue +.if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64" +PROF+= -mprofiler-epilogue .else -PROF= -pg +.error "GUPROF not supported on ${MACHINE_CPUARCH}." .endif .endif +.endif DEFINED_PROF= ${PROF} # Put configuration-specific C flags last (except for ${PROF}) so that they