Project Home
Project Home
Trackers
Trackers
Documents
Documents
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - Application Profiler Issue (works but no analysis data): (12 Items)
   
Application Profiler Issue (works but no analysis data)  
App Profiling Issue

I'm attempting to run the application profiler on a legacy project that is quite large.  I followed the instructions 
provided in the help file and all seems simple enough but I'm encountering a problem.

I can build and debug the app without issues.  The app profiler will run while debugging on the target device, but it 
does not recognize any of the functions in the project and hence does not list them under the "Sampling Information" tab
 in the App Profiler Prescriptive.  It will recognize one or two functions from the shared libraries but that's it.  

I'm using QNX Momentics Development Suite 6.3 which uses IDE 3.0.0.

My only theory about the problem is that I think the app builder does not know the location of the source files.  I 
tried the app builder on a similar but much smaller project and it worked.  The difference is that the non-working 
project has it's source files in a "src" folder off of the workspace root while the working one has the source files on 
the root (in C/C++ Project View).  This path is listed in the "Extra Source Paths" compiler options. I also included the
 "src" folder in the "Additional Source Locations" under the Debug menu "source" tab.  Neither worked.  

Any advice is appreciated.  Thanks.
Re: Application Profiler Issue (works but no analysis data)  
If it shows hex address instead of symbols it does not have debug 
information or binary is stripped.
You can use external utility addr2line to check that - use hex address 
and you binary and see it resolves to anything meaningful.
If address is like 0xb - it is probably a library, you can see where 
libraries are loaded using System Information - Memory page.
If you want to profile libraries you have to add shared library search 
path to app profiler too.

rami daman wrote:
> App Profiling Issue
>
> I'm attempting to run the application profiler on a legacy project that is quite large.  I followed the instructions 
provided in the help file and all seems simple enough but I'm encountering a problem.
>
> I can build and debug the app without issues.  The app profiler will run while debugging on the target device, but it 
does not recognize any of the functions in the project and hence does not list them under the "Sampling Information" tab
 in the App Profiler Prescriptive.  It will recognize one or two functions from the shared libraries but that's it.  
>
> I'm using QNX Momentics Development Suite 6.3 which uses IDE 3.0.0.
>
> My only theory about the problem is that I think the app builder does not know the location of the source files.  I 
tried the app builder on a similar but much smaller project and it worked.  The difference is that the non-working 
project has it's source files in a "src" folder off of the workspace root while the working one has the source files on 
the root (in C/C++ Project View).  This path is listed in the "Extra Source Paths" compiler options. I also included the
 "src" folder in the "Additional Source Locations" under the Debug menu "source" tab.  Neither worked.  
>
> Any advice is appreciated.  Thanks.
>
>
>
> _______________________________________________
>
> QNX Momentics Community Support
> http://community.qnx.com/sf/go/post56063
>
>   
Re: Application Profiler Issue (works but no analysis data)  
> If it shows hex address instead of symbols it does not have debug 
> information or binary is stripped.
> You can use external utility addr2line to check that - use hex address 
> and you binary and see it resolves to anything meaningful.
> If address is like 0xb - it is probably a library, you can see where 
> libraries are loaded using System Information - Memory page.
> If you want to profile libraries you have to add shared library search 
> path to app profiler too.

Hi Elena, 
Thanks for the reply.

The 1 or 2 shared library functions that are displayed in the Sampling Info tab does appear in symbol form, not hex.  As
 I stated, I can build and debug on the target without any issues so I'm pretty sure the debug info and binary are ok.  


The required shared libraries are included.  However, I'm unable to see the functions from within the source code for 
the project.  There are about 40 source files with multiple functions each and the app profiler does not display a 
single one.  How can I verify that the app builder knows where the source files are?  Does it base it off of the 
compiler options or is it strictly looking for the source files on the root of the project? 
Re: Application Profiler Issue (works but no analysis data)  
I still don't understand. You cannot see functions (symbolic names) or 
you cannot navigate to source code when you click on them (on symbolic 
names?)
Can you attach screenshot? To see if it is a project setup issues write 
a hello world test which loops forever and call some functions and see 
it gives you expected results.

rami daman wrote:
>> If it shows hex address instead of symbols it does not have debug 
>> information or binary is stripped.
>> You can use external utility addr2line to check that - use hex address 
>> and you binary and see it resolves to anything meaningful.
>> If address is like 0xb - it is probably a library, you can see where 
>> libraries are loaded using System Information - Memory page.
>> If you want to profile libraries you have to add shared library search 
>> path to app profiler too.
>>     
>
> Hi Elena, 
> Thanks for the reply.
>
> The 1 or 2 shared library functions that are displayed in the Sampling Info tab does appear in symbol form, not hex.  
As I stated, I can build and debug on the target without any issues so I'm pretty sure the debug info and binary are ok.
  
>
> The required shared libraries are included.  However, I'm unable to see the functions from within the source code for 
the project.  There are about 40 source files with multiple functions each and the app profiler does not display a 
single one.  How can I verify that the app builder knows where the source files are?  Does it base it off of the 
compiler options or is it strictly looking for the source files on the root of the project? 
>
>
>
> _______________________________________________
>
> QNX Momentics Community Support
> http://community.qnx.com/sf/go/post56071
>
>   
Re: Application Profiler Issue (works but no analysis data)  
> I still don't understand. You cannot see functions (symbolic names) or 
> you cannot navigate to source code when you click on them (on symbolic 
> names?)
> Can you attach screenshot? To see if it is a project setup issues write 
> a hello world test which loops forever and call some functions and see 
> it gives you expected results.
> 

