From owner-freebsd-toolchain@FreeBSD.ORG Tue Jan 18 15:19:17 2011 Return-Path: Delivered-To: freebsd-toolchain@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F14D4106564A for ; Tue, 18 Jan 2011 15:19:17 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.zoral.com.ua (mx0.zoral.com.ua [91.193.166.200]) by mx1.freebsd.org (Postfix) with ESMTP id 44BBD8FC0A for ; Tue, 18 Jan 2011 15:19:16 +0000 (UTC) Received: from deviant.kiev.zoral.com.ua (root@deviant.kiev.zoral.com.ua [10.1.1.148]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id p0IEhDwk070023 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 18 Jan 2011 16:43:13 +0200 (EET) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.4/8.14.4) with ESMTP id p0IEhDo1085776; Tue, 18 Jan 2011 16:43:13 +0200 (EET) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.4/8.14.4/Submit) id p0IEhDnF085775; Tue, 18 Jan 2011 16:43:13 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Tue, 18 Jan 2011 16:43:13 +0200 From: Kostik Belousov To: Roman Divacky Message-ID: <20110118144313.GO2518@deviant.kiev.zoral.com.ua> References: <20110117184411.GA54556@troutmask.apl.washington.edu> <20110118143205.GA34216@freebsd.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="8lT/blNmSiRvUClR" Content-Disposition: inline In-Reply-To: <20110118143205.GA34216@freebsd.org> User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: clamav-milter 0.95.2 at skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-3.4 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, DNS_FROM_OPENWHOIS autolearn=no version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua Cc: freebsd-toolchain@freebsd.org, Steve Kargl Subject: Re: How to build an executable with profiling? X-BeenThere: freebsd-toolchain@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Maintenance of FreeBSD's integrated toolchain List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Jan 2011 15:19:18 -0000 --8lT/blNmSiRvUClR Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Jan 18, 2011 at 03:32:05PM +0100, Roman Divacky wrote: > On Mon, Jan 17, 2011 at 10:44:11AM -0800, Steve Kargl wrote: > > How does one build an executable for profiling with clang? > =20 > LLVM (and thus clang) does not support GPROF profiling.=20 >=20 > > clang -o testf -O2 -march=3Dnative -pipe -static -pg -I/usr/local/inclu= de -I../mp testf.c -L/usr/local/lib -L../mp -lsgk -lmpfr -lgmp -L/usr/home/= kargl/work/lib -lm_clang_p > > clang: warning: the clang compiler does not support '-pg' > >=20 > > I suppose it will be pointless to ask, but shouldn't clang > > support one of the most basic gcc compiler options if clang > > is to replace gcc as the base system compiler? >=20 > is GPROF really needed at this point? we have HWPMC, isnt > it sufficient? Hwpmc requires additional work for each new CPU model. Also, hwpmc is not supported even on all Intel or AMD CPUs, esp. older models, and e.g. VIA cores. Not to mention !x86 architectures. --8lT/blNmSiRvUClR Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (FreeBSD) iEYEARECAAYFAk01pwEACgkQC3+MBN1Mb4jOAQCcDN9NMwDccY3EEPsuvT7VQVlD OlAAoKkqq42q0WR9R31sY2twr8oYqoH/ =lL3s -----END PGP SIGNATURE----- --8lT/blNmSiRvUClR--