Ad Code

Profiler in C++ and MS Visual Studio

How can I use profiler in my programs;  I use both Dev C++ and MS Visual Studio environment to write and compile my C++ programs; Does any of them have a built-in profiler? if yes, how can I use to check statistics of my code and optimize my programs?



Yes Dev C++ has a built-in profiler. To use the profiler in Dev C++, first you need to enable the profiling info generation option in Compiler Options. To enable this option, follow the steps given below:

Tools -> Compiler Options -> Code Generation/Optimization -> Generate profiling information for analysis

Set the Generate profiling information for analysis option to YES

After that follow these steps:

Tools -> Compiler Options -> Linker -> Generate debugging information

Set the option Generate debugging information to YES

Now next step is to open your program and then follow these options and rebuild and run your application:

Execute -> Rebuild All
Execute -> Run

After this, follow the steps below to view the profiling statistics

Execute -> Profile analysis

For more details about how to use the profiler in MS Visual Studio, please follow the links below:

http://blog.weareon.net/how-to-use-visual-studio-profiler/
Reactions

Post a Comment

0 Comments