V
V
Vladimir Grabko2016-07-14 14:09:32
Programming
Vladimir Grabko, 2016-07-14 14:09:32

How to get a list of functions while running?

I have 3,000,000+ lines of cs code. I need to get into about 15% of all this ... I want to get a log of each function call. I could write in a couple of days in each function, printbut such a prospect does not please me. Are there ready made tools for this?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
H
HolyBlackCat, 2016-07-14
@VGrabko

If you have GCC installed, then you can look at the output of gprof (profiler). There will be a list of functions and the number of calls.
File names will have to be determined by handles, something like grep.
We collect with the -pg flag, run it, close it after a while. The logs are written to gmon.out, which we open with gprof path/to/binary path/to/gmon.out
I don't know if the same thing will work with clang, but it seems like it should.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question