GC Heap and Alignment Padding

The docs for GetObjectSize have recently been updated with this info, but I wanted to mention it here, too, to ensure you were aware of this information. Some profilers manually advance through objects on the heap, inspecting their field values, by starting at an ObjectID and moving forward by its size to the next ObjectID,…

1

When is it safe to use ObjectIDs?

As mentioned in this post, ObjectIDs are really pointers to managed objects on the GC heap.  And as you know, objects get collected or move around on the heap during GCs.  So how do you safely work with ObjectIDs? The overall guidance is that if you plan to dereference an ObjectID or pass it to…

0

Metadata Tokens, Run-Time IDs, and Type Loading

Overview In this post, I write about the two primary kinds of IDs your profiler deals with, when each kind is appropriate to use, how to convert between those two types of IDs, and some gotchas with those conversions—particularly in how they may invoke the type loader. The two kinds of IDs Profilers have to…

0

ReJIT: A How-To Guide

By now, you’ve surely downloaded your copy of the .NET 4.5 Developer Preview, and you’ve opened up the brand-spanking new corprof.idl, and searched that file for all the new APIs available in 4.5.  There’s a bunch with “ReJIT” in the name, and all you need to know is how and when to call what. If…

1

ReJIT Limitations in .NET 4.5

Anyone who’s read a newspaper in the past few weeks knows that the Profiling API in .NET 4.5 will supported a limited form of ReJIT.  Well, the news might not be that hot, but that’s what I tell myself.  I will be discussing the feature in depth in upcoming posts, but I thought my first…

2

ReJIT for Realz?!

Yes!  Check out this new video on channel 9 for the scoop: https://channel9.msdn.com/Shows/Going+Deep/CLR-45-David-Broman-Inside-Re-JIT In the upcoming .NET 4.5, we do indeed plan to include a limited form of ReJIT that will allow diagnostic tools to perform IL Rewriting after the code has been JITted—by instructing the CLR, via the Profiling API, to JIT the (now…

2

CLRProfiler V4 Released

  CLRProfiler V4 is now publicly available.  You may download from here: http://www.microsoft.com/downloads/en/details.aspx?FamilyID=be2d842b-fdce-4600-8d32-a3cf74fda5e1 This is of interest both to folks who want a free profiler to diagnose memory issues with their managed apps, and for folks who author profilers of their own, and would like to look at source code of a real-world example of…

10