More ways to minimize instrumentation output?
I know about /INCLUDE /EXCLUDE and I know about /START... and API.
I was just wondering if it possible to for example disable stack collections. I might be happy running whole application and just seeing the times of the functions and call count. I generally know what my call stacks might look like. I wrote a sample profiler with just profiler api (not anywhere near as fancy as vs profiler) and just collect times and counts and it's almost not noticable on performance of the app. I think this would be an interesting option to give to users.
Those files are huge and a minute run takes 40minutes to analyze!
For example both devpartner and rational are 100x quicker and give callstacks.
Could someone explain the difference between those profilers and msft's?
Also those profilers allow (but pressing a button :) to reset counts without needing to restart can I do this with vs?
[907 byte] By [
dimkaz] at [2008-2-20]
Stack collection is enforced in current version of the product, and cannot be disabled.
I am a bit confused, however - you mention /INCLUDE, /EXCLUDE, /START (which are used when binaries are instrumented), but than you say that you wrote a sample profiler. Those are two mutually exclusive modes of work of VS profiler. If sampling is good enough for your scenario (assuming your application is CPU bound), you may want to give it a try. It, however, is enriched by stack collection capabilities as well, but it has much lower overhead. VSPerfCmd.exe is your friend for sampling profiling (as a command line tool).
Which counts would you like to be able to reset?
Thanks.
The Microsoft profiler can run in two different modes, as Maxim has already mentioned, both sampling mode and instrumentation mode. Instrumentation always collects a large amount of data, and so has to be used in small scenarios or when tightly controlled by the APIs.
Sampling mode has much lower overhead and sounds like what you are looking for. In sampling mode, you can adjust how often you take samples, so you should be able to tweak those number to get the file size / analysis time that you are looking for.
If you need more info on adjusting sampling settings, take a look at my blog entry here:
http://blogs.msdn.com/ianhu/archive/2005/02/11/371418.aspx
Thanks,
Ian
Thanks for all your help and sorry for not being clear.
1. Since I can't turn off stack collection, which is what I guess takes the most time/space during instrumented run, I would like to make this a feature request.
2. Comment about sample profiler was my own "profiler" using profiler API. i.e. I just collected functions call count and total time in each function. This was quite fast. What I meant to say is that this would be a nice functionality and it's very low overhead.
3. Comment about resetting values. Is what both quantify and truetime allow. Without stopping your run: a) take a snapshot and analyse, b) reset all stats without restarting my application. I don't see a way of doing this currently.
Thank again.