2010-05-25 67 views
2

我正在尝试使用oprofile生成调用图。 编译器是g ++,平台是linux x86-64,链接器是gfortranoprofile无法生成调用图

C++代码是用-fno-omit-frame-pointer编译的。 oprofile以--callgraph = 25开头。 报告我用--callgraph运行。

调用图中产生,但它仅包括自我的时间,这是没有多大用处

我失去了什么?

+0

你是否将'-g'传递给编译器? – 2010-05-25 17:51:08

+0

@Paul是的,链接器和编译器得到-g。我也可以生成带注释的代码 – Anycorn 2010-05-25 17:54:21

+0

FWIW:这里是我的观点,即调用图可能不是你所需要的:http://stackoverflow.com/questions/1777556/alternatives-to-gprof/1779343#1779343 – 2010-05-25 18:30:30

回答

2

检查opcontrol --status没有

Call-graph depth: 0 
在其输出

。如果是,请停止分析,执行opcontrol --callgraph=<desired call stack depth>,然后重新启动分析。