Project Home
Project Home
Trackers
Trackers
Documents
Documents
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - Application Profiling a remote process (qconn): (10 Items)
   
Application Profiling a remote process (qconn)  
Hello:

I tried running the application profiler on running process on my target (Profile as) but I don't get any statistics. 
When I (Run as) and follow the instructions to profile I get the expected statistics.

Does the IDE support profiling a remote process? If so, what are the correct steps to go about collecting data?

Thanks,

Gervais
Re: Application Profiling a remote process (qconn)  
Application Profiler does support connecting to remote processes via QConn to perform application profiling.

To do so you need to use a "C/C++ QNX Attach to Remote Process via QCONN (IP)" launch configuration and add the "
Application Profiler" launch tool. (Found under Debug Configurations).

Our tools do not use the "Profile as..." functionality.
RE: Application Profiling a remote process (qconn)  
Is there a way to do this without tripping the debugger? From Run-As
instead?

Thanks 

-----Original Message-----
From: David Cummings [mailto:community-noreply@qnx.com] 
Sent: November 9, 2009 3:09 PM
To: general-ide
Subject: Re: Application Profiling a remote process (qconn)

Application Profiler does support connecting to remote processes via
QConn to perform application profiling.

To do so you need to use a "C/C++ QNX Attach to Remote Process via QCONN
(IP)" launch configuration and add the "Application Profiler" launch
tool. (Found under Debug Configurations).

Our tools do not use the "Profile as..." functionality.



_______________________________________________

General
http://community.qnx.com/sf/go/post41650
Re: RE: Application Profiling a remote process (qconn)  
No, there isn't.
RE: RE: Application Profiling a remote process (qconn)  
I don't seem to have collected any statistics using the method you
described. I mean give it a shot here's my sample code:

#include <stdlib.h>
#include <stdio.h>
#include <unistd.h> /* for alarm(), sleep() */

void runner(void){
	printf("running...\n");
}

int main(int argc, char *argv[]) {
	printf("Welcome to the QNX Momentics IDE\n");

	alarm(180); /* SIGALRM after 3 minutes */
	while(1){
		runner();
		sleep(1); /* yield cpu for 1 sec */
	}

	return EXIT_SUCCESS;
}

I am expecting to see a call count increasing for "runner()" but I see
nothing at all. Its just blank as if I were profiling an app without
profiling support.

Thanks for you help with this.

Gervais 

-----Original Message-----
From: David Cummings [mailto:community-noreply@qnx.com] 
Sent: November 9, 2009 3:26 PM
To: general-ide
Subject: Re: RE: Application Profiling a remote process (qconn)

No, there isn't.



_______________________________________________

General
http://community.qnx.com/sf/go/post41652
Re: RE: RE: Application Profiling a remote process (qconn)  
How did you launch process you trying to connect to? It has to be launch with application
profiling enabled as well. Isn't it documented in IDE User Guide?
Re: RE: RE: Application Profiling a remote process (qconn)  
RE: RE: RE: Application Profiling a remote process (qconn)  
This is what I got in the debug window:
<snip>
MsgNak received - resending
Remote target is little-endian
attach 1409065
[New process 1409065 thread 1 (state = 0x0c)]
(no debugging symbols found)
0xb033e695 in TimerTimeout () from
C:/QNX641/target/qnx6/x86/lib/libc.so.3 
</snip>

So I resumed the process - I have putty open so I can see the scrolling,
but in the Execution Time window the data is missing.
I will keep looking at it.

Thanks for the link. 

-----Original Message-----
From: Elena Laskavaia [mailto:community-noreply@qnx.com] 
Sent: November 9, 2009 3:58 PM
To: general-ide
Subject: Re: RE: RE: Application Profiling a remote process (qconn)

http://www.qnx.org/developers/docs/6.4.1/ide_en/user_guide/profiler.html
#PROFaRunProcess




_______________________________________________

General
http://community.qnx.com/sf/go/post41658
Re: RE: RE: RE: Application Profiling a remote process (qconn)  
So a) Don't run with debugger (Use Profile launch config)
b) Looks like you binary compiled without debug info which would not help either. Make sure you did required 
instrumentation and debug options.
c) You need to run your process with special env vars set up if you attaching, see
http://www.qnx.org/developers/docs/6.4.1/ide_en/user_guide/profiler.html#profile_already_running
Re: RE: Application Profiling a remote process (qconn)  
Yes, if you create "Profile" configuration instead of Debug configuration