Date: Wed, 04 Jul 2007 20:30:05 -0700 From: Garrett Cooper <youshi10@u.washington.edu> To: current@freebsd.org Subject: Can't profile automatically on x86/amd64 (after gcc 3.4.6 -> 4.2 upgrade?) Message-ID: <468C65BD.6050007@u.washington.edu>
next in thread | raw e-mail | index | archive | help
I don't know why but it appears that I can't automatically profile programs compiled with -pg. I've tried compensating by using clock_gettime(2), but I believe my energies can be better focused elsewhere instead of entering in a slew of printf(2) statements, by using gprof(1). When I try and use -pg under x86, the compiled program segfaults and when I try and backtrace the binary it segfaults and there appears to be an infinite recursion problem, then it dies at a point when it can't access the memory address: Program received signal SIGSEGV, Segmentation fault. 0x080506b4 in ?? () (gdb) bt #0 0x080506b4 in ?? () #1 0x33cb8a00 in ?? () #2 0x33d3a951 in ?? () #3 0xbfbfeb38 in ?? () #4 0x33c91530 in ?? () #5 0x00000007 in ?? () #6 0x33cb71c0 in ?? () #7 0xbfbfeacc in ?? () // etc ... #1350 0x90feeb80 in ?? () #1351 0xbfbfed28 in ?? () #1352 0x00000001 in ?? () #1353 0xbfbfed30 in ?? () #1354 0x00000013 in ?? () Error accessing memory address 0xbfc00000: Bad address. When I try and do the same under amd64, gprof(1) says "bad format" (an error attributed to bfd(1) not being able to decypher the bin info of the .gmon file). -Garrett
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?468C65BD.6050007>