callgraph not working

"enrico ." <[email protected]>
Newsgroups gmane.linux.oprofile
Message-ID <VI1PR0201MB18531D74DEBC184997497E05B1B00@VI1PR0201MB1853.eurprd02.prod.outlook.com>
Dear all,
I am encountering a problem when trying to produce a callgraph on Debian 8, on an x86_64 machine.
The problem is basically what is described here: https://sourceforge.net/p/oprofile/mailman/message/24408843/

Basically I cannot produce a callgraph. The solution proposed in the thread I linked (i.e. compiling with the -fno-omit-frame-pointer) does not seem to help.

The symptoms: running `operf ./foo` and then `opreport -cl ./foo` outputs a callgraph made of single calls, with no depth (like in the thread linked above).
Running `operf --callgraph ./foo` and then `opreport -cl ./foo` outputs "get_symbol_by_filepos: no symbols at all?" and aborts.
In both cases, `opreport -l ./foo` works fine and finds the right symbols.

I copy below my test program, which I compiled with gcc 4.9.2 on Debian 8, both with `gcc -fno-omit-frame-pointer -g foo.cpp` and `gcc -O0 -g foo.cpp`,
with the results described above.

Cheers,
blue


##### foo.cpp  #######
void loop(unsigned int n) {
   for(unsigned int i=0; i<n; ++i);
   return;
}

void slow_f() {
   for(unsigned int i=0; i<1000000000; ++i);
   loop(1000000000);
   return;
}

int main() {
   slow_f();
   return 0;
}

------------------------------------------------------------------------------

_______________________________________________
oprofile-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/oprofile-list
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.