I got this response from Robert, the root cause sounds plausible (amd64 vs i386 not preserving ecx). Any chance of an MFC? I see one is pending in the PR. If I can test and verify the change I could MFC. -------- Original Message -------- Subject: Profiling on FreeBSD Date: Wed, 5 Nov 2008 08:47:37 +1100 From: Robert Jenssen <robertjenssen@ozemail.com.au> To: bms@incunabulum.net Hi, GCC 4 gprof profiling for i386 has been broken on FreeBSD for quite a while. See PR bin/119709. It appears that the fix has been MFC'd recently: $FreeBSD: src/sys/i386/include/profile.h,v 1.42.2.1 2008/10/13 12:45:18 kib Exp $ (I've been successfully using gprof by patching using the code in the PR but haven't rebuilt my system with the above change) Is there a similar problem for AMD64? Cheers, Rob Jenssen