HP Caliper Advisor Rule Writer Guide

Histogram Accessor Functions
This section provides reference information for the get_histogram() and
get_histogram_nth() accessor functions.
For information about how to use these functions, see “Histogram Accessor Function:
get_histogram” (p. 42).
The syntax is:
get_histogram(histogram_type, metric_list)
get_histogram_nth(histogram_type, metric_list, n)
Table B-21 Metrics Available for Return by Histogram Accessor Functions
DescriptionReturn
Type
Metric
Must be the first argument and is used to select the type
of histogram accessed.
Replace histogram_type with ALAT, DCACHE, DTLB,
ICACHE, IP, or ITLB.
none
histogram_type
Returns a list of tuples with the top 10 entries of type
type for the selected histogram.
Replace type with FUNCTION. The contents of each
tuple are shown below.
The entries are sorted appropriate to the type of
histogram, as shown in Table B-22 “Histogram Types
and Return Values”.
tuple
type
Similar to type above, except that the number of entries
is also given. When the number modifier is provided,
the entire event description must be enclosed in
parentheses to form a Python tuple.
Replace number with the number of entries to return.
tuple
(type, number)
Similar to type above, except that the number of entries
and sort key are given. When the number and sort
modifiers are provided, the entire event description must
be enclosed in parentheses to form a Python tuple.
Replace number with the number of entries to return.
Replace sort with the name of the sort key, as shown
in Table B-23 “Histogram Types and Sort Keys
Available”.
tuple
(type, number, sort)
Returns the number of samples taken.integerSAMPLE_COUNT
Returns the name of the PMU sampling event.stringSAMPLE_EVENT
94 Function Reference Information