Skip to content

Commit b7506b4

Browse files
mistymadonnaMisty HaysMikejo5000
authored
New Profiling errors doc (#10552)
* added new profiling errors doc to toc, added specific error msgs with troubleshooting info * fixed the title, date, authors * Update docs/profiling/troubleshoot-profiler-errors.md Co-authored-by: Mike Jones <[email protected]> * Update docs/profiling/troubleshoot-profiler-errors.md Co-authored-by: Mike Jones <[email protected]> * Update docs/profiling/troubleshoot-profiler-errors.md Co-authored-by: Mike Jones <[email protected]> * Update docs/profiling/troubleshoot-profiler-errors.md Co-authored-by: Mike Jones <[email protected]> * Update docs/profiling/troubleshoot-profiler-errors.md Co-authored-by: Mike Jones <[email protected]> * Update docs/profiling/troubleshoot-profiler-errors.md Co-authored-by: Mike Jones <[email protected]> * Update docs/profiling/troubleshoot-profiler-errors.md Co-authored-by: Mike Jones <[email protected]> * Update docs/profiling/troubleshoot-profiler-errors.md Co-authored-by: Mike Jones <[email protected]> * Update docs/profiling/troubleshoot-profiler-errors.md Co-authored-by: Mike Jones <[email protected]> * Update docs/profiling/troubleshoot-profiler-errors.md Co-authored-by: Mike Jones <[email protected]> * Update docs/profiling/troubleshoot-profiler-errors.md Co-authored-by: Mike Jones <[email protected]> * Update docs/profiling/troubleshoot-profiler-errors.md Co-authored-by: Mike Jones <[email protected]> * Update docs/profiling/troubleshoot-profiler-errors.md Co-authored-by: Mike Jones <[email protected]> * Update troubleshoot-profiler-errors.md * added .diagsession * italicized .diagsession * moved toc entry for profiling errors doc to the end of the howto * fixed the toc * added profiling errors toc entry to the end of the guides..how to * Update toc.yml How about we add a Reference node for Troubleshooting? * Update docs/profiling/flame-graph.md * added links to articles that needed similar reference links * added the rest of the links * Update troubleshoot-profiler-errors.md * Update troubleshoot-profiler-errors.md * Update troubleshoot-profiler-errors.md * Update troubleshoot-profiler-errors.md Co-authored-by: Misty Hays <[email protected]> Co-authored-by: Mike Jones <[email protected]>
1 parent 846f2db commit b7506b4

13 files changed

+131
-7
lines changed

docs/profiling/analyze-async.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,4 +47,6 @@ To further investigate a specific task or activity, right-click the row. Then se
4747

4848
## See also
4949

50-
- [Optimizing Profiler settings](../profiling/optimize-profiler-settings.md)
50+
- [Optimizing Profiler settings](../profiling/optimize-profiler-settings.md)
51+
- [Identify hot paths with Flame Graph](../profiling/flame-graph.md)
52+
- [Analyze CPU usage](../profiling/cpu-usage.md)

docs/profiling/analyze-database.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,4 +52,6 @@ If you select a time range on a graph, the query table shows only queries that o
5252

5353
## See also
5454

55-
- [Optimizing Profiler settings](../profiling/optimize-profiler-settings.md)
55+
- [Optimizing Profiler settings](../profiling/optimize-profiler-settings.md)
56+
- [Identify hot paths with Flame Graph](../profiling/flame-graph.md)
57+
- [Use File IO](../profiling/use-file-io.md)

docs/profiling/analyze-memory-usage.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,3 +41,4 @@ You can use the profiling tools without the debugger with Windows 7 and later. W
4141

4242
- [Profiling in Visual Studio](../profiling/index.yml)
4343
- [First look at profiling tools](../profiling/profiling-feature-tour.md)
44+
- [Troubleshoot Profiler errors](../profiling/troubleshoot-profiler-errors.md)

docs/profiling/cpu-insights.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,4 +29,6 @@ On the summary page under Top Functions, you can find the top functions called w
2929
![Screenshot showing Hot Path selected.](./media/vs-2022/hot-path.png "Hot Path selected")
3030

3131
## See also
32-
- [Analyze CPU usage in the Performance Profiler](../profiling/cpu-usage.md)
32+
- [Analyze CPU usage in the Performance Profiler](../profiling/cpu-usage.md)
33+
- [Identify hot paths with Flame Graph](../profiling/flame-graph.md)
34+
- [Troubleshoot Profiler errors](../profiling/troubleshoot-profiler-errors.md)

docs/profiling/cpu-usage.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,3 +167,8 @@ Expand the generated methods to show what's going on:
167167
- `MainPage+<GetMaxNumberAsyncButton_Click>d__3::MoveNext` shows you the activity required to schedule and launch the 48 tasks that wrap the call to `GetNumberAsync`.
168168

169169
- `MainPage::<GetNumberAsync>b__b` shows the activity of the tasks that call `GetNumber`.
170+
171+
## See also
172+
173+
- [Troubleshoot Profiler errors](../profiling/troubleshoot-profiler-errors.md)
174+
- [Identify hot paths with Flame Graph](../profiling/flame-graph.md)

docs/profiling/dotnet-counters-tool.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,3 +67,5 @@ The table updates to relevant values for the time selected in the graphs. Use th
6767

6868
- [Optimizing Profiler settings](../profiling/optimize-profiler-settings.md)
6969
- [dotnet counters](/dotnet/core/diagnostics/dotnet-counters)
70+
- [Identify hot paths with Flame Graph](../profiling/flame-graph.md)
71+
- [Analyze CPU usage](../profiling/cpu-usage.md)

docs/profiling/events-viewer.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,3 +79,9 @@ The event viewer displays up to 20,000 events at a time. To focus on the events
7979
The provider filter shows what percentage of the total number of events occurred for each provider. Hover over a single provider to see a similar tooltip with provider name, percentage of total events, and event count.
8080

8181
![The event viewer provider filter](../profiling/media/eventviewerproviderfilter.png "The event viewer provider filter")
82+
83+
## See also
84+
- [Identify hot paths with Flame Graph](../profiling/flame-graph.md)
85+
- [Diagnose high latency with CPU Insights](../profiling/cpu-insights.md)
86+
- [Analyze CPU usage without debugging](../profiling/cpu-usage.md)
87+
- [Use File IO](../profiling/use-file-io.md)

docs/profiling/flame-graph.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22
title: Identify hot paths with the Flame Graph
33
description: Find hot paths in your code with a visualized overview
44
ms.date: 09/30/2022
5-
ms.topic: how-to
5+
ms.topic: troubleshooting
66
ms.assetid: 7501a20d-04a1-480f-a69c-201524aa709d
7-
author: mikejo5000
8-
ms.author: mikejo
7+
author: mistymadonna
8+
ms.author: mihays
99
manager: jmartens
1010
ms.technology: vs-ide-debug
1111
monikerRange: '>= vs-2022'
@@ -47,5 +47,6 @@ In the Flame Graph view, you can navigate by clicking on a node with a mouse or
4747
|Escape|Zoom out|
4848

4949
## See also
50+
5051
- [Diagnose high latency with CPU Insights](../profiling/cpu-insights.md)
51-
- [Analyze CPU usage without debugging](../profiling/cpu-usage.md)
52+
- [Analyze CPU usage without debugging](../profiling/cpu-usage.md)

docs/profiling/perf-insights-string-concatenation.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,3 +28,7 @@ The StringBuilder class is a mutable object, and, unlike System.String, most of
2828
## How to investigate a warning
2929

3030
In the CPU Usage tool, click **View source code** to go to the [call tree](../profiling/cpu-usage.md#BKMK_Call_tree_structure) and source line highlighting view showing where the most amount of time is spent in string concatenations. If the problem is occurring in multiple locations within the application, navigate to the caller/callee view to see each call location.
31+
32+
## See also
33+
- [Identify hot paths with Flame Graph](../profiling/flame-graph.md)
34+
- [Diagnose high latency with CPU Insights](../profiling/cpu-insights.md)

docs/profiling/perftips.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,3 +61,5 @@ To enable or disable the Diagnostic Tools window:
6161

6262
- [Profiling in Visual Studio](../profiling/index.yml)
6363
- [First look at profiling tools](../profiling/profiling-feature-tour.md)
64+
- [Identify hot paths with Flame Graph](../profiling/flame-graph.md)
65+
- [Analyze CPU usage](../profiling/cpu-usage.md)

docs/profiling/toc.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -245,4 +245,8 @@
245245
href: cvwritemessage-function.md
246246
- name: Concurrency Visualizer Command-Line Utility (CVCollectionCmd)
247247
href: concurrency-visualizer-command-line-utility-cvcollectioncmd.md
248+
- name: Reference
249+
items:
250+
- name: Troubleshoot possible profiler errors
251+
href: troubleshoot-profiler-errors.md
248252
- name: Resources
Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
---
2+
title: Troubleshoot profiling errors
3+
description: Learn how to resolve possible profiling errors with error message guidance
4+
ms.date: 10/26/2022
5+
ms.topic: how-to
6+
ms.assetid:
7+
author: mistymadonna
8+
ms.author: mihays
9+
manager: jmartens
10+
ms.technology: vs-ide-debug
11+
ms.workload:
12+
- "multiple"
13+
---
14+
# Troubleshoot profiling errors and fix issues
15+
16+
This article provides solutions for some of the most common errors that can prevent using or getting sufficient data from the Performance Profiler in Visual Studio.
17+
18+
## No results
19+
20+
Error: "There is no data in the current set of filters"
21+
22+
When opening a *diagsession* file, certain filters are applied such as hiding native code, or hiding non-user code to make the trace easier to understand. Additionally, there are other filters that can be applied such as **time selection** and **thread**, which further narrow down the data shown. If these filters are applied in a way that there's no data remaining to show, then you'll see this warning.
23+
24+
**How to fix**
25+
- Ensure that your time selection has data in it. If you’ve changed your time selection in the graph above the data, select **Clear Selection** to reset it.
26+
- Next, if there's still no data, ensure that all categories and threads are enabled in their respective dropdowns.
27+
- If the application you are profiling is native code, then be sure to enable the **Show Native Code** option in the **Settings** drop-down.
28+
- If you still have no data, then the trace you collected likely was too short for any data to be present. Make sure the program you're collecting data for does'nt complete too quickly (less than a second).
29+
30+
See also: [Show External Code](../profiling/optimize-profiler-settings.md)
31+
32+
## Taking a long time for the results to complete
33+
34+
If analyzing the heap after collection seems slow to load, see the following possible solutions that can help resolve wait time issues.
35+
36+
**How to fix**
37+
Sometimes it can take longer when trying to analyze snapshots from memory-intensive applications, but upgrading to a more recent version of Visual Studio should reduce the analysis wait time. If this issue is persistent after upgrading, there might be a performance bug on the tool. Create a feedback ticket and share the *diagsession* file that was created. With the file, we can determine why the data is slow to analyze and find where we can make performance improvements.
38+
39+
Be sure to provide a trace and heap dump files in the Feedback ticket.
40+
41+
See also:
42+
- [How to collect a ETW trace](../ide/how-to-report-a-problem-with-visual-studio.md)
43+
- [For symbol loading issues](../profiling/optimize-profiler-settings.md)
44+
45+
## Error "Could not create a manifest file for this *diagsession*" or "error could not create manifest file for *diagsession*, Visual Studio will not able to reopen this session."
46+
47+
This issue means there was a problem when preparing the memory snapshot data to be analyzed and displayed after stopping to collect data. There are multiple potential causes for the issue to appear, from a failure to get the correct information from the collection agents to the actual data processing. Therefore, it won't be possible to diagnose what the issue is without further logging.
48+
49+
**How to fix**
50+
Reply to your Feedback ticket with additional logging information so that we can diagnose the issue. You can get the log information by running the following commands from an elevated command prompt:
51+
52+
```console
53+
reg add HKEY_LOCAL_MACHINE\Software\Microsoft\VisualStudio\DiagnosticsHub /v LogLevel /t REG_SZ /d All /reg:32
54+
reg add HKEY_LOCAL_MACHINE\Software\Microsoft\VisualStudio\DiagnosticsHub /v LogDirectory /t REG_SZ /d [directory of your choice] /reg:32
55+
```
56+
57+
After running these commands, start Visual Studio, reproduce your scenario, close Visual Studio, then zip up your chosen DiagnosticsHub log directory and attach it to this ticket. From that point, we should be able to better diagnose what is happening.
58+
59+
After adding the log to your ticket, run these commands to disable logging:
60+
61+
```console
62+
reg delete HKEY_LOCAL_MACHINE\Software\Microsoft\VisualStudio\DiagnosticsHub /f /v LogLevel /reg:32
63+
reg delete HKEY_LOCAL_MACHINE\Software\Microsoft\VisualStudio\DiagnosticsHub /f /v LogDirectory /reg:32
64+
```
65+
66+
## Error: "Source information not available."
67+
In order to view source information, you need to have PDBs available from the time of collection. So, for example, if you collect a CPU usage
68+
*diagsession* file, make some changes to your code, recompile (which replaces the old PBD), then open the *.diagsession* again, you wouldn't likely be able to see source information for the modules of your code that you've updated.
69+
70+
**How to fix**
71+
The easiest workaround for this issue is to collect a new *diagsession* after making changes. This way you can be sure your PDBs will be up to date.
72+
73+
## Error: "Memory analysis failed due to an internal error."
74+
75+
After a long memory profiling session, any attempt to analyze the result is met with the error.
76+
77+
There was a mismatch between the snapshot information captured by the memory tool and that of the collection agent. This result means that the memory tool wasn't able to find the heap state file for a native snapshot. Or, this result the memory tool couldn't match the GC start time of the snapshot to the one registered in the *diagsession* file to retrieve the GCStats.
78+
79+
**How to fix**
80+
This issue was due to a bug in the tool that was fixed in 17.3. Upgrading to a later version should solve the issue. If the issue is still persistent after upgrading, create a feedback ticket and attach to the ticket:
81+
82+
- The *diagsession* file
83+
- A minidump of Visual Studio
84+
- A screenshot of the memory snapshots that were taken.
85+
86+
There isn't a workaround for this issue and the profiling session will need to be restarted.
87+
88+
## See also
89+
90+
- [Analyze CPU usage](../profiling/cpu-usage.md)
91+
- [Identify hot paths with Flame Graph](../profiling/flame-graph.md)

docs/profiling/use-file-io.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,5 +59,7 @@ Double-clicking any file will cause it to be loaded in the **Backtraces** view.
5959
> Caching the file read is not the correct fix as the OS already does that. Instead, cache what the file reads are translated into.
6060
6161
## See also
62+
6263
- [Beginners guide to CPU sampling](../profiling/beginners-guide-to-cpu-sampling.md)
6364
- [Analyze database](../profiling/analyze-database.md)
65+
- [Identify hot paths with Flame Graph](../profiling/flame-graph.md)

0 commit comments

Comments
 (0)