HP Caliper Advisor Rule Writer Guide
B Function Reference Information
This appendix provides tables of reference information for functions you can use in
writing rules. It duplicates some of the information found in “HP Caliper Advisor
Accessor Functions” (p. 37) and “HP Caliper Advisor Advice Function” (p. 53), but
presents it in a more accessible format for easy reference when you write rules.
Global Metrics Accessor Functions
This section provides reference information for the get_metrics() and
get_metrics_nth() accessor functions, including the set of metrics you can retrieve
for multiplexed PMU statistics.
For information about how to use these functions, see “Global Metrics Accessor
Function: get_metrics” (p. 37).
The syntax is:
get_metrics(metric_list)
get_metrics_nth(metric_list, n)
Metrics Available for Global Metrics Accessor Functions
Table B-1 “Metrics Available for Global Metrics Accessor Functions” shows the metrics
available for global metrics accessor functions, except for multiplexed PMU statistics.
For those metrics, see the tables in “Multiplexed PMU Statistics Metrics for Global
Metrics Accessor Functions” (p. 72).
Table B-1 Metrics Available for Global Metrics Accessor Functions
DescriptionReturn
Type
Metric
Returns the raw count (integer value) of the given PMU
event.
Replace pmu_event with the full, all-capital-letters name
of the PMU event as reported by the caliper info
command. Data is retrieved from the Metrics Summed
for Entire Run portion of HP Caliper measurement runs.
The privilege level mask is assumed to be USER and the
threshold to be 0.
integer
pmu_event
Similar to pmu_event above, except that the privilege
level mask is also given. When the plm modifier is
provided, the entire event description must be enclosed
in parentheses to form a Python tuple.
Replace plm with USER, KERNEL, BOTH, or ALL.
integer
(pmu_event, plm)
Global Metrics Accessor Functions 71