How to compare several Gprof profiler reports?

旧城冷巷雨未停 提交于 2019-12-13 06:24:26

问题


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.

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.


回答1:


Try perf(1) tool.

perf record ./yourbinary
perf record ./yourbinary-v2
perf diff

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.



来源:https://stackoverflow.com/questions/21204407/how-to-compare-several-gprof-profiler-reports

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!