HP Caliper Advisor Rule Writer Guide

4 HP Caliper Advisor Accessor Functions
This chapter describes how to use the Advisor accessor functions.
Global Metrics Accessor Function: get_metrics
The syntax is:
get_metrics(metric_list)
get_metrics_nth(metric_list, n)
These are the most heavily used accessor functions, but also two of the simpler ones.
Each metric represents a single piece of data and usually has a numeric value. Examples
are the total number of CPU cycles or the average number of ITLB misses per second.
A rule knows exactly which performance metrics to request, and data for those metrics
either exist or they do not exist.
Four types of metrics are available from these accessor functions, each with its own
syntax:
Total PMU counts
Multiplexed PMU statistics
Sampling parameters
Dataset ID
Total PMU Counts
This is the type of performance metric available from the HP Caliper ecount
measurement and also produced as a byproduct of all of the PMU-based profile
measurements. It represents the total count throughout the entire measurement run of
a specific PMU event.
There are several ways to request total PMU counts:
pmu_event
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. The
privilege level mask is assumed to be USER and
the threshold to be 0.
Data is retrieved from the Metrics Summed for
Entire Run portion of the HP Caliper
measurement runs.
Examples:
get_metrics(CPU_CYCLES)
Global Metrics Accessor Function: get_metrics 37