Debugging Your Profiler II: SOS and IDs

In this debugging post, I’ll talk about the various IDs the profiling API exposes to your profiler, and how you can use SOS to give you more information about the IDs.  As usual, this post assumes you’re using CLR 2.x. S.O.What Now? SOS.DLL is a debugger extension DLL that ships with the CLR.  You’ll find…

2

Debugging Your Profiler I: Activation

This is the first of some tips to help you debug your profiler.  Note that these tips assume you’re using CLR 2.x (see this entry for info on how CLR version numbers map to .NET Framework version numbers).  In today’s post, I address a frequent question from profiler developers and users: "Why didn’t my profiler…

8

Versions of Microsoft .NET Framework, CLR, and Your Profiler

[Updated 8/13/2008 with the release of Visual Studio 2008 SP1.] With the many releases of the Microsoft .NET Frameworks and their service packs, it might not be obvious what versions of the Common Language Runtime (CLR) come alongside them and whether your profiler should care.  So I’m posting this to help clarify the various versions….

13

Test my Code! (And get paid for it.)

We’ve got a new job opening listed here.  If your idea of fun is writing debuggers and profilers that automate the testing of the CLR APIs on which they’re built, then you’ll want to check out this opening.  Be the first on your block to discover the latest and greatest CLR features (and then write…

1

Enter, Leave, Tailcall Hooks Part 2: Tall tales of tail calls

For most people the idea of entering or returning from a function seems straightforward. Your profiler’s Enter hook is called at the beginning of a function, and its Leave hook is called just before the function returns. But the idea of a tail call and exactly what that means for the Profiling API is less…

6

Tail call JIT conditions

Here are the full details I received from Grant Richins and Fei Chen when I asked how the JIT decides whether to employ the tail call optimization.  Note that these statements apply to the JITs as they were when Grant and Fei looked through the code base, and are prone to change at whim.  You…

6

New version of CLRProfiler released (for CLR 2.x only)

If you’re having trouble with CLRProfiler crashing the aspnet_wp process, along the lines of this forum post: http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1039428&SiteID=1 then you’ll want to know that we have officially uploaded a fixed version of CLR Profiler here:  http://www.microsoft.com/downloads/details.aspx?FamilyID=a362781c-3870-43be-8926-862b40aa0cd0&DisplayLang=en So please feel free to go there directly to get the latest and greatest.  (The update is for CLR…

1

Enter, Leave, Tailcall Hooks Part 1: The Basics

The CLR Profiling API allows you to hook managed functions so that your profiler is called when a function is entered, returns, or exits via tailcall. We refer to these as Enter/Leave/Tailcall hooks, or “ELT” hooks. In this special multi-part investigative series, I will uncover the truth behind ELT. Today I’ll write about some of…

20

Creating an IL-rewriting profiler

A frequent topic of discussion between those of us on the CLR Profiling API team at Microsoft and our customers is how to write a profiler that rewrites IL to do cool stuff. Unfortunately, there still is very little documentation on how to do this, and what documentation there is, is rather scattered. I’m not…

11