VPC and the BSOD


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 mean, VPC is about the coolest thing ever, but we do use hardware performance counters by default, and VPC is not exactly a real life environment for performance analysis and measurement.  Still, maybe y’all have good reasons for this.


At the very least, we’ll fix that BSOD thing.  I mean, how 1990’s is that?


This is an excellent time to point out that the profiler does in fact install a kernel-mode device driver in order to play with the hardware counters on your Intel and AMD processors.  There are some fun implications from this:



  • You need to be running as a user who can install a kernel-mode device driver.  We currently install the driver dynamically when starting the profiling monitor, and we uninstall it when the monitor shuts down.

  • The kernel-mode device driver is not signed.  If you’re one of those cheeky folks who has unsigned drivers shimmed through verifier, you may discover the joy of a forced BSOD if you exercise the profiler in new interesting ways we hadn’t thought of.  This is not all bad; just make sure you send us the error report after you’ve rebooted.

  • If you’re running on Intel Pentium I or AMD K6* (or anything older), expect no love from the sampling based profiler, and some uphill battles with instrumentation.  I may post hints on this latter point if a few people speak up about legacy hardware.

Comments (3)

  1. Anonymous says:

    I agree that I don’t understand why you would want to run Profiler against VPC. Since VPC is already using resources on your machine, it does not seem like this would give you a true representation of performance.

  2. Anonymous says:

    That was our justification for not making VPC part of the test plan. However, it is often the case that pre-release software: 1) doesn’t coexist peacefully with previous versions, and 2) is impossible to uninstall. So we always recommend installing on a clean machine, and use fdisk to uninstall.

    VPC is the golden solution to this. You don’t need a spare machine, or additional imaging software. Just backup the vhd file from your clean OS install, and make sure if you do anything important in the VM that you’re using a shared folder, and uninstall is suddenly just a matter of restoring your backed up vhd file.

    It’s so damned cool, I really regret working on a project where I can’t take advantage of it!