Finalization Queue or F-Reachable Queue? Find Out with SOS

February 25, 2012

It’s 2012, so time for another post related to finalization. This so-often-abused CLR feature has popped up here in the past. A quick recap: You can’t trust the finalizer to ever execute Finalization order is not guaranteed You can create subtle race conditions by using objects that are simultaneously finalized You can end up with a memory leak if objects are created faster than the finalizer thread can run their finalizers This time, we’ll see how to determine whether a...
3 comments

Announcing the Jerusalem .NET/C++ User Group

February 16, 2012

Event Registration Online for First Meeting of the Jerusalem .NET/C++ User Group I’m proud to announce the first meeting of the Jerusalem .NET/C++ User Group, which will take place on March 20! This user group is the product of collaboration between yours truly, SELA Group, and BrightSource Energy, and strives to be the meeting place for developers in and around Jerusalem working with .NET and C++ technologies. Here’s the agenda for our first meeting – I recommend that you register quickly because the number of seats is very limited: 18:00-18:15 -...
tags: ,
one comment

How Understanding Assembly Language Helps Debug .NET Applications [CodeProject]

A quick plug to let you know that I published today an article called How Understanding Assembly Language Helps Debug .NET Applications on CodeProject. It contains some scenarios previously covered on this blog and others that I worked on specifically for the article, and strives to explain why assembly language skills are beneficial even if you’re only working on .NET applications. Here’s the TOC: Analyzing a corrupted or incomplete call stack Correlate crash location to source code line Determine function arguments Find the static...
no comments

Performance Profiling and Optimization Session at Microsoft

February 14, 2012

Yesterday I delivered a short closed session on performance profiling and optimization at Microsoft Raanana. Thanks to Maor David for hosting this session. Thanks to a very attentive audience I was able to cover all of the following: The pitfalls of micro-benchmarking Performance measurement with the Visual Studio Profiler Instrumentation for production profiling The case of the 250ms delay CPU cache optimization in general, cache collision on SMP Parallelization with C++/AMP The slides are demos...
no comments

SELA Developer Practice: Back in 2012!

February 9, 2012

This is going to be an exciting year because right now we have THREE conferences planned for 2012! The first one is very near, in the end of March, and features 20 full-day tutorials and a day of breakout sessions at the Crowne Plaza hotel. As always, we will have two distinguished keynote speakers from Microsoft: Guy Burstein and Maor David. Among the topics you’ll find Windows 8 (three in-depth tutorials!), .NET Parallel Programming, C++ 11, Windows Phone Mango, HTML 5, Deep Dive into JavaScript, and many others. Yours truly will deliver two sessions at...
tags:
no comments

Pinpointing a Static GC Root with SOS

February 7, 2012

NOTE: if you’re not familiar with SOS (a WinDbg extension for managed code) and leak detection with !gcroot, start by reading an introductory post on the subject. A typical root reference chain for a managed object that is retained by a static GC root would have a pinned object array appear as the rooted object. Here is a typical reference chain: 0:010> !gcroot 0000000002bcaf58 …snipped… DOMAIN(0000000000C1C5F0):HANDLE(Pinned):5017f8:Root:0000000012761018(System.Object)-> 00000000039b3c30(System.EventHandler)-> 0000000002bcab38(System.Object)-> ...
no comments

HTML5 Web Workers: Classic Message Passing Concurrency

February 5, 2012

Most concurrency frameworks I write about on this blog consist of numerous layers of abstraction. Consider the Task Parallel Library, for instance: it’s a wrapper on top of the .NET Thread Pool, which is a wrapper on top of Windows threads. This cruft of low-level abstraction layers forces certain expectations from the newer libraries – namely, they must allow direct access to shared state, provide synchronization mechanisms, volatile variables, atomic synchronization primitives, … It seems that JavaScript (HTML5) with its Web Workers standard enjoys the lack of abstraction cruft for threading in the JavaScript world. Because there are...
4 comments