Transforming the Stack
One of the advanced features that TotalView provides is a fully unified Call Stack of all the Python and C/C++ frames. Further, the Call Stack removes all the noisy "glue" calls that tie together the two languages, displaying a concise, developer-oriented view of the call from Python into C/C++.
NOTE >> The ability to transform stack frames is a general capability in TotalView known as the Stack Transformation Facility (STF). To learn more about the STF and how it works, see
Part 2,Transformations.
Figure 75 shows an untransformed stack on the left and a transformed stack on the right. The transformed stack is how the developer conceptually thinks about the calls in a program.
Controlling the transform feature
When TotalView detects you are debugging a Python program, TotalView enables transforming the Python call frame information from the Python interpreter.
You can disable or renable stack trace filtering using one of the following methods:
• Click the transform button (
) in the Call Stack view to toggle the transform on or off.
• Enter the following command in the Command Line view:
dstacktransform | disable | enable
• Use state variables to control the filtering of the stack:
— stack_trace_transform_enabled (defaults to false)
This variable controls whether any stack filtering occurs.
— auto_filter_stack (defaults to true)
This variable controls whether the Stack Transform support attempts to automatically detect if an application being debugged contains a feature that could benefit from stack filtering. If this state variable is enabled (as it is by default) and Python is detected, TotalView enables stack trace filtering by setting stack_trace_transform_enabled to true.
By default, an application has stack transformation enabled if Python is detected. If you do not want automatic filter detection, then you must disable auto_filter_stack prior to starting the application.
Controlling the transformation of the stack is handled by TotalView's Stack Transformation Facility (STF), a rule-driven capability that allows stack frames to be matched against regular expressions, and then applying filters to the matching frames.