【发布时间】:2014-07-28 00:30:30
【问题描述】:
我正在使用gperftools 来分析我的 C 代码。结果我无法使用pprof 应用程序分析配置文件。
$ gcc -g prog.c -o prog -lprofiler
$ export CPUPROFILE=info.prof
$ ./prog
Inside main()
Inside func1
Inside new_func1()
Inside func2
PROFILE: interrupts/evictions/bytes = 1133/0/300
$ ls
info.prof prog prog.c
$ ls -lah info.prof
-rw-rw-r-- 1 mm mm 2.6K Jun 6 09:36 info.prof
$ pprof info.prof prog
Reading Profile files in profile.*
Error: Could not open profile.0.0.0: No such file or directory
profile.ftab: No such file or directory
$
我做错了什么? profile.ftab 文件是什么?
【问题讨论】:
-
不是反过来吗
pprof ./prog info.prof? -
不,pprof ./prog info.prof 命令也不起作用。
-
错误信息长什么样?
-
类似:读取配置文件中的配置文件。*错误:无法打开配置文件。0.0.0:没有这样的文件或目录 profile.ftab:没有这样的文件或目录
标签: c profiling gperftools