Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to set release profiling in Visual Studio (C++)

I have two configuration, the Debug and Release in my project. Profiling application in debug mode gives me odd results, because some function do additional checks in DEBUG mode and it is not optimized. Profiling in release mode gives me no information about name of functions, I can see only the time spend in modul.

What is the minimum change for Release configuration to be used with profiler and to be most similar to release in performance? I mean what do I need to change in release configuration to be able to use results from profiler?

like image 976
Tomas Kubes Avatar asked Apr 26 '15 15:04

Tomas Kubes


People also ask

How do I put Release mode in Visual Studio?

In Solution Explorer, right-click the project and choose Properties. In the side pane, choose Build (or Compile in Visual Basic). In the Configuration list at the top, choose Debug or Release. Select the Advanced button (or the Advanced Compile Options button in Visual Basic).

How do I run a performance profiler in Visual Studio?

Open the Performance Profiler by choosing Debug > Performance Profiler (or Alt + F2). For more information on using the CPU Usage or Memory usage tool in the Performance Profiler vs. the debugger-integrated tools, see Run profiling tools with or without the debugger.

What is profiler C#?

A profiler is a tool that monitors the execution of another application. A common language runtime (CLR) profiler is a dynamic link library (DLL) that consists of functions that receive messages from, and send messages to, the CLR by using the profiling API. The profiler DLL is loaded by the CLR at run time.

How does Visual Studio analyze CPU usage?

Select Debug > Performance Profiler. Under Available tools, select CPU Usage, and then select Start. After the app starts, the diagnostic session begins and displays CPU usage data.


1 Answers

You need to compile release mode with debug symbols, follow these instructions

like image 169
Yoav Miller Avatar answered Nov 15 '22 11:11

Yoav Miller