Operating System - HP-UX
1753829 Members
8636 Online
108806 Solutions
New Discussion юеВ

Re: Question about Caliper report

 
SOLVED
Go to solution
blackwater
Regular Advisor

Question about Caliper report

I am reading Caliper documentation and have a difficulty in understanding the call graph. There is an example in the documentation (page 169):

[2] 98.0 15.11 - wordplay::main [2]

29.72 52/52 100 wordplay::uppercase [4]
15.03 39/39 100 wordplay::alphabetic [6]
12.33 137/189 72 libc.so.1::strcpy [5]
12.04 44/44 100 wordplay::extract [7]
10.10 494/1478 33 libc.so.1::strlen [3]
5.67 58/58 100 libc.so.1::_fgets [9]

------------------------------------------------------------------------
0.14 2/1478 0 wordplay::anagramr7 [14]
5.89 87/1478 6 wordplay::extract [7]
29.57 437/1478 30 wordplay::uppercase [4]
30.99 458/1478 31 wordplay::alphabetic [6]
33.42 494/1478 33 wordplay::main [2]
[3] 29.6 100.00 1478 libc.so.1::strlen [3]

The documentation say about it:
"The lines following the primary line describe its subroutines".
So here what I see - wordplay::uppercase has two lines and two values: 29.72% and 30.99%. So my question - why there are two lines and what each value means?

P.S. This thread has been moved from HP-UX > General to HP-UX > languages - HP Forums Moderator

6 REPLIES 6
Dennis Handly
Acclaimed Contributor
Solution

Re: Question about Caliper report

>There is an example in the documentation (page 169):

I assume this is:
http://h21007.www2.hp.com/portal/download/files/unprot/caliper/caliper_5.1/caliper_user_guide.pdf
(Note the forum messes up formatting so we can't decipher your output, since the indentation is important.)

You aren't looking at uppercase, that's [4].
You are showing [2], all the calls FROM main.
And [3], all of the calls TO strlen.

>why there are two lines and what each value means?

It means 29.72% main is calling uppercase.
And 30.99% of alphabetic (not uppercase) is calling strlen.
blackwater
Regular Advisor

Re: Question about Caliper report

Dennis,

Thanks you for your answer. You are right. I am reading http://h21007.www2.hp.com/portal/download/files/unprot/caliper/caliper_5.1/caliper_user_guide.pdf.

It seems now that I understand Call graph report for [2] for wordplay::main and for [3] libc.so.1::strlen.

[2] wordplay::main() is at the top of its section and in the call graph I can see function called from main().

In contrast [3] libc.so.1::strlen is at the bottom of its section and in the report I can see how often it was called from other functions.

That was my difficulty. I saw a function at the bottom of a call graph section and didn't get it why it was put in the bottom of the section.
blackwater
Regular Advisor

Re: Question about Caliper report

I described it in my preceding message. I misunderstood a situation when function name is put at the bottom of a call graph section.
Dennis Handly
Acclaimed Contributor

Re: Question about Caliper report

>[2] main() is at the top of its section

Yes, roots would be at the top.

>[3] strlen is at the bottom of its section

And leaf functions would be at the bottom. In most cases functions would be in the "middle". They are called and call others.
blackwater
Regular Advisor

Re: Question about Caliper report

> In most cases functions would be in the "middle".

Yes, I have alredy seen this and now I understand what it means. Thanks.
Dennis Handly
Acclaimed Contributor

Re: Question about Caliper report

Now I remember where I saw this call graph output described. At the end of gprof's output, there is a big "thesis" explaining things.