ContributionsMost RecentMost LikesSolutionsRe: How can I speed up the ALlocation Profiler for native VC++ apps?Ah! I didn't think of manually setting up an exclude area! One thing more: Would it be possible to set up inclusion/exclusion areas so that only leaks from new/delete are checked but malloc/free is ignored (or vice versa) ?Re: How can I speed up the ALlocation Profiler for native VC++ apps?Alexei - thanks for the links. I had already skimmed these help topics. I'm just confused that I should need to specify a (C++) class to detect malloc leaks, or asked another way - what "areas" do I need to add to detect malloc leaks? (in addition to leaks from class objects?) cheers, MartinRe: How can I speed up the ALlocation Profiler for native VC++ apps?Thanks for the tip. Unfortunately, this was a case of "WTF, I just checked out the source tree and now I'm seeing memory leaks (as reported my MS CRT)" so I really had no clue where the leak came from and had to include everything. Maybe I misunderstood something about the allocation profiler: There's quite a lot of memory (still) managed by malloc/free in this application -- will leaks from these calls also be detected by AQTime Allocation profiler? cheers, MartinHow can I speed up the ALlocation Profiler for native VC++ apps?Today, I (sucessfully) tried to use AQTime's Allocation Profiler to find some memory leaks in my VC++/MFC Application. The memory leaks were already highlighted by the leak detection built into MSCRT, but this leak detection doesn't tell you *where* the leak was, so is only useful in scenarios with 100% allocation-order reproducibility as it lists the allocation number. So I fired up AQTime Pro 7 and set up the Allocation Profiler for the exe + 1 dll + msvcr80.dll It worked out in the end, but is was so god-awfully slow that it seems of extremely limited use. This is a heavily multithreaded MFC desktop application. In the tests I did, it normally starts up in about 10 second and then runs with nearly no performance impact on my machine. When run under the Allocation Profiler, startup took about 5 minutes (!) and you could not use the app (GUI very unresponsive). Closing it (clicking on the ) worked with a delay of multiple seconds and after several minutes more I had my reports, luckily highlighting the offending call stacks. Obviously, if I had needed to actually *do* anything within my app or if my app wouldn't just idle around w/o the Allocation Profiler, I expect it to never have finished. How can I speed up the Allocation Profiler for a native VC++ app if all I want to do is find memory leaks? Re: Performance Profiling sprintf and friendsI found the problem: Options > General > [ ] Exclude Standard Source Files must not be ticked. (It seems to be on by default.) Then it is sufficient to include MSVCR80.dll and one can profile swscanf.obj br, Martin Performance Profiling sprintf and friendsI'm currently testing some number parsing, where swscanf is used to parse the numbers. To get proper timings for the calling funtction, I wanted to include the swscanf function in the Performance profiler. However, I cannot get this to work. Steps: 1) The executable calls swscanf (among other things) 2) PE Reader -> lists MSVCR80.dll and MSVCRT.dll both of which have swscanf in the export table 3) Right-Click "Add Module to project on these two DLLs 4) They are listed in the module list, however only msvcrt.dll contains any functions there. 5) Either add the whole msvcrt.dll to a Routine-Area, or add just swscanf 6) Run Performance Profiler. Result: * The Function that calls swscanf is line-profiled, the timings seem OK and the line containing the swscanf call correctly shows some percentage value. * (!) Neither the call tree nor the Details or Report panel show the swscanf function. The path for msvcr80.dll is shown as C:\WINDOWS\winsxs\x86_Microsoft.VC80.CRT_1fc8b3b9a1e18e3b_8.0.50727.4053_x-ww_e6967989 The path for msvcrt.dll is shown as C\windows\system32 Isn't it possible to have timings included from these system DLLs? Note that timings from kernel32.dll work allright (e.g. Sleep) cheers, Martin Re: Help interpreting Call-Tree + Editor TimingsThanks, the option Include routine body in Details did the trick indeed! If this is toggled-on then %-Time and %-Time-w-Children will change on the Call Tree panel and on the details panel, now displaying the percentage of the parent routine. (Note that the Call Tree panel doesn't seem to be redrawn immediately the the button for this is toggled.) Could you please update the documentation/description of the pctage columns (Help: Details Panel - Children Table) to include this information? Because the docs for the columns is where I looked first. thanks for the quick help, Martin Re: Profiling and comparing performance when sourcecode changes> Line level results can be compared too, but you will not see the old source code indeed. Are there any plans to improve the line level history? It's also quite annoying when trying to export these resluts? ("Save to sourcefile" doesn't seem to work and the format when printed doesn't look to good.) Next best thing I could think of would be to be able to select the profiled source lines and just copy the text to the clipboard and the Info columns in from of the source are just separated by tabs or something. Other good thing would be if AQTime could fully save the source lines that where profiled, so that the info is available in the history. cheers, Martin Help interpreting Call-Tree + Editor TimingsHi. Attached you can find a modified HTML|PNG file that displays information from the Performance Profiler. The Time columns in the Call Tree do not match up with the Time columns in the line-timings of the Editor. That is, the Function "SetVarIteratorValueFromHistory" is called 140K times and mainly does some float copies. 215 times of the 140K it will copy a string - the editor panel displays the time taken to be approx 4%, which may be correct. However, the time values in the Call Tree columns are useless because they just display 0,00 and the Time-% values seem to be relative percentages of all listed child-functions, which is basically useless. Why aren't the %-Time columns percentages of the parent function? Can this be displayed instead? cheers, Martin -------------- <BR /> TD {TEXT-ALIGN: RIGHT; WHITE-SPACE: NOWRAP}<BR /> .HEADER {FONT-WEIGHT:BOLD; BACKGROUND-COLOR: RGB(200, 200, 200); TEXT-ALIGN: LEFT; WHITE-SPACE: NOWRAP}<BR /> .BOLD {FONT-WEIGHT: BOLD}<BR /> .BI {FONT-WEIGHT: BOLD; FONT-STYLE: ITALIC}<BR /> .STR {TEXT-ALIGN: LEFT; font-family: "Courier New"}<BR /> Children Code Type Routine Name Shared Time % Time % with Children Time Time with Children Max Time Min Time with Children Source Line Hit Count x86 CHistoricDataIterator::UpdateIntern 55,21 0,00 % 0,00 % 0,06 0,11 0,01 0,00 46 471 x86 CHistoricDataIterator::SetVarIteratorValueFromHistory 96,08 98,15 % 98,22 % 0,05 0,05 0,00 0,00 89 144520 x86 CTString::CTString 27,36 62,66 % 51,68 % 0,00 0,00 0,00 0,00 214 215 x86 CTString::Allocate 18,11 33,71 % 68,33 % 0,00 0,01 0,00 0,00 140 18608 x86 CTString::Head 69,98 46,62 % 24,45 % 0,00 0,00 0,00 0,00 66 20849 x86 CTString::operator= 17,44 37,34 % 48,32 % 0,00 0,00 0,00 0,00 1530 215 x86 CTString::~CTString 4,19 41,24 % 88,38 % 0,00 0,04 0,00 0,00 285 11621 x86 CTString::FreeMemory 36,16 100,00 % 100,00 % 0,74 2,05 0,00 0,00 150 13092655 x86 CTString::Head 68,54 45,66 % 5,98 % 0,00 0,00 0,00 0,00 60 11621 x86 CTestBenchPartHistoricDataProxy::VarHistoricData 100,00 1,85 % 1,78 % 0,00 0,00 0,00 0,00 129 5207 /* Hit Count | % Time | % Time w Children */ /* 144520 | 20,33% | 19,53% */ void CHistoricDataIterator::SetVarIteratorValueFromHistory(WORD varId, CHistoricData const& hd, int histIdx) { /* 144520 | 16,43% | 15,78% */ m_plLastIndex[varId]=histIdx; // float /* 144520 | 18,84% | 18,10% */ if(hd.m_pIsStringUpdate[histIdx]) // bool /* 215 | 0,40% | 4,31% */ m_pStrData[varId]=hd.m_pStrData[histIdx]; // CTString::operator== /* 215 | 0,04% | 0,04% */ else /* 144305 | 23,15% | 22,24% */ m_pData[varId]=hd.m_pData[histIdx]; // float /* 144520 | 20,82% | 20,00% */ } Re: Do you use VS2008 integration - what are the advantages?I would also be curious how/if people use the plugin. I'm a relatively new user and I always use the standalon App and have disabled the plugin (just one more thing to slow VS down). One thing I noticed is that when some modules are opened in an AQTime standalone project, sometimes they're locked for writing so I get errors when recompiling. I wonder if that can happen with a plugin project. Also, I expect the standalone App to run smoother that the plugin stuff, but that is pure speculation and contradictions from people that actually use it might be interesting. cheers, Martin