HP PAK Performance Analysis Tools User's Guide
24 Chapter 2
Puma Concepts
How Puma Analyzes Recursive Procedures
stub built at the recursive call to a, since the transformation from main
a b a to main a loses the only instance of b. However, it would have a
recursive stub at the recursive call to b, since the collapsing of main a b
a b to main a b loses an instance of a, but leaves another one. As
another example, the call chain main a b c b a d c would not have
any recursive stubs using Conservative collapse. Building a stub at
the recursive second call to b would lose c; building one at the recursive
second call to a would lose b and c; and building one at the recursive
second call to c would lose d.
Full Collapse
The Full collapse option causes a recursive stub to be built whenever
there is any higher instance of a routine in the call tree. For example, for
main a b c b a d c, the call chain that is discussed above, a stub
would be created from the recursive call to b, and another at the
recursive call to a. There would not be one at the recursive call to c,
because after the other recursive jumps the other instance of c is no
longer higher in the tree. In particular, the analysis just from this one
stack trace would look like the following example.
Samples Samples
In or Under In Only
Raw Count Raw Count Level
---
1 0 1 main
102a
103b
104c
5 b...
4 a...
0 (1) 0 3 d
0 (1) 1 4 c
When Puma encounters the second b in the call chain main a b c
b a d c, it builds a recursive stub (at Level 5 in the analysis) up to the
higher b (at Level 3). It then jumps up to that b. When it comes to the
second a, Puma builds a recursive stub (the a at Level 4) as a child of the
instance of b at Level 3, and pointing up to the instance of a at Level 2.
For d, Puma builds an ordinary node (not a recursive stub). For the final
c (the last line of the analysis), it does not build a recursive stub, because
the first c is not an ancestor of the current node. The ancestors of the
current node are d , a (at Level 2), and main (at Level 1). The last two