does such a c++ tool exist? [I dont know what to call it] [closed]
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 6 years ago.
Improve this questionI am going through the process of trying to figure out how a library of code works. I would like some sort of tool that would analyze the program that I run off of the library and tells me what functions are called in what order by each thread. Does such a tool exist? What google terms would I use to find such a program?
Note: Using VS2008/Win7/C++
I think a call graph may help you. Most profilers can generate a call graph after profiling. Profiling can also help you identified what code is being used most often.
Another possibility is using a tool to generate sequence diagrams. This won't show you specifically what happened during runtime, but it will give a clear idea what the code is doing.
Regards Dirk
A profiler or code coverage tool will tell you this.
You are searching for a profiler. This StackOverflow thread will help you to find one.
In linux, I would suggest ltrace which does exactly what you describe. I googled "ltrace for windows" and found dumbug. This promises to be "ltrace for windows".
What you are looking for is a profiler. On a Linux system I would say 'gprof', but I can't really name the tool of choice for MSVC.
WinAPIOverride32 tool, it may be useful for your need.
The solution I ended up using is John Panzer's Call Moniter class. This code runs with my program and outputs the functions with their full names(including class), when there are called, and when they are finished, using indentation to show how deep the function is embedded in other functions. It took a little modification to get rid of excess data, but it works beautifully. I will probably modify it to output to excel instead of outputting to the console as called.
Thanks all for your answers. Looking at all the results, none of them quite did the job, but it helped give me an idea of what was going on.
Some of the suggested answers might have worked, but they were all over my head or I could not get them operational or I could not find the functionality I was looking for.
EDIT: The Call Moniter class ended up being another false trail. It showed functions names as they were called, in the order they were called, and nested them to show which functions called which, and that was great. I had to filter out some noise, which was fine. But at the end, when I looked at the results, this class missed a full half of all the functions that were called! Oh, and I dont know if it would work with threads properly, as the functions that called threads were some of those that were skipped over.
From what I understand, what I wanted was a call graph.
You can check out this tools for understanding large codebase question and Scientific Toolwork's Understand tool
精彩评论