Analyzers
Support for Analyzers (Intel VTune™ Profiler, Intel Advisor, Intel Inspector)
4644 Discussions

Inspector 2021.2 can't work for application child process

LongKui
Novice
1,045 Views

LongKui_0-1620740077382.png

I want to analyze application child process, have inputted the full command line, but Inspector can't find out any memory leak and display some error messages:

LongKui_1-1620740401840.png

If I clean "Child application" textfield, Inspector will only analyze my main process and work normally.

Could anyone solve the problem?

Labels (1)
0 Kudos
10 Replies
JananiC_Intel
Moderator
1,013 Views

Hi,


Thanks for posting in Intel forums.


We will try from our side meanwhile make sure you have made appropriate changes for the project in the advanced target application properties.

For reference:https://software.intel.com/content/www/us/en/develop/documentation/inspector-user-guide-windows/top/...


Regards,

Janani Chandran


LongKui
Novice
999 Views

Hi, Janani Chandran

 

Thanks for reply.

 

I have writed simple C++ memory leak program, can reproduce the issue 100%:

#include <iostream>
#include <Windows.h>

int main(int argc, char* argv[])
{
    if (argc >= 2 && strcmp(argv[1], "child") == 0) {
        // Memory leak
        char* buffer = new char[]{"I'm child process!\n"};
        std::cout << buffer;
    } else {
        // Memory leak
        char* buffer = new char[]{"I'm main process!\n"};
        std::cout << buffer;
        ShellExecuteA(NULL, NULL, argv[0], "child", NULL, SW_SHOW);
    }
    system("pause");
    return 0;
}

Project properties:

LongKui_0-1620906014496.png

Some error messages displayed, and can't find out any memory leak:

LongKui_1-1620906303169.png

LongKui_2-1620906444749.png

 

JananiC_Intel
Moderator
961 Views

Hi,


Thanks for the update.


In your screenshot we could see that you are using the same main application in child application field. In child application field you have to give the application which is used to inspect a file that is not the starting application. For example it inspects an .exe file called by a script (identified in the Application field).


You have to give the application which is called from the main program. In your code you have called two different processes instead you can call another application and you can include that in your child application field.


Hope this helps!


Regards,

Janani Chandran


JananiC_Intel
Moderator
929 Views

Hi,

 

To analyze child process give child as a parameter in application parameter field instead of adding that in child application field. Refer the attached screenshot for reference.

 

Try this and let us know the updates.

 

Regards,

Janani Chandran

 

JananiC_Intel
Moderator
916 Views

Hi,


Is your issue resolved? Do you have any update?


Regards,

Janani Chandran


LongKui
Novice
894 Views

Hi, Janani Chandran

 

Sorry for late reply.

 

My application child process must be started by main process, can't run independently. The process architecture is similar with google chrome browser:

LongKui_0-1622628179360.png

So I can't input child process command line parameter into "Application parameters" textfield.

JananiC_Intel
Moderator
860 Views

Hi,


Sorry for the delay.


We are working on this and will let you know the updates.


Regards,

Janani Chandran


JananiC_Intel
Moderator
833 Views

Hi,


For your information, if you launch a script and when that script calls an exe then they are all analyzed in inspector and if you specify the child then that will display child exe's diagnostics. So the entire process is analyzed.


Also in child application field you cannot specify any process as it is meant for exe files and no arguments are needed. So for your case, you can put the entire application(parent+child) in application field as this will profile everything.


Hope this helps. Try this and let us know the updates.


Regards,

Janani Chandran


JananiC_Intel
Moderator
807 Views

Hi,


Is your issue resolved?Do you have any update?


Regards,

Janani Chandran


JananiC_Intel
Moderator
783 Views

Hi,


We assume that your issue is resolved. If you need any additional information, please submit a new question as this thread will no longer be monitored.


Regards,

Janani Chandran


Reply