|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?注册
x
[这个贴子最后由newcfd在 2007/11/10 06:35am 第 1 次编辑]
In order to optimize the code, people need to know where the code uses most CPU time.
gprof can be used to find that out. Steps to use it:
1. add option -pg to CFLAGS, CXXFLAGS and LINK in make file
2. make clean and recompile your code
3. run your code(for example solver) and you will get a file gmon.out
4. type command "gprof solver | less" to see the info |
|