The following commands control how the caller and callee information is displayed.
Print the callers-callees panel for each of the functions, in the order specified by the function sort metric (sort).
Within each caller-callee report, the callers and callees are sorted by the caller-callee sort metrics (csort). You can limit the number of panels written by using the limit command (see Commands That Control Output). The selected (center) function is marked with an asterisk, as shown in this example.
Attr. Excl. Incl. Name User CPU User CPU User CPU sec. sec. sec. 4.440 0. 42.910 commandline 0. 0. 4.440 *gpf 4.080 0. 4.080 gpf_b 0.360 0. 0.360 gpf_a |
In this example, gpf is the selected function; it is called by commandline, and it calls gpf_a and gpf_b.
Specify a selection of callers-callees metrics. By default, the caller-callee metrics is set to match the function list metrics whenever they are changed. If metric_spec is omitted, the current caller-callee metrics setting is displayed.
The string metric_spec is one of the metric keywords described in Metric Lists, as shown in this example.
% cmetrics i.%user:a.%user |
This command instructs er_print to display the following metrics.
Inclusive user CPU time in seconds
Inclusive user CPU time percentage
Attributed user CPU time in seconds
Attributed user CPU time percentage
When the cmetrics command is finished, a message is printed showing the current metric selection. For the preceding example the message is as follows.
current: i.%user:a.%user:name |
By default, the caller-callee metrics are set to match the function list metrics whenever the function list metrics are changed.
Caller-callee attributed metrics are inserted in front of the corresponding exclusive metric and inclusive metric, with visibility corresponding to the logical or of the visibility setting for those two. Static metric settings are copied to the caller-callee metrics. If the metric-name is not in the list, it is appended to it.
A list of all the available metric-name values for the experiments loaded can be obtained with the cmetric_list command.
If a cmetrics command has an error in it, it is ignored with a warning, and the previous settings remain in effect.
Write the callers-callees panel for the named function. The optional parameter N is needed for those cases where there are several functions with the same name. The callers-callees panel is written for the Nth function with the given function name. When the command is given on the command line, N is required; if it is not needed it is ignored. When the command is given interactively without N but N is required, a list of functions with the corresponding N value is printed.
Sort the callers-callees display by the specified metric. The string metric_spec is one of the metric keywords described in Metric Lists, as shown in this example.
% csort a.user |
If metric-spec is omitted, the current callers-callees sort metric is displayed.
The csort metric must be either an attributed metric, or a static metric. If multiple metrics are specified, sort by the first visible one that matches.
Whenever metrics are set, either explicitly or by default, the caller-callee sort metric is set based on the function metrics as follows:
If sorting is by a dynamic metric, either inclusive or exclusive, sort by the corresponding attributed metric.
If sorting is by a static metric, sort by it.
This command tells the er_print utility to sort the callers-callees display by attributed user CPU time. When the command finishes, the sort metric is printed.