PerfView Tutorial 1 - Collecting data with the Run command

Play PerfView Tutorial 1 - Collecting data with the Run command
Sign in to queue


This is the first of a series of video tutorials on how to use the PerfView profiling tool to gather data for a CPU performance data on a simple .NET program.    It is best to watch the video using one of the high quality links on the right so the text is readable.  

If you don't have PerfView already see tutorial 0: Getting PerfView to see just how easy it is to get it.   After watching this eee the next tutoral for how to analyze this data or browse the whole series.

The PerfView tool is a free Windows performance tool developed by the Microsoft .NET Runtime Performance  team for investigating both managed can unmanaged performance problems.   If you are having a performance problem, especially if it is a .NET application, it is hard to overestimate the value of this tool.

You can get the PerfView tool (for free) at the Microsoft Download center.  (bing search on 'PerfView download').   PerfView consists of a single XCOPYable EXE so it is easy to simply 'try out'.   You can literally open the .ZIP file, and double click on the .EXE inside to launch it and then follow along with the video tutorial.   Ultimately you will want to copy this file out of the ZIP file (e.g. drag it to the desktop) to make it easier to launch.



Right click to download this episode

The Discussion

  • User profile image

    Oh you finally get these videos on C9 Smiley

    Actually I notified the C9 team about these videos 6 months ago Big Smile

  • User profile image

    Yes, I actually just now noticed that.   In fact the C9 team did get a hold of me back in January.  The delay is all my doing.    The last several months has been a big push for us to get Win8 ready, and only now are things calming down.    Anyway better late than never...

  • User profile image

    @Vancem: Thanks for doing these, Vance!! I'll get them into the default C9 RSS.


  • User profile image

    nice topic, but Vance, please don't cry all the time. I had earache after watching all 5 videos.

    And why do you create a new tool and instead of adding the functions to xperfview/wpa?

  • User profile image

    I had to downvote it, because of the video quality.  I couldn't even watch it through due to the clarity.

  • User profile image

    There are high quality video links just to the right of the right that you can click on (I mention that in the text below the video frame).  I recommend the WMV version (it is the original).  

    To answer MagicAndre1981's question, I am a big fan of XPerf/WPA, and work with that team to make it better.   If you are happy with WPA, certainly stick with it, it is a very powerful tool.   I like to believe that most of the knowledge you learn in using one tool is applicable to the other.  

    As to why we have both, the simple answer is that XPerf had a codebase (originally completely unmanaged), and and a installed-base / client base  (the OS guys), that make it evolve in a certain direction and at a certain rate.    Historically it did not suppport managed code well, and adding extensions is harder than you would like.    Originally the goal was simply to have a managed code interface to ETW data.    However once you have this, you start wanting to explore better/different ways of presenting the data, which is the genesis of PerfView.  

    For what it is worth...

  • User profile image
    Frank Hileman

    Thanks Vance. I found the videos useful. I only recommend a better microphone.

  • User profile image

    Nice tutorial


    Waiting for more...

  • User profile image
    Tim Campbell

    Hi Vance. What would you say are the main advantages to using PerfView over using Visual Studio's stand alone performance profiler? Is there a difference in terms of load on the target processes?

    I note that PerfView includes a circular buffer, which I have not been able to find in VSPP, and I can see this coming in handy.

  • User profile image

    Hi Vancem,

    Just for knowledge, as you are the Performance guy, I want to do CPU level profiling for my .Net Compact Framework Application so that I can know which piece of code/method took how much

    CPU , is there any tool available for .Net Compact Framework ?


  • User profile image

    To answer Tim's question about when to use VSProfiler vs PerfView, my general recomentation is to use the VS Profiler if you are doing CPU investigations at development time (after all it is integrated into VS).   However you will find that if you are trying to profile at some other time (e.g. investigating a production regression), or you are not investigating CPU (it is a GC, blocked time, memory or other problem), then PerfView is the (obvious) choice. 

    To answer 'topksharma' question on what exists on the .NET Compact framework.  I am afraid I don't know off hand.    I know that there are profilers for the phone (which currently uses .NET Compact Framework), but I don't know about other platforms that use CF. 

  • User profile image

    Hi Vance, Excellent tutorial. It seem like you can collect lot of data on productin machine using VS2012 Intellitrace too. Can you provide some guidance as to when should I use Intellitrace and when PerfView will be a better suite.

  • User profile image

    PerfView vs XPerfView vs VSProfile vs Intellitrace vs WinDbg (or any other native debuggers) vs PerfCounter (any other tool?????)

    It will be nice if we can get some blog or article comparing these various tools from Micorosoft that seem to be doing same thing and clarify what are the limitations of each tool and what a good use cases of each of these?

Add Your 2 Cents