如何比较几个GPROF探查报告? [英] How to compare several Gprof profiler reports?
问题描述
在使用不同的参数值,我的C程序的多个运行,我得到多个分析报告文件。这是太难看了,并进行比较。
In multiple run of my C program with different parameter values, I get multiple profiling report files. This is too difficult to read and compare.
有没有一种方法,我可以得到一个比较文件,preferably用图表显示,性能如何增加或减少的大小增加(即我在运行时传递参数)。
Is there a way I can get a comparison file, preferably with graphs to show , how the performance increased or decreased as the size (the parameter that i am passing at the run time ) is increased.
推荐答案
尝试PERF(1)工具。
Try perf(1) tool.
perf record ./yourbinary
perf record ./yourbinary-v2
perf diff
有编译器选项-O0 -g -ggdb着使二进制文件的时候是会经常试图理解为什么这个VS该版本具有性能上的差异时提供帮助。
Having compiler options "-O0 -g -ggdb" around when making binaries is will often help when trying to understand why this vs that version have performance difference.
这篇关于如何比较几个GPROF探查报告?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!