is there a software or lib that visualizes generated assembly (preferred) or C++/C code to a directed graph, witch in turn shows the paths of execution. Something similar like the example in the picture (This is from Godbolt.) .

Thanks for any suggestions.

enter image description here

(Update) I want the assembly code to be divided into blocks, and the function calls to be represented in a graph format. This would resemble an assembly compilation cycle graph. The issue lies in the inlines and attributes from GCC/G++, which create various shortcuts, leading to significant loss of clarity. Optimization exacerbates the problem, making it even more obscure. However, with the right adjustments in the code and the use of volatile, assembly instructions, the assembly code would become more understandable.

1 Answer 1


If you are using Linux, then GCOV springs to mind. Then you want a GUI to display the results, and I Gcovr might be what you want.

Is this what you are after? As you can see, every line except line 7 is executed (1 time).

enter image description here

As you can see here, it shows how many times each line is executed: enter image description here

  • 2
    Hm ok, but this does not give me a graph of execution. But I did not know that GCOV is able to do this. This is one more item that could help. Commented Feb 10, 2020 at 13:20
  • What are you looking for? Something like a call tree?
    – Mawg
    Commented Feb 10, 2020 at 14:07
  • 1
    What I want is the same thing that godbolt gives you when you ask for the graph visualization. Just I do not want mine code to be on Godbolt. Commented Feb 10, 2020 at 15:09
  • 1
    My idea is people are working with different things so they can brainstorm maybe they have a good idea. Yours is also not bad. Commented Feb 13, 2020 at 15:37
  • 1
    I have marked this question as a favourite; I hope that you get an answer - so that I can use it too :-)
    – Mawg
    Commented Feb 14, 2020 at 6:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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