What about Profiling in VS .NET?

Started by
8 comments, last by Xeee 21 years, 5 months ago
I've been using VS .Net for a while, but i didn't need to use a profiler(i don't use it frequently) . while talking with a friend ...... he told me profile and u'll c that i'm right, so i went searching for the profiler in VS .NET but i found out that microsoft has removed the profiler from it. so what to do now? if microsoft didn't provide another utility, how can i profile? xee.. [edited by - xeee on November 3, 2002 2:41:45 AM]
xee..
Advertisement
Try this: http://www.compuware.com/products/devpartner/profiler/


Faith. n. Belief without evidence in what is told by one who speaks without knowledge, of things without parallel. -- Ambrose Bierce
--AnkhSVN - A Visual Studio .NET Addin for the Subversion version control system.[Project site] [IRC channel] [Blog]
And make sure to turn off Whole Program Optimization.
char a[99999],*p=a;int main(int c,char**V){char*v=c>0?1[V]:(char*)V;if(c>=0)for(;*v&&93!=*v;){62==*v&&++p||60==*v&&--p||43==*v&&++*p||45==*v&&--*p||44==*v&&(*p=getchar())||46==*v&&putchar(*p)||91==*v&&(*p&&main(0,(char**)(--v+2))||(v=(char*)main(-1,(char**)++v)-1));++v;}else for(c=1;c;c+=(91==*v)-(93==*v),++v);return(int)v;}  /*** drpizza@battleaxe.net ***/
I tried it out...however I couldn''t get it to work on native code. Apparently you have to build with instrumentation on, and either I can''t figure out how to do it, or you can''t do it. Anyone have any luck with this?
Yes. Follow the instructions to the letter.
char a[99999],*p=a;int main(int c,char**V){char*v=c>0?1[V]:(char*)V;if(c>=0)for(;*v&&93!=*v;){62==*v&&++p||60==*v&&--p||43==*v&&++*p||45==*v&&--*p||44==*v&&(*p=getchar())||46==*v&&putchar(*p)||91==*v&&(*p&&main(0,(char**)(--v+2))||(v=(char*)main(-1,(char**)++v)-1));++v;}else for(c=1;c;c+=(91==*v)-(93==*v),++v);return(int)v;}  /*** drpizza@battleaxe.net ***/
Thanks for the help guys =(
I managed to find it in the help:

From Visual Studio .NET, open the solution associated with your application.
In the Solution Explorer, select the solution.
In the Properties for the solution, locate Build with profiling and choose NativeOnly.
Note The Build with profiling property appears in the Properties window in the Visual Studio .NET IDE, not in the properties pages accessed by the Properties item on the alternate-click context menu for the solution. If the Properties window is not visible, select it from the Visual Studio .NET View menu, or press the F4 key.
Build or Rebuild the solution. DevPartner Profiler instruments unmanaged C++ code as it is compiled.
Hmm, ok. So both this, and Rational quantify(the two profilers I''ve tried) really slow down my OpenGL calls. Does anyone know of a low overhead profiler?
quote:Original post by sjelkjd
Hmm, ok. So both this, and Rational quantify(the two profilers I''ve tried) really slow down my OpenGL calls. Does anyone know of a low overhead profiler?


No, there''s no such thing. Profiling always has a significant overhead (since it''s got to time function calls and so on). The point is that while it runs slower overall, it''s still running at the same speed relatively, and the collected data is still valid.

If I had my way, I''d have all of you shot!

codeka.com - Just click it.
The hope is that the relative performance is unchanged; in practice this is not always the case. I have written some programs where inserting simple timers points at one part being the bottleneck but profiling makes another part the bottleneck.

I didn''t delve too deeply to find out why; I would have thought it was because the profiling would interfere with inlining.
char a[99999],*p=a;int main(int c,char**V){char*v=c>0?1[V]:(char*)V;if(c>=0)for(;*v&&93!=*v;){62==*v&&++p||60==*v&&--p||43==*v&&++*p||45==*v&&--*p||44==*v&&(*p=getchar())||46==*v&&putchar(*p)||91==*v&&(*p&&main(0,(char**)(--v+2))||(v=(char*)main(-1,(char**)++v)-1));++v;}else for(c=1;c;c+=(91==*v)-(93==*v),++v);return(int)v;}  /*** drpizza@battleaxe.net ***/
There''s an interesting flipcode COTD thread here about profiling under .NET and some discussion about game profiling in general.

This topic is closed to new replies.

Advertisement