Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why is Memory Usage section disabled in performance profiler?

I would like to run Memory Usage session or Object Allocation (preferable both) but I have only available types CPU Usage and GPU Usage. VS does not show any hint while given section is disabled.

I tried out several other projects I wrote and one after another all have just those two sections.

I run 64-bit Windows 10.

like image 296
astrowalker Avatar asked Apr 08 '19 11:04

astrowalker


People also ask

Which profiling will analyze the memory usage of the application?

When the Diagnostic Tools window appears, choose the Memory Usage tab, and then choose Heap Profiling.

How do I set up the memory usage tool for profiling?

Open the Performance and Diagnostics hub from the Debug -> Performance and Diagnostics (ALT+F2) menu. We support 3 profiling modes for the Memory Usage tool. You can set this using the Settings link available next to the Memory Usage tool prior to starting a profiling session. 1.

How do the performance profiler and diagnostic tools settings affect performance?

The Performance Profiler and Diagnostic Tools window in Visual Studio have many different settings which affect the overall performance of the tools. Changing some settings can cause analysis to run quickly or cause additional wait times while processing results in tools. Below is a summary of certain settings and their impact on performance.

How does the native memory profiler work?

Instead of profiling objects on the Java heap, the Native Memory Profiler only tracks allocations made through the C/C++ allocator, including native JNI objects. The Native Memory Profiler is built on heapprofd in the Perfetto stack of performance analysis tools.

What can the memory profiler tell you about an object's allocation?

Specifically, the Memory Profiler can show you the following about object allocations: What types of objects were allocated and how much space they use. The stack trace of each allocation, including in which thread. When the objects were deallocated (only when using a device with Android 8.0 or higher).


2 Answers

It's possible that the current tool selection prevents you from selecting what you want.

For example, here's what I see:

CPU usage and Database selected

I can't select the Memory Usage tool unless I deselect both the CPU Usage and Database tools:

Memory Usage selected

like image 134
Métoule Avatar answered Nov 14 '22 21:11

Métoule


In my case, Memory Usage was disabled because of project's framework version. It was set to 3.5. When I changed it to newest (on my computer 4.7.2), Memory Usage functionality starts working. After profiling, I will change framework version back to 3.5, due to our product compatibility.

Framework version settings is in: Project / Properties / Application / Target Framework

like image 36
Bachor Avatar answered Nov 14 '22 23:11

Bachor