1

On Debian GNU/Linux, I need a nice callgraph from a C++ code. I would like to better understand the structure of the code, the time or number of calls and all others useful informations.

I tried "Scitools Understand" but it gives not pretty results and it is difficult to use.

I was told too the combination Doxygen + GraphViz but in my code, I have only one defined class and I have doubts it should help me to understand better the code.

My code exists in 2 versions : a GNU g++ version with OpenMP and many Maths GNU libraries. A second version uses icpc Intel compiler with Intel SDK with LAPACKE and MKL.

For the moment, everything is launched in terminal command line (first a Python script that sets up all the initialization part and finally compiles with gnu g++ or Intel icpc) the main code.

I mostly need to make as best as possible a "reverse engineering" process even if I know already the equations used but I need to know how they have been implemented (a lot of inner loops with if conditions as usually to build different matrices).

If someone could give me examples of existing tools or command lines for this goal. I am rather more comfortable with direct command lines, I would like to avoid a big graphical software.

1
  • I think that with doxygen you can start, it is reasonable easy. Just set EXTRACT_ALL=YES, HAVE_DOT=YES, CALL_GRAPH+YES and CALLER_GRAPH=YES and run it over the code. Later on you can fine tune it by means of other settings.
    – albert
    Oct 24 '21 at 14:11
0

Have you tried using Eclipse's callgraph functionality?

Codevis might work for you too.

https://www.eclipse.org/linuxtools/projectPages/callgraph/

https://github.com/jmarkowski/codeviz

1
  • Your answer could be improved with additional supporting information. Please edit to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers in the help center.
    – Community Bot
    Nov 11 '21 at 18:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.