1. vi test.c
2. gcc -o test test.c -g -pg
3. ./test (执行这步可生成 gmon.out)
4. gprof test gmon.out > gprof.log (因为内容比较多,故我们让它重定向到一文件里,文件名任意)
关于gprof系统性能查看工具的简单使用
最新推荐文章于 2022-03-16 18:22:18 发布
1. vi test.c
2. gcc -o test test.c -g -pg
3. ./test (执行这步可生成 gmon.out)
4. gprof test gmon.out > gprof.log (因为内容比较多,故我们让它重定向到一文件里,文件名任意)