Currently, using Delphi 64bit generated code the AS operator as well as for loops with constant integers generate code that is detected by AQTime as unsafe.
Nevertheless I want to be able to profile this code, or at least allow it to fire some trigger.
So the idea is to allow these "unsafe" routines to be "forcibly" instrumented by adding them in your project as "ignore unsafe" routines.
While using AQTime Pro, I was trying to use Actions within AQTime to periodically capture fresh snapshots of my application.
I am basically setting up an action to Get Results when method FOO is Entered, and another action to Clear Results when method FOO is Exited. Unfortunately, when I try to launch the profiler, I get a message about this method being included in multiple actions. Obviously, I can work around this by adding another method that gets called within FOO and associate one of the actions to that, but I would like to avoid having to do so if possible.
I was told by customer care that this funcationality (multiple actions in one method) is currently not supported. I am requesting that it please be added in a future release. At the very least a simple solution is to still maintain this restriction, but to add a new compound Action type that does both a “Get Result” and a “Clear Result”.
The version I was using that lacked the functionality I am requesting was AQTime 8.24 build 1261.
Currently, Performance Profiler causes program crash when profiling code using Fibers API (see Case #00169159: Program halts when run under Performance Profiler).
1) Compile attached Delphi program.
Note it uses Fiber API to implement generator:
2) Run it. The output is
3) Open in AQTime, select Performance Profiler, All Project Modules. Run.
The program halts. Event View window shows:
Event Thread ID Time
Project run selected, current profiler is Performance Profiler. 18:27:24:533
Process create ID: 5572, Thread ID: 8316, Base address: 0x00400000 8316 18:27:24:544
Module loaded: fiberdemo.exe; Base address: 0x00400000 File Size: 1155763 Version: 0.0.0.0 8316 18:27:24:545
Module loaded: C:\Windows\SysWOW64\ntdll.dll; Base address: 0x778D0000 File Size: 1535032 Version: 10.0.10240.16683 8316 18:27:24:549
Module loaded: C:\Windows\SysWOW64\kernel32.dll; Base address: 0x751F0000 File Size: 624312 Version: 10.0.10240.16384 8316 18:27:24:551
Module loaded: C:\Windows\SysWOW64\KernelBase.dll; Base address: 0x75540000 File Size: 1531368 Version: 10.0.10240.16683 8316 18:27:24:552
Module loaded: C:\Windows\SysWOW64\oleaut32.dll; Base address: 0x76CA0000 File Size: 591912 Version: 10.0.10240.16384 8316 18:27:24:623
Module loaded: C:\Windows\SysWOW64\msvcrt.dll; Base address: 0x74EF0000 File Size: 773168 Version: 7.0.10240.16384 8316 18:27:24:624
Thread create ID: 4916; Priority: Normal 4916 18:27:24:626
Module loaded: C:\Windows\SysWOW64\combase.dll; Base address: 0x74BB0000 File Size: 1811360 Version: 10.0.10240.16683 8316 18:27:24:942
Module loaded: C:\Windows\SysWOW64\rpcrt4.dll; Base address: 0x77820000 File Size: 705520 Version: 10.0.10240.16412 8316 18:27:25:023
Module loaded: C:\Windows\SysWOW64\sspicli.dll; Base address: 0x749E0000 File Size: 116216 Version: 10.0.10240.16384 8316 18:27:25:024
Module loaded: C:\Windows\SysWOW64\cryptbase.dll; Base address: 0x749D0000 File Size: 31528 Version: 10.0.10240.16384 8316 18:27:25:031
Module loaded: C:\Windows\SysWOW64\bcryptprimitives.dll; Base address: 0x74970000 File Size: 365128 Version: 10.0.10240.16384 8316 18:27:25:032
Module loaded: C:\Windows\SysWOW64\sechost.dll; Base address: 0x74FB0000 File Size: 263432 Version: 10.0.10240.16384 8316 18:27:25:033
Thread create ID: 4712; Priority: Normal 4712 18:27:25:034
Thread create ID: 8616; Priority: Normal 8616 18:27:25:034
Module loaded: C:\Windows\SysWOW64\advapi32.dll; Base address: 0x75000000 File Size: 497896 Version: 10.0.10240.16644 8316 18:27:25:035
Module loaded: C:\Windows\SysWOW64\user32.dll; Base address: 0x752E0000 File Size: 1310880 Version: 10.0.10240.16603 8316 18:27:25:038
Module loaded: C:\Windows\SysWOW64\gdi32.dll; Base address: 0x74D70000 File Size: 1365576 Version: 10.0.10240.16644 8316 18:27:25:039
Module loaded: C:\Windows\SysWOW64\imm32.dll; Base address: 0x777F0000 File Size: 168400 Version: 10.0.10240.16384 8316 18:27:25:042
Module loaded: C:\Windows\SysWOW64\msctf.dll; Base address: 0x75420000 File Size: 1180696 Version: 10.0.10240.16683 8316 18:27:25:043
Module loaded: C:\Program Files (x86)\SmartBear\AQtime 8\Bin\Extensions\aqNatProf.dll; Base address: 0x30800000 File Size: 1470416 Version: 8.50.1720.7 8316 18:27:25:045
Module loaded: C:\Windows\SysWOW64\shell32.dll; Base address: 0x756C0000 File Size: 20858360 Version: 10.0.10240.16724 8316 18:27:25:046
Module loaded: C:\Windows\SysWOW64\windows.storage.dll; Base address: 0x76E80000 File Size: 5120056 Version: 10.0.10240.16515 8316 18:27:25:046
Module loaded: C:\Windows\SysWOW64\shlwapi.dll; Base address: 0x77360000 File Size: 274768 Version: 10.0.10240.16384 8316 18:27:25:046
Module loaded: C:\Windows\SysWOW64\kernel.appcore.dll; Base address: 0x74EC0000 File Size: 39792 Version: 10.0.10240.16384 8316 18:27:25:047
Module loaded: C:\Windows\SysWOW64\SHCore.dll; Base address: 0x75090000 File Size: 565656 Version: 10.0.10240.16384 8316 18:27:25:047
Module loaded: C:\Windows\SysWOW64\powrprof.dll; Base address: 0x76D40000 File Size: 269648 Version: 10.0.10240.16384 8316 18:27:25:048
Module loaded: C:\Windows\SysWOW64\profapi.dll; Base address: 0x77780000 File Size: 53728 Version: 10.0.10240.16384 8316 18:27:25:048
Module loaded: C:\Windows\SysWOW64\ole32.dll; Base address: 0x77570000 File Size: 952968 Version: 10.0.10240.16724 8316 18:27:25:049
Module loaded: C:\Windows\SysWOW64\version.dll; Base address: 0x748D0000 File Size: 27360 Version: 10.0.10240.16384 8316 18:27:25:049
Module loaded: C:\Windows\SysWOW64\winsta.dll; Base address: 0x6FFF0000 File Size: 261896 Version: 10.0.10240.16384 8316 18:27:25:052
Module loaded: C:\Windows\SysWOW64\utildll.dll; Base address: 0x5D400000 File Size: 39248 Version: 10.0.10240.16384 8316 18:27:25:053
Module loaded: C:\Windows\SysWOW64\setupapi.dll; Base address: 0x74A00000 File Size: 1733880 Version: 10.0.10240.16384 8316 18:27:25:053
Module loaded: C:\Windows\SysWOW64\cfgmgr32.dll; Base address: 0x773B0000 File Size: 214360 Version: 10.0.10240.16384 8316 18:27:25:054
Module loaded: C:\Windows\SysWOW64\srvcli.dll; Base address: 0x73BD0000 File Size: 73360 Version: 10.0.10240.16724 8316 18:27:25:055
Module loaded: C:\Windows\SysWOW64\browcli.dll; Base address: 0x702F0000 File Size: 43520 Version: 10.0.10240.16724 8316 18:27:25:055
Module loaded: C:\Windows\SysWOW64\samcli.dll; Base address: 0x702D0000 File Size: 65024 Version: 10.0.10240.16384 8316 18:27:25:056
Module loaded: C:\Windows\SysWOW64\netutils.dll; Base address: 0x73BF0000 File Size: 34600 Version: 10.0.10240.16384 8316 18:27:25:056
Module loaded: C:\Windows\SysWOW64\logoncli.dll; Base address: 0x73B80000 File Size: 179256 Version: 10.0.10240.16384 8316 18:27:25:057
Module loaded: C:\Program Files (x86)\SmartBear\AQtime 8\Bin\aqProf.dll; Base address: 0x10000000 File Size: 865232 Version: 8.50.1720.7 8316 18:27:25:061
Module loaded: C:\Windows\SysWOW64\netapi32.dll; Base address: 0x73C30000 File Size: 69232 Version: 10.0.10240.16724 8316 18:27:25:062
Module loaded: C:\Windows\SysWOW64\wkscli.dll; Base address: 0x73C00000 File Size: 55808 Version: 10.0.10240.16724 8316 18:27:25:062
Module loaded: C:\Windows\SysWOW64\bcrypt.dll; Base address: 0x73BB0000 File Size: 106896 Version: 10.0.10240.16384 8316 18:27:25:063
Module loaded: C:\Program Files (x86)\SmartBear\AQtime 8\Bin\aqComm.dll; Base address: 0x30200000 File Size: 254416 Version: 8.50.1720.7 8316 18:27:25:065
Module loaded: C:\Windows\SysWOW64\ws2_32.dll; Base address: 0x776C0000 File Size: 372912 Version: 10.0.10240.16384 8316 18:27:25:066
Module loaded: C:\Windows\SysWOW64\nsi.dll; Base address: 0x75080000 File Size: 20160 Version: 10.0.10240.16384 8316 18:27:25:066
Thread create ID: 9996; Priority: Normal 9996 18:27:25:068
Thread create ID: 4968; Priority: Normal 4968 18:27:25:068
First chance exception 0xC0000005 ACCESS_VIOLATION occurred at 0x00000000, read of address 0x00000000 at 0x00000000 8316 18:27:25:122
Second chance exception 0xC0000005 ACCESS_VIOLATION occurred at 0x656AD9C1, read of address 0x00000000 at 0x656AD9C1 8316 18:27:25:123
Thread exit ID: 9996; Exit code: -1073741819 (0xC0000005) 9996 18:27:26:818
Thread exit ID: 8316; Exit code: -1073741819 (0xC0000005) 8316 18:27:26:819
Thread exit ID: 4712; Exit code: -1073741819 (0xC0000005) 4712 18:27:26:821
Thread exit ID: 8616; Exit code: -1073741819 (0xC0000005) 8616 18:27:26:821
Thread exit ID: 4968; Exit code: -1073741819 (0xC0000005) 4968 18:27:26:821
Process exit ID: 5572; Exit code: -1073741819 (0xC0000005) 18:27:26:822
Debug symbols read for fiberdemo.exe 18:28:50:103
It is proposed that Performance Profiler correclty supports Fiber API.
As AQTime stores absolute paths to profiled modules in the project, it would be great if it is possible to specify a new location for several modules in one shot when modules are moved or the project is opened on different computer.
The results of the "Light Coverage" profiler should merge the results of all routines with different template parameters.
Let's say, you have code like the example below. When you profile the application with AQtime (Light Coverage Profiler), you will get two lines in the results output: one for the template parameter "int", and one for the template parameter "double". None of the two routines are marked fully covered, whereas the combined/merged coverage for all template parameters would be 100%.
We have lots of code like in this example, and we are only interested in the total coverage of "silly_function", regardless of the used template parameter. Would it be possible to implement this "merge" feature into a future version of AQtime?
template <typename T>
T silly_function(const T arg)
if (arg < 5) return (arg + 1);
else return (arg - 1);
int main(int argc, char* argv)
std::cout << silly_function(4) << std::endl;
std::cout << silly_function(6.0) << std::endl;
Light Coverage result:
Routine Name % Covered
We often have the problem that we want to profile executables, which are started indirectly by another executable, for example:
A.EXE is starting B.EXE
and B.EXE is the process, which shall be profiled.
By using AQtime, it is only possible to profile A.EXE directly.
I have seen this workaround in the forum: https://support.smartbear.com/viewarticle/43332/
But this solution is not feasible for us, because modifying the registry for this purpose is very cumbersome. An easier solution would be highly appreciated.
We are using the "Light Coverage Profiler" with "collect info about lines: on" for creating coverage reports of our unit tests.
Let's say, you have C++ code like this:
__declspec(noreturn) void throw_bad_cast();
__declspec(noreturn) void throw_bad_cast()
And let's assume that the function is hit when the main program is executed.
However, AQtime will mark the last line of the function "throw_bad_cast" as "not covered" (the line with the closing brace).
The (invisible) return statement of the function will never be reached, so the resulting report gives the impression that the code coverage is incomplete.
Thus, it would be nice if unreachable code like this would be ignored in the coverage results so that the function is marked with "coverage 100%".
When AQTime detects a routine to be unsafe, it would be very helpful if AQTime could tell the line number that causes the code to be unsafe. I have spent quite a lot of time breaking down a fairly complex procedure (method) in subroutines and each time starting the AQTime profiler to to find out if the roune was safe yet.
aLine number would surely help funding out the case of the unsafe code.
Related to Case #00155347