Can anyone provide me with link to a website/book in which would be well explainded how to use profiler in VS2010 for native code? I tried to search the web but all I'm getting is tutorials from Microsoft and those tutorials use C#.
Thank you.
views:
99answers:
4At least the last time I looked, the built-in profiler was for managed code only. I believe Visual Studio 6 was the last to support profiling of native code. There are quite a few other profilers that support native code with newer compilers though.
It doesn't seem like it should be that different, accoding to some of the documentation:
Note that [using sampling/instrumentation to collect memory data] is the only feature in the Profiler that is only available for .NET Framework-compliant code. For the rest of the features, Visual Studio Profiler has complete parity between native C/C++ and .NET-based applications.
Here are the basic steps (in VS2008 TeamSystem):
- Open you C++ project
- Do Analyze>Launch Performance Wizard...
- Select the project you want to profile, Next>
- Select Instrumentation, Next>
- Finish, Wizard closes
- Analyze>Profiler>Launch With Profiling
- Program runs...
- When program ends, you get a profile report.
In the MSDN Library, the head-end for the documentation is here.
Only the super-turbo-team-deathstar edition of vs2010 comes with a profiler
This question has a list of the free alternatives.