From owner-freebsd-questions@FreeBSD.ORG Thu Apr 18 19:41:10 2013 Return-Path: Delivered-To: questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 4D631E1E for ; Thu, 18 Apr 2013 19:41:10 +0000 (UTC) (envelope-from cswiger@mac.com) Received: from st11p05mm-asmtp005.mac.com (st11p05mm-asmtpout005.mac.com [17.172.108.250]) by mx1.freebsd.org (Postfix) with ESMTP id 291AB1805 for ; Thu, 18 Apr 2013 19:41:09 +0000 (UTC) Received: from cswiger1.apple.com (unknown [17.209.4.71]) by st11p05mm-asmtp005.mac.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Jan 3 2012)) with ESMTPSA id <0MLG005DIRW6O540@st11p05mm-asmtp005.mac.com> for questions@freebsd.org; Thu, 18 Apr 2013 18:40:56 +0000 (GMT) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:5.10.8626,1.0.431,0.0.0000 definitions=2013-04-18_07:2013-04-18,2013-04-18,1970-01-01 signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 ipscore=0 suspectscore=0 phishscore=0 bulkscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=6.0.2-1302030000 definitions=main-1304180153 Content-type: text/plain; charset=us-ascii MIME-version: 1.0 (Mac OS X Mail 6.3 \(1503\)) Subject: Re: Profiling a dlopened library From: Charles Swiger In-reply-to: Date: Thu, 18 Apr 2013 11:35:59 -0700 Content-transfer-encoding: 7bit Message-id: <8B2E2C65-06B2-48A4-8C9E-32D07109111A@mac.com> References: To: Niklaus X-Mailer: Apple Mail (2.1503) Cc: questions@freebsd.org X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Apr 2013 19:41:10 -0000 Hi-- On Apr 18, 2013, at 11:21 AM, Niklaus wrote: > How do i profile a library which is dlopened from an executable. > The executable and the library are compiled with -g using gcc . Can > somone tell me tool that would profile it at runtime. For gprof-style profiling, you'll need to build with -pg in addition. Regards, -- -Chuck