Questions tagged [perfview]

PerfView performance tool for .NET developers by Microsoft

PerfView enables you to identify the performance hotspots in your app and enables you to quickly determine the code that needs to be updated to mitigate the hotspots. You can use PerfView to investigate .NET Framework (all versions), C++, or JavaScript apps. It also supports investigating performance issues in Windows Store apps.

MSDN blog post: Improving Your App's Performance with PerfView

69 questions
3
votes
1 answer

PerfView Callers is showing "Root", why?

I'm trying to figure out a CPU performance problem using PerfView, my application is an Asp.Net Core 2.2 running on IIS. According to this video…
Alexandre
  • 7,004
  • 5
  • 54
  • 72
3
votes
1 answer

PerfView not able to capture custom ETW events

I have a demo solution which raises events by using System.Diagnostics.Tracing.EventSource class. The class I have is as below:- [EventSource(Guid = "B6741490-9F53-4620-A45C-49004C1B4444", Name = "DemoEvent")] sealed public class DemoEventSource :…
AvinashK
  • 3,309
  • 8
  • 43
  • 94
3
votes
1 answer

How to group thread stacks in perfiew's call tree

Perfiew is a pretty cool tool. However i have problem using it's call tree view because it shows the information thread at a time - which really defeats the purpose unless you have 1 really busy thread. See image below. Instead I want to see the…
Mark
  • 5,223
  • 11
  • 51
  • 81
3
votes
1 answer

How can I interpret the RtlUsrThreadStart in perfview?

Looking at the sshot from CPU stacks in PerfView I'm not sure how to interpret the first record. I can't safely exclude the record, because every thread in CallTree starts with this frame. But what's bothering me is why the frame takes exclusive…
stej
  • 28,745
  • 11
  • 71
  • 104
3
votes
0 answers

Unspecified ETW events - GC/Mark, GC/Triggered, GC/GenerationRange etc

I ran perfview and looked at GC events. There is a list of events that can be found in perfview events view - https://msdn.microsoft.com/en-us/library/ff356162(v=vs.100).aspx My question is: where can I find the missing events like GC/Triggered,…
stej
  • 28,745
  • 11
  • 71
  • 104
3
votes
1 answer

System.Diagnostic.Tracing.EventListener for existing ETW Providers

I am confused how to create an EventListener for an existing system ETW Provider. The EnableEvents method expects to be passed in a EventSource instance. Do I need to create that by hand? Is there a way to generate that EventSource class? I can find…
Cameron Taggart
  • 5,771
  • 4
  • 45
  • 70
3
votes
1 answer

Performance impact due to StackTrace constructor and getting method name

I have this piece of code in our logging library var stackTrace = new StackTrace(); string operationName = stackTrace.GetFrame(1).GetMethod().Name; And as per my performance analysis using the PerfView Tool it shows up as Does anyone know of the…
StackOverflowVeryHelpful
  • 2,347
  • 8
  • 34
  • 46
3
votes
1 answer

Detect memory leaks usin PerfView

I'm troubleshooting a memory leak in a windows service that is used as an integration service. Per "doIntegration()" call I can see that the memory usage gets higher than before the call, and that it rises about 0,5 MB per call. I have tried using…
Alex
  • 487
  • 1
  • 6
  • 19
3
votes
0 answers

Why AsyncPinned handles are holding off to memory

I am trying to investiagte memory issues with my application. Here is .NET heap size. 0:000> !EEHeap -gc Number of GC Heaps: 4 ------------------------------ Heap 0 (000000000111f740) generation 0 starts at 0x000000019eb31750 generation 1 starts at…
crazy novice
  • 1,757
  • 3
  • 14
  • 36
3
votes
1 answer

How can I see me expensive methods in PerfView

I have created a simple console app and execute it from PerfView via Run Command -> PerfMonTest.exe I get the log file and see the process of the app. It is expensive as expected (99% CPU ), but when I want to drill down into the expensive methods…
Mathias F
  • 15,906
  • 22
  • 89
  • 159
2
votes
1 answer

How to get BLOCKED_TIME metric with dotnet-trace

Let's consider a simple case - I'm running a .net5 console app on Windows. If I grab traces via PerfView /threadTime collect like described in here then I get to see BLOCKED_TIME metric in Thread Time Stacks tab. How should I run dotnet-trace…
Kiryl
  • 1,416
  • 9
  • 21
2
votes
0 answers

How to disable stacks for EventSource events?

Using .Net Core 3.1 I've implemented my event source like this: [EventSource(Name = "RequestStatistics-Events")] public sealed class RequestEventsProvider : EventSource { public RequestEventsProvider() : base(throwOnEventWriteErrors: false) …
bss
  • 31
  • 3
2
votes
1 answer

List providers enabled for an ETW trace event session in .NET

The logman tool can list all providers currently enabled for a running trace event session, e.g.: logman query -ets SleepStudyTraceSession How is that achieved in code using the TraceEvent…
Bent Rasmussen
  • 5,538
  • 9
  • 44
  • 63
2
votes
1 answer

Getting new file name from FileIORename ETW event

I am subscribing to the Kernel ETW Events using https://www.nuget.org/packages/Microsoft.Diagnostics.Tracing.TraceEvent/. Is it possible to monitor file rename so that I know what was the previous and new file path? I thought that it would simple…
Pellared
  • 1,242
  • 2
  • 14
  • 29
2
votes
1 answer

C# ETW. How view call stack in PerfView?

Given The implementation ETW provider (inherited from EventSource) with dynamic events. Provider name "IDS-IDComplete-DynamicTrace" My implementation of Windows service, in which the events of ETW are generated I collect events from the service…
VintVV80
  • 33
  • 1
  • 4