Sync Block Diagnostics with PSSCor2 (or PSSCor4)

September 30, 2012

Alternative title: yet another another another way to determine the sync object for which your thread is waiting. I should make a series out of these posts, as there are at least four distinct approaches now. In case you haven’t seen them, PSSCor2 and PSSCor4 are WinDbg extensions that augment and extend SOS functionality for .NET 2.0 and 4.0 applications, respectively. They don’t ship with the .NET Framework (unlike SOS), but you can find them online. To the case in point, PSSCor2/4 provides a command called !SyncBlk (akin to SOS’s command with the same name), which outputs...
no comments

Asynchronous WMI Queries: Stay Away From Them

September 20, 2012

So, it turns out that I have a WMI category on my blog. During the last couple of years I almost forgot about it, but WMI got a chance to wrap its poisonous tentacles around me again yesterday. Here’s another story. WMI is known for requiring lots of attention to security. To establish a WMI connection to a remote machine, you need to muck around with registry settings, DCOM configuration, group policy details, and other infernal things which we developers like to defer to someone else. But at least you know that once a machine has been configured...
tags:
no comments

Runtime Representation of Generics—Part 2

September 18, 2012

This is an excerpt from Chapter 5 (Collections and Generics) of Pro .NET Performance, scheduled to appear in less than a month. I might be publishing a few more of these before and after the book is out. After giving ample consideration to the design of Java generics and C++ templates, we can understand better the implementation choice for CLR generics. CLR generics are implemented as follows. Generic types — even open ones, like List<> — are first-class runtime citizens. There is a method table and an EEClass for each generic type and a System.Type instance can be...
no comments

Why Asking Google-able Questions at Interviews Is Just Fine, Really

September 13, 2012

I’ve recently encountered the position that it is bad form to ask interview questions which can be answered easily by using Google. Some examples include traversing a linked list, naming some important API, or describing the architecture of a popular framework. I could not disagree more. The litmus test for interview questions should not be whether you can find the answer by researching the subject online. If that were the criteria, interviews would be ten hours long and consist of very difficult algorithmic questions – and of course you’d have to come up with these questions yourself! ...
2 comments