Subscribe: Angry Richard's WebLog
Preview: Angry Richard's WebLog

Angry Richard's WebLog

He's not as angry as he looks

Last Build Date: Mon, 20 Jul 2015 15:48:33 +0000


Memory Allocation Profiling is Managed Only!

Wed, 13 Dec 2006 10:24:00 +0000

People have been discovering that the VS Team System profiler can collect allocation data for an application.  It isn't long after that they discover that it only works on managed code, not native.  Sadly, the documentation is not clear on this. The memory alloction profiling support in VSTS uses the profiler API provided by the CLR. ...

How to shoot yourself in the foot with const (or the lack thereof)

Wed, 24 May 2006 14:00:00 +0000

It has long puzzled me why various Win32 functions take non-const string parameters, when clearly they have no business manipulating the string.  Take, for instance, GetNamedSecurityInfo: DWORD GetNamedSecurityInfo( LPTSTR pObjectName, SE_OBJECT_TYPE ObjectType, SECURITY_INFORMATION SecurityInfo, PSID* ppsidOwner, PSID* ppsidGroup, PACL* ppDacl, PACL* ppSacl, PSECURITY_DESCRIPTOR* ppSecurityDescriptor ); I can't imagine why this function should ever need to...

DataCollection at the Global Level

Mon, 10 Oct 2005 13:41:00 +0000

If you are using the DataCollection API (either from native, by linking agains VSPerf.lib, or from managed, by importing Microsoft.VisualStudio.Profiler.dll), and wish to enable or disable collection at the global level, you must pass CurrentId for the elementId parameter:   using Microsoft.VisualStudio.Profiler;   [Not so interesting code here]     DataCollection.StartProfile(      ProfileLevel.Global,       DataCollection.CurrentId);   [Interesting...

Response Files

Sun, 07 Aug 2005 22:12:00 +0000

On the forums, someone was using the /INCLUDE option in VsInstr.exe.  It is possible to use multiple instances of this option to include different sets of functions.  For a big chunk of functions, you might want to use dozens of function specifications.  Who the heck wants to do all that typing?  You could make a...

Off-road Profiling Windows Services

Thu, 28 Jul 2005 15:36:00 +0000

I've just posted an article on the pitfalls of profiling services with the Visual Studio profiler.  It includes a sample service with a quick walkthrough.  Enjoy. Profiling Windows™ Services with the Visual Studio Profiler

Offroad Profiling: The Visual Studio Profiler and Windows™ Services

Thu, 28 Jul 2005 15:00:00 +0000

Introduction The Visual Studio Team System Profiler primarily addresses stand alone application scenarios.  However, more and more modern applications are built around a distributed architecture, and larger and larger portions of functionality are moving into remote services.  Of course, this is nothing new -- multi-tier applications have been the norm for some time - but...

Limiting the Data Crunch from Trace Profiling

Sun, 16 Jan 2005 19:41:00 +0000

Typically, one can use the sampling profiler to nail down the hot spot in an application.  Having done that, what does one do when the sampling data doesn't provide enough information?  The trace profiler can offer up more detail, particularly if the issue revolves around thread interaction.  However, if you profile a heavily CPU bound...

Trying out the profiler on the VPC

Fri, 06 Aug 2004 14:19:00 +0000

I've frequently heard the question asked, "Can I use the profiler on a Virtual PC?"  It has even come up on the blog feedback a few times.  My answer has always been, "Theoretically, yes."  I didn't want to post this answer externally until I'd actually gotten around to trying it myself. I've finally been nagged...

VPC and the BSOD (part 2)

Thu, 03 Jun 2004 20:00:00 +0000

I had a nice long email chat with members of the Virtual PC team. The good news:  The Virtual PC emulates the host processor well enough that our kernel-mode driver can detect what features are enabled. The bad news:  The Virtual PC does not emulate an APIC or performance counters. So, if you were planning on running...

VPC and the BSOD

Tue, 01 Jun 2004 20:14:00 +0000

I'm so pleased.  Someone did something exciting and dangerous with the profiler.  In case you're not reading the newsgroups, an intrepid customer tried to profile on a Virtual PC, and discovered that it only leads to pain and misery via the BSOD. So don't do that. Seriously, is this something people want to do?  I...