Forum Discussion

HansSchmidt's avatar
New Contributor
14 years ago

Profiling a DLL called by another DLL

Hello everyone,

i'm evaluating your product and on the first look i'm very satisfied with AQTime :)

I've just got two questions:

First of all i work with Delphi 2007.

1) One project is an Exchange Client Extension for Outlook. This is a DLL. Profiling this DLL works fine.

This DLL calls another DLL for some functions. Profiling this doesn't work. When right clicking into a function

and chose profiling this function Outlooks starts but after closing Outlook AQTime doesn't show me the information

about the lines and how long they take with the colors.

What did i do wrong?

2) My second question is where to find the call graph? I've watched your video

AQtime Integrated With Borland Developer Studio

There your can see after profiling the call graph and on the report page i can see a red bar in the time field.

Both doesn't work in my environment.

I'm looking forward for your help.

Greets Hans

5 Replies

  • Hello Hans,

    1) Make some checks:

    - Did you add this DLL to the Modules list?

    - Make sure the DLL should be profiled according to your Areas, Triggers and Actions settings.

    - Are you sure the DLL gets loaded to the profiled process? Check the Event View panel - you should see the Module Loaded message with the DLL full name.

    - Was the DLL compiled with debug information?

    2) Click the "View | AQtime Profile Windows | Other | Call Graph" main menu item in BDS.

    i can see a red bar in the time field.

    Right-click the Time column in the report, select "Format Columns...", switch to the Format tab and select the "Bar" option in the "Display Format" box.
  • Hello Alex,

    first of all thank you for your answer.

    With the "call graph" and the time bar everything works fine after your help.

    But i have still problems with the profiling the dll called by another dll.

    To make that point clear, if i start AQTime as a stand alone application everything works

    as expected. My problem is when using AQTime in Delphi 2007.

    For example ABC.DLL ist the DLL called by Outlook. In Delphi i'm in the

    function "Post". I make a right mouse click say profile Test::Class::Post

    I start the programm and after closing it AQTime has added colors and numbers

    left of the function to show me how long each line takes.

    If i do the same with DEF.DLL which is called by ABC.DLL AQTime and DElphi don't show me

    the colors and numbers for the duration.

    I've tried to add DEF.DLL to the modules list.

    Also i've added the function to an area.

    Both DLLs are compiled with debug information.

    I can't find the Event View Panel in Delphi, only in the stand alone version.

    I really want to buy this software but if i don't get this to work my boss will

    not pay for that :(

    Do you have another ideas?

    Greats Hans

  • Hello Hans,

    The profiling engine is exactly the same in the stand-alone and the integrated versions. So, the difference is likely to indicate a configuration issue in the integrated version. Please see my comments below regarding the Event View panel:

    I can't find the Event View Panel in Delphi, only in the stand alone version.

    You can show the panel by selecting "View | AQtime Profile Windows | Other | Event View" from the Delphi main menu.

    Please do this and check the contents of the panel. If it does not explain anything, please send save the contents to an HTML file and send it to me - I will see what I can find out.

    Also, to help me understand your scenario, could you please record a short video demonstrating the actions you are performing when configuring the Modules list and profiling areas before starting profiling. You can use Jing to record the video - a simple and free screen recording utility.

  • Hey Alex,

    due to i'm not allowed to make a video with original sourcecode

    i created a sample. First of all i show you the main program which calls

    a DLL. I profile a function and the result are the expected colors at the

    left side.

    After that i go to the DLL which is called and try to profile the function.

    Unfortunately no colors are shown.

    Main program and DLL are compiled without optimization but stack-frames

    and debug DCUs. Furthermore TD32 Debug Info and detailled debug symbols.

    If you need further information to solve the problem let me know.

    Video is attached.

    Thanks for your help.

    Greets Hans

  • Hello Hans,

    Thanks for the video.

    I have reproduced the problem. It is related to the fact that the code is in the DPR file of the project.

    Moving the code to a PAS file solves the problem, so this will be a workaround for you for the time being.

    I have added the problem to our bug-tracking system. Thanks for reporting it.