Apache gprof给出了侏儒误差
我使用Apache gprof给出了侏儒误差,apache,gcc,debian,gprof,dwarf,Apache,Gcc,Debian,Gprof,Dwarf,我使用gcc选项在不同的服务器上编译了我的apache2 -pg -DGPROF -g -DNO_USE_SIGACTION 我将这个apache2二进制文件复制到不同的服务器并执行了一次,得到了gmon.out 但在使用命令创建分析文件时 gprof /usr/sbin/apache2 /gmon.out > /tmp/apa.txt 我得到以下几行错误 BFD: Dwarf Error: found dwarf version '4', this reader only handl
gcc
选项在不同的服务器上编译了我的apache2
-pg -DGPROF -g -DNO_USE_SIGACTION
我将这个apache2二进制文件复制到不同的服务器并执行了一次,得到了gmon.out
但在使用命令创建分析文件时
gprof /usr/sbin/apache2 /gmon.out > /tmp/apa.txt
我得到以下几行错误
BFD: Dwarf Error: found dwarf version '4', this reader only handles version 2 and 3 information.
BFD: Dwarf Error: found dwarf version '0', this reader only handles version 2 and 3 information.
BFD: Dwarf Error: found dwarf version '715', this reader only handles version 2 and 3 information.
BFD: Dwarf Error: found dwarf version '59393', this reader only handles version 2 and 3 information.
大约有100行类似的错误如何消除此问题以生成gprof分析文件?
编译操作系统:
cat /etc/debian_version
6.0.7
gcc version 4.8.1 (crosstool-NG 1.19.0)
执行操作系统:
cat /etc/debian_version
6.0.8
您有一个较新版本的GCC,但听起来您有一个稍旧版本的gprof 一个修复方法是构建并安装自己的gprof。这并不难 另一个修复方法是使用“-gdwarf-3”进行重建,这将告诉GCC使用DWARF 3