Forum Discussion

newsgroups's avatar
newsgroups
Occasional Contributor
11 years ago
Solved

Uninstrumented routines, Duplicate code, C++ Builder XE4

When I run a Performance profiler on my VCL GUI application, the Uninstrumented Routines dialog reports that all of my forms that derive from base forms contain Duplicated Code.



How can I find out which code is triggering this condition in the profiler?



The help pages explain a compiler setting for Visual Studio, but unfortunately I don't know how to translate that information into something that might correspond in C++ Builder XE4.



Thanks for your help.



Kathleen

  • Hi All,



    We are constantly working on improving the code instrumentation. However, AQtime's ability to instrument a certain routine heavily depends on how the compiler generates the routine's code. So, the generated binary code analysis clarifies why it cannot be instrumented. Note: AQtime provides the Disassembler panel to analyze the binary code.



    The Profiling Duplicated Code article contains an example of how to affect the generated code to instrument it. In general, we suggest that you adjust optimization settings of your compiler to determine how it affects the Uninstrumented Routines dialog's list.


9 Replies

  • newsgroups's avatar
    newsgroups
    Occasional Contributor
    To update anybody who may be reading this thread, Jay noted that I was profiling a C++ Builder XE4 GUI application compiled for 64-bit. He suggested I try building it as 32-bit and see if that made a difference.



    It did. Not only did the warnings about duplicate code go away, but AQtime was able to open my executable instantly; the 64-bit build takes upwards of ten minutes to analyze upon opening.
  • HTMLValidator_c's avatar
    HTMLValidator_c
    Occasional Contributor
    I too run into this a lot. I've just mostly ignored it, after looking it to it a little and determining there was not much I could do that was practical to resolve this.



    I have always been hoping future versions of AQTime would be able to instrument more functions.



    If not, then more detail on what is causing it or how to get around it would be quite useful.

  • newsgroups's avatar
    newsgroups
    Occasional Contributor
    Unfortunately, whatever is causing this affects all of my forms. I'm hoping to hear it's something about declarations... such as "carry the 'virtual' down to the derived classes".
  • aqAnt's avatar
    aqAnt
    SmartBear Alumni (Retired)


    Hi All,



    We are constantly working on improving the code instrumentation. However, AQtime's ability to instrument a certain routine heavily depends on how the compiler generates the routine's code. So, the generated binary code analysis clarifies why it cannot be instrumented. Note: AQtime provides the Disassembler panel to analyze the binary code.



    The Profiling Duplicated Code article contains an example of how to affect the generated code to instrument it. In general, we suggest that you adjust optimization settings of your compiler to determine how it affects the Uninstrumented Routines dialog's list.


  • AlexKaras's avatar
    AlexKaras
    Champion Level 3
    Hi Kathleen,



    Thank you for the update.

    Was it somehow commented by Jay?

    Does it mean the AQtime has problems with profiling 64-bit applications? Or only with XE4 64-bit? Or, maybe, it was related to your OS (e.g. Win8)? Or, maybe, XE4 indeed generates duplicated code for 64-bit apps?
  • newsgroups's avatar
    newsgroups
    Occasional Contributor
    Hi Alex,



    I believe the problem is with AQtime, XE4 and 64-bit applications. Something about how XE4 creates the assembly code (I couldn't view it in the Disassembly panel because of the Duplicate Code error... Catch-22).



    My OS is Win7-64, and I keep all Microsoft patches up-to-date.



    Kathleen
  • aqAnt's avatar
    aqAnt
    SmartBear Alumni (Retired)


    Hi Alex,



    Profiling 64-bit applications has its peculiarities. However, the situation with the 64-bit C++Builder application is not related to any of them. Moreover, AQtime doesn't have any known problems with the reading of debug information from the C++Builder applications.



    It appears that the situation is caused by the fact that C++Builder links the 64-bit code in a specific way. We have registered it in our DB, so we will continue working on it.


  • AlexKaras's avatar
    AlexKaras
    Champion Level 3
    Hi Jay,



    Thank you for this additional explanation - it made the situation much more clear.