Re: Interested in development
Matthew Mastracci <[email protected]> Fri, 09 Jan 2004 07:39:56 -0700
| Newsgroups | gmane.comp.windows.dotnet.nprof.devel |
|---|---|
| Message-ID | <1073659196.10699.36.camel@matt> |
On Thu, 2004-01-08 at 23:57, [email protected] wrote: > I still do not understand why nprof slows down the program by such an > order of magnitude. I am talking of a slowdown from about 4-5 minutes of > run time to over 30 minutes. Is this normal? In any case, can you point > out the places in the code which might cause the program to slow down? > i.e., does nprof insert too many hooks/take long time in processing each > hook/? Most profilers will cause a significant slowdown of the program being profiled. I've also encountered profilers that slow things by 10x, if not more! The reason for the slowdown is that for each function call we need to do a lookup of the function information from the thread collection, as well as update that information with the new timings. There's at least three map lookups per Push()/Pop() pair! There are a few optimizations that could help this out - that most effective ones will save certain items within the StackEntryInfo so that they only need to be looked up once per Push()/Pop() pair. If you're interested in knowing the slowdown from the hooks themselves, try commenting out the calls to Profiler::Enter/Profiler::Leave/etc... within profiler.cpp. You might find that there's a slowdown just by enabling profiling. Perhaps we can make VS.NET optimize more aggressively. Aggressive inlining would certainly help the situation as well. Matt. > > Thanks, > Ashwin > > On Thu, Jan 08, 2004 at 12:16:57PM -0700, Matthew Mastracci wrote: > > > - the profiler (while profiling my fully C# based simulator) was very > > > very slow to run the program. Would like to know if it would be > > > useful to tune some parameters and tradeoff profiling accuracy with > > > running time. > > > > This would be cool, but I'm not certain which profiling parameters we > > could remove. If you've got an idea of what you statistics might want > > to see for a "quick profiler", let me know. > > > ------------------------------------------------------- > This SF.net email is sponsored by: Perforce Software. > Perforce is the Fast Software Configuration Management System offering > advanced branching capabilities and atomic changes on 50+ platforms. > Free Eval! http://www.perforce.com/perforce/loadprog.html > _______________________________________________ > Nprof-developers mailing list > Nprof-developers-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org > https://lists.sourceforge.net/lists/listinfo/nprof-developers -- Matthew Mastracci <[email protected]> ------------------------------------------------------- This SF.net email is sponsored by: Perforce Software. Perforce is the Fast Software Configuration Management System offering advanced branching capabilities and atomic changes on 50+ platforms. Free Eval! http://www.perforce.com/perforce/loadprog.html