Using TraceEvent to mine information in OS registered ETW providers

In previous blocks on TraceEvent I shows you how easy it was to start up ETW sessions to collect information generated by System.Diagnnostics.Tracing.EventSource classes (typically logging that you yourself did).   But I also mentioned in other blogs that the one of the real strengths of ETW was the fact that you get to correlate lots…

35

More Support for EventSource and strongly typed logging: The Semantic Logging Application Block

If you have been following my blog at all, you have seen my articles about System.Diagnostics.Tracing.EventSource, a class that introduced in V4.5 of the .NET Runtime for production logging.    This class replaces the System.Diagnostics.TraceSource class  and we strongly encourage people to consider using EventSource instead of TraceSource for any future work (You can events from one go…

7

A Lab on investigating Memory Performance with PerfView

As part of a conference that I participated in this week, I have created a lab on using PerfView to investigate Memory issues.   The lab covers both managed and unmanaged code techniques.  The ZIP file below of two Visual Studio 2012 projects which create leaky apps (one C++ and one C#), as well as an MHT file (multi file HTML),…

4

New version of TraceEvent / PerfMonitor Posted to bcl.codeplex.com

For several years now, I have had code called the ‘TraceEvent library’ that allows you to access ETW files (ETL files) from C#.   However for over a year now, I have not updated the public version of that library.   Well, that time has ended. I updated the TraceEvent library as well as the PerfMonitor sample at http://bcl.codeplex.com to…

7

Why doesn’t my EventSource produce any events?

This is a quick entry to warn about a pitfall that you are likely to run into sooner or later if you build or maintain EventSources.   As I have blogged about, it is very easy to get started with EventSources.   Here is some code that someone might write    And then use it by using by doing…

16

Using TraceSource to log ETW data to a file

Yesterday’s blog post was showing how you can use EventSource to generate ETW events and the TraceEvent library to read them in ‘real time’.   Today we will do a slight variation on that example.  Instead of reading the events in real time, we will simply log them to a file, and then later (it happens…

8

How many samples are enough when using a sample based profiler in a performance Investigation?

Performance analysis is my job, and so I answer a lot of questions about perf, and this blog is about a frequently asked question I get.  When doing CPU analysis, many profilers, including the PerfView tool are sampling profilers.   In particular, for PerfView, by default every millisecond it will stop each processor and take a stack trace.  …


An End-To-End ETW Tracing Example: EventSource and TraceEvent

I have already made a series of blogs about EventSource starting with my tutorial introduction to EventSource.  This gives you enough information to generate events, and using the PerfView tool, lets you look at these events in a viewer.  This is great for a broad variety of ad-hoc scenarios.     However what if you want to go…

16

Collecting ETW/PerfView data on an Windows RT (WinRT, ARM, Surface) device

If any of you have tried to run PerfView a Surface or other WinRT device, you will find that it does not work.    Basically any program that is NOT a windows store application needs to be signed with a special key or it simply will fail to run on a ‘locked’ device (most devices are…


Video: Wall clock time analysis of ASP.NET Applications using PerfView

ASP.NET applications are one of the more common uses of .NET code today, and the PerfView tool has some special support for profiling them.  I created the video ‘Wall Clock Analysis of ASP.NET Applications’ as part of the PerfView tutorial video series.  You can learn more about wall clock time analysis in general (and find useful videos)…