Date: Fri, 30 Nov 2007 12:10:56 -0800 From: Garrett Cooper <youshi10@u.washington.edu> To: freebsd-current@FreeBSD.org Subject: Re: gprof's broken in 7-CURRENT Message-ID: <47506E50.7040808@u.washington.edu> In-Reply-To: <474F78AE.5070107@u.washington.edu> References: <200711292024.lATKOq5R000769@freefall.freebsd.org> <20071129233842.GA57951@ace.netcins.ceid.upatras.gr> <474F78AE.5070107@u.washington.edu>
next in thread | previous in thread | raw e-mail | index | archive | help
Garrett Cooper wrote:
> Nikos Ntarmos wrote:
>> -----BEGIN PGP SIGNED MESSAGE-----
>> Hash: SHA1
>>
>> On Thu, Nov 29, 2007 at 08:24:52PM +0000, Luoqi Chen wrote:
>>
>>>> And to think that I mentioned this problem 5-6 months ago with gcc
>>>> 4.2.x and now it finally gets publicity...
>>>>
>>> Did I just hear someone volunteered to be a guinea pig?
>>>
>>> Garrett, would you like to try out my fix? It's actually quite simple,
>>>
>>>
>> [...]
>>
>>> This file is in the kernel tree, but the change only affects libc
>>> build.
>>> If you don't want to redo a world build, you may copy the patched
>>> profile.h
>>> to /usr/include/machine and "make all install" inside
>>> /usr/src/lib/libc.
>>> Then re-link -pg compiled code and try it out.
>>>
>>
>> Hi again.
>>
>> I couldn't wait for Garrett :) so I went on and tested your patch and
>> gprof seems to work fine for me (at least for the executables I was
>> interested in profiling anyway). This is i386 on a 7.0-BETA3 kernel and
>> 7.0-BETA1 world. What are the chances for this to be committed in time
>> for 7.0R?
>>
>> Thanks.
>>
>> \n\n
>> -----BEGIN PGP SIGNATURE-----
>> Version: GnuPG v2.0.4 (FreeBSD)
>> Comment: Nikos Ntarmos <ntarmos@ceid.upatras.gr>
>>
>> iD8DBQFHT02Cm6J1ac+VFgoRAnaVAJ9n/WZY2nJU4Ym5qUFOBvg38p0lXQCfYDwT
>> moIVew3+UhMLXLuJGEZd6HM=
>> =J8RG
>> -----END PGP SIGNATURE-----
>>
> I'll be sure to give it a toss when I get back home. I'd expect a
> reply sometime tomorrow morning (PST)..
> Thanks again for all of your work!
> -Garrett
Still doesn't work with pkg_install, unless I'm doing something
incorrectly. Says something like '{blah} not in executable format' when
I try and execute gprof as follows:
gprof pkg_info.gmon
I think I chased this problem down to an inconsistency with GNU
binutils before, but please note that I haven't had an opportunity to
update my system for ~2 months (don't have direct access to the
Internet; have to traffic files back and forth via my iBook and I've
been busy lately with other things..).
So I'm running 8-CURRENT, updated as of sometime 3rd week of October..
Also, depending on what you're trying to compile for profiling
purposes, you will have to recompile all dependent libraries, not just
libc. I had to recompile libfetch and libarchive for pkg_install,
otherwise stuff segfaulted and coredumped every time I ran the profiled
apps.
Thanks,
-Garrett
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?47506E50.7040808>
