Rajat Jain
|
Problem faced while trying to profile a sample application.
|
Rajat Jain
01/31/2008 3:27 AM
post4670
|
Problem faced while trying to profile a sample application.
Hi,
I'm trying to do some basic application profiling. Here is my sample application that I'd like to profile:
============== Sample.c ===================
void A()
{
i++;
j--;
}
void B()
{
i--;
j++;
}
int main(int argc, char *argv[]) {
for(;;) {
A();
B();
}
return EXIT_SUCCESS;
}
============================================
The program runs until I terminate it manually by sending SIGTERM. I've built the program with profiling information &
have deselected "strib debug data from application while downloading". Now, in my profiling data, I'd like to see a
function level view of this program - which clearly entails how much time is the code spending in each of the functions
- A, B, main. BUt here is the putput I get from sampling (attached as .gif files).
1) As you can see in the sampling info, there are plenty of more addresses shown where the program is spending it time.
I think it is showing profilinf info at the machine instruction level. I want it to only show a "function level" view.
Is it possible?
2) I do not see "main" function any where in the sampling info?
3) I can't see any of my functions (main / A / B) in the call information / call graph etc?
4) Lastly, trying to double click on function A() in the sampling info results in this error:
"Unable to create this part due to an internal error. Reason for the failure: Text editor does not have a document
provider".
I'd appreciate if some one could help me out with this?
Also, once this is done, I'm looking forward to debugging a SHARED LIBRARY rather than an application. Any references /
tutorials / links / pointers for that will be greatly appreciated.
Thanks,
Rajat
|
|
|