Browse by Tags
All Tags »
Tools (
RSS)
ClrMd is a newly released diagnostic library that wraps the CLR’s undocumented data access interfaces (a.k.a. “DAC”) in a friendly managed API. The underlying interfaces are what debugger extensions like SOS and SOSEX use to implement various diagnostic features, including enumerating the managed heap, detecting deadlocks, inspecting object contents, and dumping type/method information. Given my personal and professional interest in debugging tools and techniques, ClrMd is an incredible tool – I...
The x64 calling convention is a great improvement over the state of affairs in x86. Few would argue about this. After all, remembering the differences between __stdcall and __cdecl , when to use each, which API defaults to which calling convention, and which specific variation of __fastcall JIT compilers use when given the choice -- is not the best use of developer time and not the best in terms of debugging productivity. With that said, the x64 calling convention often makes it very difficult to...
One of the benefits of using more than one development platform, more than one IDE, and more than one debugger is that you gain a better understanding of what your personal ideal development workflow looks like. It might well be the case that no single tool provides every feature you're excited about, which is what I feel these days. Because Visual Studio is my long-time (since 1999) favorite IDE and debugger, here are some features from other tools I'd like to see integrated in Visual Studio...
Once upon a time, it was fairly challenging to determine which services were running in an individual svchost.exe process. Today, with Process Explorer, there’s nothing easier – just hover over the svchost.exe process and you get a list of services, or double-click an svchost.exe process and go to the Services tab: A similar problem can arise with user-mode drivers (UMDF). User-mode drivers are COM DLLs loaded into WUDFHost.exe processes, and some WUDFHost.exe processes may contain more than one...
In 2008, I blogged about the just-released Windows Performance Toolkit , and the xperf tool that collects ETW events (including stack traces) and displays them in a form that allows basic analysis. Since then, ETW generation and collection have taken a huge leap forward. Microsoft has released a great library for creating ETW providers , and a set of tools ( PerfMonitor , PerfView ) for analyzing ETW traces in .NET apps. With the release of the Windows 8 SDK, xperf has been superseded by two new...
There is so much material on the web (and even on this blog) about memory leak diagnostics in managed code, and a considerable number of tools that make diagnostics increasingly easier. Modern memory profilers can open application dumps, attach to live processes, display live memory graphs, compare snapshots, identify problematic retention patterns, and so much more. Unfortunately, these tools presently don’t work with Windows Store apps. Moreover, the UI model of Windows Store apps poses a significant...
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...
As John Robbins repeatedly likes to say , Apple computers are the best hardware for running Windows. To quote, “a Mac Pro […] it's the best Windows machine money can buy”. After yesterday’s release of Windows 8 to MSDN subscribers, I went along and installed it on my new MacBook Pro. Everything went fine—the setup was blazingly fast, all drivers were successfully installed, except for the pesky Apple trackpad settings that were way off what a Windows user comes to expect. In case you don’t know...
Page Heap is an extremely useful diagnostic option that you can enable for your Windows application using GFlags or Application Verifier . When Page Heap is enabled, each heap allocation is placed on the end of a page boundary, and the subsequent page is marked as PAGE_NOACCESS. Any buffer overruns are therefore immediately caught. While Page Heap is very useful, its cost is often too high for use in production applications. Fortunately, there is a more lightweight option, called (appropriately)...
If you’re doing production debugging in a closed environment—closed-down servers with no Internet access, or if you work at an institution that doesn’t have unrestricted Internet access from developer machines, this post will help you set up an offline production debugging environment. Incidentally, this post will also help if you’re going to host SELA’s .NET Debugging or C++ Debugging courses, and want to make sure your workstations are ready for the numerous hands-on labs. First and foremost, you...
A few months ago I wrote about MPGO , a new Microsoft tool that ships with .NET 4.5 and enables profile-guided optimization of managed assemblies. Specifically, MPGO optimizes the layout of native images for managed assemblies, which reduces startup times, working set sizes, and page fault costs. Shameless plug: Pro .NET Performance has a large section dedicated to improving startup performance, and I’ve written about this before: Using Prefetch to improve startup performance , Rebasing and compression...
I had to analyze a memory leak the other day and all I was provided by the customer was a couple of dump files from two points in the application’s lifetime—one dump immediately after initialization, and another dump after the memory leak has accumulated. This is an ideal scenario: now “all it takes” is to compare the two dumps and see which objects are “growing” in memory. That’s, of course, if the leak is actually in managed objects—which isn’t always the case (and VMMap is your friend here )....
Yesterday I delivered a 3-hour session on production debugging at the Castra Center in Haifa. The room was set in the middle of a beautiful art gallery, and the projector was playing my slides on a wall surrounded by paintings. Amidst this cozy atmosphere I was talking about some nasty bugs and how to discover them in a production environment. Source: Ezy.co.il Among the topics covered: Using IntelliTrace in production —we saw an undocumented way to launch IntelliTrace from the command line , capture...
In our C++ Debugging course , there are several scenarios which require WinDbg and cannot be completed in Visual Studio. They all rely on advanced extension commands available in WinDbg. Some examples: Tracing opened and closed handles with the !htrace command Viewing native heap information with the !heap command Loading and executing code in the debuggee process with the SDbgExt extension commands !loaddll , !remotecall Inspecting handles to synchronization objects with the !handle command The...
A dream is coming true. A dream where all the debugging you’ll ever do on your developer box is going to be in a single tool – Visual Studio. In a later post, I will discuss device driver development in Visual Studio 11, which is another dream come true. For now, let’s take a look at how Visual Studio can open kernel crash dumps and perform crash analysis with all the comfy tool windows and UI that we know and love. To perform kernel crash analysis in Visual Studio 11, you will need to install the...
More Posts
Next page »