Skip to content

PDC 2009 video, TechEd Iceland, VS2010, profiling, Silverlight 4

(I know I promised this eons ago, so apologies in advance… on the flipside, I’m posting from my vacation in Paris, so hopefully that earns me 1-2 brownie points back.)

First, my PDC slides and the video. This is the same talk that I gave at TechEd Iceland for profiling. 

I was recently reminded to post instructions on profiling Silverlight 4 with VS2010.

At PDC, I announced that Silverlight 4 came with the new CoreCLR capability of being profile-able by the VS2010 profilers: this means that for the first time, we give you the power to profile the managed and native code (user or platform) used by a Silverlight application. woohoo. kudos to the CLR team.

Sidenote: From silverlight 1-3, one could only use things like xperf (see XPerf: A CPU Sampler for Silverlight) which is very powerful to see the layout/text/media/gfx/etc pipelines, but only gives the native callstack.)

However, the version of VS2010 available at PDC unfortunately had a bug: it could not profile Silverlight. My PDC profile demo was saved from a VS2010 build with the fix… thus the delay in my posting instructions. I’m not sure when you’ll get next the public drop of VS2010… but you’ll run into a new problem: SL4 Beta did not publish symbols to the Microsoft Symbol Server.

I’ll be sure to post a status on all of this by Mix (feel free to remind me).

If you happen to read this at a later point, when you have all the drops and symbols, then: Hello! What is the future like? You can use the below instructions:

  1. admin-level VS prompt
  2. cd /
  3. vsperfclrenv /sampleon
  4. set CORECLR_ENABLE_PROFILING=1
  5. set CORECLR_PROFILER=%COR_PROFILER%
  6. vsperfcmd /start:sample /output:myProfile.vsp
  7. vsperfcmd /launch:”c:\Program Files\Internet Explorer\iexplore.exe” /timer:100000
  8. **    navigate, play with app, Shut down.
  9. vsperfcmd /shutdown
  10. before viewing, turn on the symbols server in VS2010 through: Tools–>Options–>Debugging–>Symbols–>check microsoft symbols server.
    (In the video, the symbols just point to a folder where I cache the internal symbols locally… not sure, but I don’t think you guys can do that too.)
  11. Open file in VS2010
    (Double-clicking in explorer will not work. VS2010 –> File –> open –> pick file.)
Cheers, and have fun! 
Seema

Post a Comment

Your email is never published nor shared. Required fields are marked *