HP PAK Performance Analysis Tools User's Guide

Chapter 2 23
Puma Concepts
How Puma Analyzes Recursive Procedures
Puma Recursion Collapsing Options
There are four degrees of recursion collapsing to choose from in a Puma
analysis. They are, in order of increasing presence of recursion
collapsing:
No collapse Performs no recursion collapsing.
Direct collapse Performs recursion collapsing for
direct recursion (that is, if a routine
calls itself directly).
Conservative collapse Performs recursion collapsing unless
doing so would omit any routine
names out of the call chain.
Full collapse Performs recursion collapsing
whenever it encounters a routine for
which there is a higher instance in
the call tree.
No Collapse
As its name implies, the No collapse option causes Puma to perform
no recursion collapsing at all. In the example above, No collapse would
produce the first of the two analyses.
Direct Collapse
The Direct collapse option indicates that a recursive stub should be
used only for direct recursion, that is, only if the prior instance of a
routine in the call tree is the immediate parent of the current instance.
For instance, the call chain main a a a b would have a stub built from
the second a and would effectively be collapsed to main a b. However,
the call chain main a b a b would not have recursive stubs built,
because neither the recursive call to a nor the recursive call to b is direct.
Conservative Collapse
The Conservative collapse option builds recursive stubs in more
circumstances than the Direct collapse. It builds a recursive stub if
doing so would not lose any routine names out of the call chain; that is, if
the routines being cut out are duplicated higher up in the stack trace.
For instance, the call chain main a b a b would not have a recursive