Ok no problem, I'll do my best to explain. 

Here are 3 screen captures (see other two threads for the rest).  I can only attach one per thread on this forum.  

The first bmp is just highlighting the running App Profiler.  You can see 4 functions listed in Sampling Info view.  

The second bmp is highlighting the shared library "ldqnx.so.2" which shows 4 functions.  

The third highlights the "gui_perfusion_g" project.  As you can see, no functions are listed even though there are 
multiple files and dozens of functions.  

I'm expecting the App Profiler to list all functions in "gui_perfusion" project.  It does not.  Do I need to identify 
which files I want it to analyze and then it'll display the functions?

The profiler works when I use it with another project that is setup the same way as this one but is much smaller.
Attachment: Bitmap untitled4.bmp 3.71 MB
Re: Application Profiler Issue (works but no analysis data)  
Here's the 2nd bmp
Attachment: Bitmap untitled5.bmp 3.71 MB
Re: Application Profiler Issue (works but no analysis data)  
Ok. I see now. If you can see on you screenshot you project was running 
maybe for 10 msec, it has only 6 samples!
Sampling profiling require process to run for a LONG time doing same 
thing to receive anything substantial.
You functions were not hit by sampling at all, because it samples only 
each 1 msec. You would need high resolution profiling in this
case. This release you using is very old it does not have function 
instrumentation profiling.

rami daman wrote:
>> I still don't understand. You cannot see functions (symbolic names) or 
>> you cannot navigate to source code when you click on them (on symbolic 
>> names?)
>> Can you attach screenshot? To see if it is a project setup issues write 
>> a hello world test which loops forever and call some functions and see 
>> it gives you expected results.
>>
>>     
>
> Ok no problem, I'll do my best to explain. 
>
> Here are 3 screen captures (see other two threads for the rest).  I can only attach one per thread on this forum.  
>
> The first bmp is just highlighting the running App Profiler.  You can see 4 functions listed in Sampling Info view.  
>
> The second bmp is highlighting the shared library "ldqnx.so.2" which shows 4 functions.  
>
> The third highlights the "gui_perfusion_g" project.  As you can see, no functions are listed even though there are 
multiple files and dozens of functions.  
>
> I'm expecting the App Profiler to list all functions in "gui_perfusion" project.  It does not.  Do I need to identify 
which files I want it to analyze and then it'll display the functions?
>
> The profiler works when I use it with another project that is setup the same way as this one but is much smaller.
>
>
>
> _______________________________________________
>
> QNX Momentics Community Support
> http://community.qnx.com/sf/go/post56075
>   
>
> ------------------------------------------------------------------------
>
Re: Application Profiler Issue (works but no analysis data)  
no, that is not the problem.  I've left it for minutes at a time without proper results.  These screen shots were taken 
to just clarify the issue for you.  

Here is the third screenshot.
Attachment: Bitmap untitled6.bmp 3.71 MB
Re: Application Profiler Issue (works but no analysis data)  
If screenshots were taken after "minutes" and you still have only 11 
samples means you application were not running, it was blocked or something.


rami daman wrote:
> no, that is not the problem.  I've left it for minutes at a time without proper results.  These screen shots were 
taken to just clarify the issue for you.  
>
> Here is the third screenshot.
>
>
>
> _______________________________________________
>
> QNX Momentics Community Support
> http://community.qnx.com/sf/go/post56078
>   
>
> ------------------------------------------------------------------------
>
Re: Application Profiler Issue (works but no analysis data)  
Excuse me, in my hast, I replied without fully reading your response.  

What does "function instrumentation profiling" mean?  

The screen shots were taken while the app was running for minutes.  It doesn't matter how long I run it since I get the 
same results.  You mentioned it might be blocked.  I'm not sure if I understand what you mean by that, but I am fully 
able to debug the application on the target with the App Profiler running.  If it is being blocked, then would I be able
 to debug?  I would imagine not.

The problem is not with the functions that are being listed, but the functions that are not.  There are dozens of 
functions in gui_perfusion project that are not being listed by the App Profiler. 
RE: Application Profiler Issue (works but no analysis data)  
They are listed because they have not been sampled! "Blocked" means in
blocked state accourding to neutrino os docs. Means it is not running.
If You are debugging it and it is stopped it is not running. You can run
system profiler logging and check what state is your process in. 

-----Original Message-----
From: rami daman [mailto:community-noreply@qnx.com] 
Sent: June 4, 2010 2:50 PM
To: momentics-community
Subject: Re: Application Profiler Issue (works but no analysis data)

Excuse me, in my hast, I replied without fully reading your response.  

What does "function instrumentation profiling" mean?  

The screen shots were taken while the app was running for minutes.  It
doesn't matter how long I run it since I get the same results.  You
mentioned it might be blocked.  I'm not sure if I understand what you
mean by that, but I am fully able to debug the application on the target
with the App Profiler running.  If it is being blocked, then would I be
able to debug?  I would imagine not.

The problem is not with the functions that are being listed, but the
functions that are not.  There are dozens of functions in gui_perfusion
project that are not being listed by the App Profiler. 



_______________________________________________

QNX Momentics Community Support
http://community.qnx.com/sf/go/post56085
Post Deleted