SDP Workshop: Monitoring .NET Performance with ETW

Thursday, January 22, 2015

I've been doing .NET performance workshops at the SDP for 4 years now, and this year I thought it was time for a change. The traditional workshop used to be about a variety of commercial performance measurement tools, such as the Visual Studio profiler, and unfortunately I wasn't able to offer any labs, so it wasn't really a hands-on workshop. This time I decided to rewrite 90% of the materials and focus only on ETW tools. Here's the rough agenda of the workshop -- I'm pretty happy with the results! Introduction to semantic logging and ETW Capturing kernel ETW events with xperf...
no comments

Garbage Collection and .NET Debugging at Build Stuff

Tuesday, November 25, 2014

I spent most of last week at Build Stuff, a really cool software conference in Vilnius, Lithuania. The conference was great with a really exciting atmosphere: energized, passionate developers having conversations and playing table tennis in the hallways during the day, and drinking lots of beer in the evenings. Even the weather was quite nice -- there was only a little snow, and temperatures didn't drop below -1 Celsius, which means we could walk around the old town's historical landmarks; grab some sushi, ribs, and beer; and do some window shopping. So, a great success! I was invited to deliver...
no comments

Making .NET Applications Faster: My Pluralsight Courses

Friday, November 14, 2014

I can't believe I waited until now to blog about it, but I have two courses on Pluralsight covering .NET performance optimization. If you've been reading this blog for any time now, you know this is one of my favorite topics -- and I was absolutely thrilled to join the Pluralsight author team in early 2014. My first course is titled Making .NET Applications Faster, and it was released in May. It's a fairly short course, running just under 2 hours, that covers the basics of .NET performance optimization. Some of my favorite topics include implementing value types correctly, using NGen...

DevConnections 2014: IntelliTrace, Diagnostics Hub, and .NET Production Debugging

Saturday, September 20, 2014

I'm flying back home from DevConnections 2014, which was great! Vegas was hot and dry as usual, but I actually managed to carve out some time in my schedule to see KA, which was really nice. (Plus, the conference was at the Aria resort, which is located smack in the middle of the strip, and is overall much nicer than Mandalay Bay where we were last year. I really liked the hotel room automation control. For example, I had an alarm clock set up to open the curtains, turn on the TV to a quiet music channel, and even...
no comments

C++ Sink Parameter Passing

Thursday, August 21, 2014

C++ is the most complex language I know, and its parameter passing rules are only getting more arcane now that we have rvalue references in C++ 11. In this post I'd like to examine the specific scenario of passing parameters to a sink method, which consumes its parameters. What do I mean by "consume"? If a parameter is movable and safe to move from (i.e. it's an rvalue), it should move from it; if a parameter is only copyable, it should copy it. Here are a couple of sink methods from the C++ Standard Library: std::vector's push_back method will move from...

Materials From My SDP 2014 Sessions and Workshops

Sunday, July 6, 2014

This year's first SDP has been a huge success, with over 1,200 developers signed up for a huge variety of workshops and talks. The snow didn't keep me from getting to Tel-Aviv this time, and I enjoyed the conference atmosphere, the talks, and some great conversations. View from one of the SDP rooms. Really hard to stay focused on developer stuff :) I'm also VERY MUCH behind on emails and everything else that isn't directly related to the conference -- so it's going to take me a while to recuperate. In the meantime, here are the materials...
one comment

.NET Native Performance and Internals

Monday, April 28, 2014

Introduction to .NET Native.NET Native is a compilation and packaging technology that compiles .NET applications to native code. It uses the C++ optimizing compiler backend and removes the need for any JIT compilation at runtime and any dependency on the .NET Framework installed on the target machine. Formerly known as "Project N", .NET Native is currently in public preview and this post explores the internals of the compilation process and the resulting executable's runtime performance.At this time, .NET Native is only available for C# Windows Store Apps compiled to x64 or ARM, so the experiments below are based on...

C# Vectorization with Microsoft.Bcl.Simd

Tuesday, April 22, 2014

tl;drA couple of weeks ago at Build, the .NET/CLR team announced a preview release of a library, Microsoft.Bcl.Simd, that exposes a set of JIT intrinsics on top of CPU vector instructions (a.k.a. SIMD). This library relies on RyuJIT, another preview technology that is aimed to replace the existing JIT compiler. When using Microsoft.Bcl.Simd, you program against a vector abstraction that is then translated at runtime to the appropriate SIMD instructions that your processor supports.In this post, I'd like to take a look at what exactly this SIMD support is about, and show you some examples of what kind of...

Workshops at Sela Developer Practice, December 2013: Improving .NET Performance and .NET/C++ Interop Crash Course

Thursday, December 19, 2013

In addition to my three breakout sessions, I've also had the pleasure of delivering two workshops at the Sela Developer Practice: Improving .NET Performance and .NET/C++ Interop Crash Course. Although these workshops are quite time-tested, I always try to add new materials and tools to make them more interesting for both myself and the audience. There's also constant interest in these topics -- I had 110 people registered for the performance workshop and more than 40 people at the interop course. In the performance workshop, we cover various performance measurement tools. I always try to squeeze in new tools in...
no comments

Uneven Work Distribution and Oversubscription

Wednesday, October 23, 2013

A few days ago I was teaching our Win32 Concurrent Programming course and showed students an experiment with the std::thread class introduced in C++ 11. The experiment is designed to demonstrate how to partition work across multiple threads and coordinate their execution, and the work to partition is simply counting the number of primes in a certain interval. You can find the whole benchmark here. The heart of the code is the parallelize_count function, below: void parallelize_count(unsigned nthreads, unsigned begin, unsigned end) {     std::vector<std::thread> threads;     unsigned...
no comments