HP Caliper Advisor Rule Writer Guide Release 5.0 June 2008 HP Part Number: 5992-4130 Published: June 2008 Edition: 5.
© Copyright 2008 Hewlett-Packard Development Company, L.P. Confidential computer software. Valid license from HP required for possession, use or copying. Consistent with FAR 12.211 and 12.212, Commercial Computer Software, Computer Software Documentation, and Technical Data for Commercial Items are licensed to the U.S. Government under vendor's standard commercial license. The information contained herein is subject to change without notice.
Table of Contents About This Document.....................................................................................................................9 1 Overview: HP Caliper Advisor and Analysis Rules........................................................................13 What Is the HP Caliper Advisor?.......................................................................................13 Steps in Using the Advisor....................................................................................
Dataset ID......................................................................................................................45 Examples of the Use of the Histogram Accessor Functions..........................................45 Run Information Accessor Function: get_run_info............................................................47 Run Information............................................................................................................48 Dataset ID...................................
L1ICACHE Event Set Metrics..................................................................................83 L2CACHE Event Set Metrics...................................................................................84 L2DCACHE Event Set Metrics.................................................................................85 L2ICACHE Event Set Metrics..................................................................................87 L3CACHE Event Set Metrics............................................
List of Figures 1-1 1-2 1-3 2-1 6-1 6 Steps in Using the Advisor..........................................................................................14 HP Caliper Advisor Report.........................................................................................16 Typical Rule Used by the HP Caliper Advisor...........................................................18 HP Caliper Advisor Report, with Annotations..........................................................
List of Tables 3-1 4-1 4-2 4-3 4-4 4-5 A-1 B-1 B-2 B-3 B-4 B-5 B-6 B-7 B-8 B-9 B-10 B-11 B-12 B-13 B-14 B-15 B-16 B-17 B-18 B-19 B-20 B-21 B-22 B-23 B-24 B-25 Analysis Object Data Members...................................................................................31 Sampling Parameter Metrics Available for Multiplexed PMU Statistics....................40 Histogram Types and Sort Keys Available.................................................................44 Histogram Types and Return Values........
About This Document This document describes how to use the HP Caliper Advisor to write your own performance rules. NOTE: For the latest version of this document, go to the HP Caliper Web site at the following URL and click on Documentation in the Product Information box: http://hp.com/go/caliper Intended Audience This document is written for software developers who are using HP Caliper and want to write their own performance rules to be used by the HP Caliper Advisor.
Typographic Conventions This document uses the following typographic conventions: $ The system prompt for the Bourne, Korn, and POSIX shells. audit(5) A manpage. The manpage name is audit, and it is located in Section 5. Command A command name or qualified command phrase. Computer output Text displayed by the computer. Ctrl+x A key sequence. A sequence such as Ctrl+x indicates that you must hold down the key labeled Ctrl while you press another key or mouse button.
• • • • • • HP Caliper Quick Start HP Caliper User Guide HP Caliper Advisor Rule Writer Guide HP Caliper Ktrace Features Guide HP Caliper for HP-UX Release Notes HP Caliper for Linux Release Notes You can get more information about HP Caliper in these ways: • An HP Caliper man page is provided. Type: man caliper • Help text: — For short help text, type caliper -h or caliper -?. — For long help text, type caliper -H or caliper --help.
• Dual-Core Update to the Intel® Itanium® 2 Processor Reference Manual for Software Development and Optimization, Document Number 308065-001. • Intel® Itanium® 2 Processor Reference Manual for Software Development and Optimization, Document Number 251110-003. Introduction to Microarchitectural Optimization for Intel Itanium 2 Processors Reference Manual, Document number 251464-001, Intel Corporation, 2002.
1 Overview: HP Caliper Advisor and Analysis Rules This chapter provides a brief introduction to the HP Caliper Advisor and introduces analysis rules. The information in this chapter is a duplicate of some of the information in the chapter “Using the HP Caliper Advisor” in the HP Caliper User Guide and is placed here for the convenience of rule writers. If you are already familiar with running the Advisor, you can skip ahead to “How the HP Caliper Advisor Works” (p. 27).
Figure 1-1 Steps in Using the Advisor Ma ke sugg ested chang es Start Buil d appl icat ion On e or more HP Calip er performanc e runs HP Calip er Advisor Gain better und erstandin g of appl icat ion performanc e Ma ke sugg ested performanc e runs To use the HP Caliper Advisor, you perform these steps: 1. 2. 3. 4. 14 Build the application with an initial set of compiler/linker options.
• Change the application code and/or build options and start over at step 1 with the revised application and a new set of performance measurements and databases. or: • 5. Make new performance measurements in step 2, saving the data to a new database, and rerun the Advisor. Continue making adjustments as long as you keep receiving meaningful data. For more information, see the chapter “Using the HP Caliper Advisor” in the HP Caliper User Guide.
Figure 1-2 HP Caliper Advisor Report =========================================================================== HP Caliper 4.2.0 Advisor Report for my_app =========================================================================== Analysis Focus Executable: Last modified: Processor type: Processor speed: OS version: /tmp/my_app August 15, 2004 at 03:10 PM Itanium2 9M 1599 MHz HP-UX 11.23 Performance Databases /home/me/.hp_caliper_databases/cpu - January 24, 2007 at 11:17 AM /home/me/.
HP Caliper ships with a standard set of rules that the Advisor uses. For most users, these rules will be all they will need. But if you want to customize these rules or add your own, you will need to study this Guide. Rules are written in the Python scripting language. Simple rules can be written in just a few statements; complex rules can take pages of code.
Figure 1-3 Typical Rule Used by the HP Caliper Advisor # Rule: itlb_misses # # Author: HP Caliper team (caliper-help@cup.hp.com) # # Version: 1.1 (7/18/2006) # # Description: Looks for a minimal percentage of itlb misses which might be # reduced by specifying larger text pages. # # Limitations: Executable objects # HP-UX only (page size cannot be changed on Linux) # def rule_itlb_misses(object): try: # --- Validate rule limitations if object.type != EXECUTABLE_OBJECT \ or object.
2 Running the HP Caliper Advisor This chapter helps you get started using the Advisor. All the information in this chapter pertains to users who will be running the Advisor, not writing rules for it. It is a duplicate of some of the information in the chapter “Using the HP Caliper Advisor” in the HP Caliper User Guide and is placed here for the convenience of rule writers. If you are already familiar with running the Advisor, you can skip ahead to “How the HP Caliper Advisor Works” (p. 27).
Next, run the Advisor on the collected performance data: $ caliper advise HP Caliper looks for the databases in the databases directory and produces an analysis report on stdout. If the Advisor recommends an additional measurement run, make the run.
Figure 2-1 HP Caliper Advisor Report, with Annotations =========================================================================== HP Caliper 4.2.0 Advisor Report for my_app =========================================================================== Analysis Focus 1 Executable: Last modified: Processor type: Processor speed: OS version: /tmp/my_app August 15, 2004 at 03:10 PM Itanium2 9M 1599 MHz HP-UX 11.23 Performance Databases 2 /home/me/.
Note that this was run on an HP-UX 11i V2 September 2004 OE system. Reports run on other systems look similar, except that the specific advice given is unique to the application and the system.
name such as my_app. One or more executables can be specified with this option, separated by commas (,). The default is executable:all. -o Specifies the name of the report file produced by the Advisor. The report file is in text format. The Advisor will either create a new file (create) or append to an existing file (append). The default file is stdout and the default action is create. Can also be specified as --output-file outputfile.
The description section of the report precedes the advice section. The description section is important because the given set of databases might contain several different executables, different versions of the same executable, and performance data from the same or different types of systems. The Advisor reports specifically which version, of which executable, and measured on which system that the advice applies to.
1 2 3 Description: Brief text describing what the advice is about. Rule: Name of the rule that generated this advice. Explanation: What this performance area is, what the related metrics mean, what might affect it, and so forth. 4 5 Improvement: What you can do to try to improve performance in this area. Measurement: Which additional HP Caliper measurements might yield more information in this performance area. A given piece of advice will not necessarily contain all of the above information.
3 How the HP Caliper Advisor Works This chapter explains in detail how the Advisor works. Analysis Objects and Datasets In a nutshell, the Advisor works by scanning performance databases for analysis objects of interest and for datasets associated with those objects. An analysis object is any type of entity whose performance you are interested in. Examples are executable programs, threads, functions, shared libraries, and the kernel.
tested. All that matters is that each database is an HP Caliper database and was created by a compatible version of HP Caliper. 3. All the databases are scanned for executable objects to analyze that match the selection criteria. By default, all objects with performance data are analyzed. Alternatively, you can use the –-analysis-focus command-line option or the analysis_focus variable in the .caliperinit file to choose specific objects to analyze.
Analysis and Printing Steps After all the preprocessing has been done, the Advisor does its actual analysis work. The main processing loop does the following for every selected analysis object (in alphabetic order): 1. 2. A new analysis report is started and the descriptive section is printed. All compiled rule functions are called, passing only the current object being analyzed.
def function_name (parameter_list): function source statements ... Include statements cause the contents of the named rule file to be read and compiled. A rule file can 'include' another file to any nesting depth. Any one rule file is only processed once.
The only argument passed to a rule function is the analysis object. It is implemented as a Python class with a few data members and some function members. The data members provide very basic information about the analysis object (object type, object name, processor type, and so forth). The function members can be accessor functions or the advice function. An accessor function provides access to all of the object’s performance data. The advice function generates advice about the application's performance.
Table 3-1 Analysis Object Data Members (continued) Data Type Description os_type integer Contains the operating system type of the reference dataset. One of the following: HPUX_OS or LINUX_OS. os_version integer Contains the operating system version of the reference dataset. One of the following: HPUX_11_23_OS or LINUX_2_6_OS. path string Contains the full absolute path of physical objects or an empty string (“”) for execution objects.
get_run_info_nth(metric_list, n) These accessor functions are expected to be available in future releases of HP Caliper: • Used to retrieve call graph profiles (not yet available for use): get_call_graph(metric_list) get_call_graph_nth(metric_list, n) • Used to retrieve information about the source code (not yet available for use): get_source_info(item, metric_list) get_source_info_nth(item, metric_list, n) • Used to retrieve information about the compiled code (not yet available for use): get_binary_i
the second matching dataset is returned, and so on. If there are not abs(nth) matching datasets, then the None value is returned. Note that for all accessor functions, the base version is identical in functionality to the nth version with a –1 final argument. The primary argument list to an accessor function is the metric list (metric_list) to be retrieved. The primary argument list represents one or more actual arguments in any order.
You should use the first example shown above whenever a derived metric is going to be calculated from metric1 and metric2, because consistent data is required for correct results. You should use the second example shown above when both metrics are needed, but are not going to be combined or compared. In the latter case, it is incorrect to request them together because that request might fail while separate requests might succeed.
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.
get_metrics_nth(‘CPU_CYCLES’, -2) (pmu_event, plm) 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.
L3CACHE, QUEUES, STALL, SYSBUS, or TLB. These correspond to the event sets used with the CPU Metrics measurement. Replace metric with a specific metric appropriate to event_set. See “Function Reference Information” (p. 71) for a complete list. Replace statistic with MEAN, STDEV, 90%CI, MINIMUM, LOW90, HIGH90, or MAXIMUM: • MEAN — Mean value of all samples. • STDEV — Standard deviation of the samples. • 90%CI — 90 percentage confidence interval.
L1ICACHE, L2CACHE, L3CACHE, QUEUES, STALL, SYSBUS, or TLB. Replace sample with SAMPLE_COUNT, SAMPLE_EVENT, SAMPLE_PLM, SAMPLE_RATE, SAMPLE_THRESHOLD, or SAMPLE_VARIATION. Examples: get_metrics(‘STALL.SAMPLE_COUNT’) get_metrics_nth(‘STALL.SAMPLE_COUNT’, 0) Table 4-1 “Sampling Parameter Metrics Available for Multiplexed PMU Statistics” shows available metrics, return type, and what it returns.
Examples of the Use of the Global Metrics Accessor Functions • metrics = object.get_metrics(‘IA64_INST_RETIRED’, ‘NOPS_RETIRED’, ‘CPU_CYCLES’, ‘BACK_END_BUBBLE.ALL’) metrics: (124935886799, 30681829351, 64202559764, 25948247862) This example retrieves a matched set of four total PMU count metrics, all measured with a privilege level mask of USER and a threshold of 0.
performance data for IA64_INST_RETIRED and another dataset with data for L1D_READ_MISSES.ALL. However, in this example, there isn’t a dataset that contains both performance metrics. Histogram Accessor Function: get_histogram The syntax is: get_histogram(histogram_type, metric_list) get_histogram_nth(histogram_type, metric_list, n) These accessor functions are used to retrieve histogram (flat profile) performance metrics.
type Returns a list of tuples with the top N entries of type type for the specified histogram. In this release of the Advisor, type can only be replaced with FUNCTION. In later releases, other types will be supported. N (number of items) is assumed to be 10 and the default sort key is appropriate to the type of histogram. Examples: get_histogram(‘ALAT’, ‘FUNCTION’) get_histogram_nth(‘ALAT’, ‘FUNCTION’, -1) (type, number) Similar to type above, except that the number of items to return is also given.
Table 4-2 Histogram Types and Sort Keys Available Histogram Type Sort Key ALAT MISSES (default) DCACHE AVERAGE_LATENCY, LATENCY (default), MISSES DTLB HPW_FILLS, L2_FILLS, MISSES (default), SOFT_FILLS ICACHE AVERAGE_LATENCY, LATENCY (default), MISSES IP SAMPLES (default) ITLB HPW_FILLS, L2_FILLS, MISSES (default), SOFT_FILLS Table 4-3 “Histogram Types and Return Values” shows the data returned for function histograms.
Examples: get_histogram(‘ITLB’, ‘SAMPLE_RATE’) get_histogram_nth(‘ITLB’, ‘SAMPLE_RATE’, 0) Table 4-4 “Sampling Parameter Metrics Available for Histograms” shows available metrics, return type, and what it returns. Table 4-4 Sampling Parameter Metrics Available for Histograms Metric Return Type Description SAMPLE_COUNT integer Returns the number of samples taken. SAMPLE_EVENT string Returns the name of the PMU sampling event. SAMPLE_PLM string Returns the privilege level mask.
the name of a function, the name of the image it is part of, and its sample count) is returned. Note that fewer than 10 functions might be returned if that is all there is. • metrics = object.get_histogram(‘DCACHE’, ‘n’) metrics: (1) This example shows an easy way to test for the presence of dcache histogram performance data without actually retrieving the data. If at least one such dataset exists, then its integer ID number is returned. Otherwise, the None value is returned. • metrics = object.
('__get_ioblock', 'sweep3d', 1, 7, 7.0), ('__F90_END_IO', 'sweep3d', 1, 6, 6.0), ('_f80_to_dec', 'libc.so.1', 1, 6, 6.0), ('__io_tl1', 'sweep3d', 2, 11, 5.5))) This example retrieves a list of the top 25 functions based on their instruction cache miss average latency. If at least one dataset containing an icache miss histogram exists, then the first such one is accessed, its data sorted by average latency, and (up to) the top 25 functions are returned as a tuple of tuples.
Run Information These metric values retrieve run information from a dataset. There is only one format for this type of metric: metric Returns the value of the requested metric. Replace metric with one of the metrics listed in Table 4-5 “Metrics Available for Return by Run Information Accessor Functions”. The type of the value returned is specific to the metric selected. The data returned is equivalent to information in HP Caliper reports, as shown in the table.
Table 4-5 Metrics Available for Return by Run Information Accessor Functions (continued) Metric Return Type Description of What Is Returned IMAGES tuple Returns a list of all images (main executable and shared libraries / load modules) that were loaded.
Table 4-5 Metrics Available for Return by Run Information Accessor Functions (continued) Metric Return Type Description of What Is Returned PID integer The measured process ID number (PID). HP Caliper report section: Target Application Process ID. PMU_TYPE string The type of the PMU on the measured system. The value will be one of the following: ITANIUM2_PMU or MONTECITO_PMU. REAL_TIME float The total real time of the measured process. The value is in seconds.
Table 4-5 Metrics Available for Return by Run Information Accessor Functions (continued) Metric Return Type Description of What Is Returned THREAD_COUNT integer The number of pthread threads in the measured process. This value will be 0 unless the --threads all option was used on the measurement run. USER_TIME float The total user time of the measured process. The value is in seconds. HP Caliper report section: Target Execution Time User time.
‘USER_TIME’, ‘SYSTEM_TIME’, n) metrics1: (124935886799, 30681829351, 64202559764, 25948247862, 3) metrics2: (40.924244999999, 40.16219256499998, 0.017941971000000001) This example demonstrates how the get_run_info_nth accessor function is usually used. The first statement attempts to retrieve four total PMU count metrics. These are the default PMU events measured by an HP Caliper ecount measurement run on Itanium 2 processors.
5 HP Caliper Advisor Advice Function This chapter describes the HP Caliper Advisor advice function. The advice function is called by an analysis rule to generate advice about the user's application performance. There is only one advice() function, but different types of advice can be produced by various combinations of the optional arguments. A rule function only calls advice() when it has determined that its advice is applicable to the program being analyzed.
• • description IO_ADVICE (advice about any I/O issues) SYSTEM_ADVICE (advice about system calls, system resources, process management, and so forth) A one-sentence description of the performance focus of the analysis rule. A string value or None. improvement Detailed guidance on what to try that might improve the application’s performance in this area. A string value or None. measurement A specific recommendation of what additional measurement(s) would help to analyze a potential performance problem.
Examples Showing How Advice Is Printed • The following rule: def rule_sample_advice_1(object): object.advice(19.9, GENERAL_ADVICE, "Description text.", "Improvement text.", "Measurement text", "Explanation text.") is printed as: ------------------------------------------------------------------------------Index Class Analysis ------------------------------------------------------------------------------19.9 general Description text. [sample_advice_1] Improvement text. Measurement text Explanation text.
"functions:\n" " function_1\n" " function_2\n" " function_3\n" "The rule would really generate this string dynamically.") is printed as: ------------------------------------------------------------------------------Index Class Analysis ------------------------------------------------------------------------------9.8 io Rule-controlled formatting. [sample_advice_4] This is an example of a rule which wants to print a list of hot function names in a readable way.
6 Writing Rules for the HP Caliper Advisor This chapter gives tips on how to write good rules for the Advisor. What Makes a Good Rule? Figure 6-1 “Typical Rule Used by the HP Caliper Advisor, with Annotations” shows an example rule that demonstrates all the components of a well-written rule.
Figure 6-1 Typical Rule Used by the HP Caliper Advisor, with Annotations # Rule: itlb_misses 1 # # Author: HP Caliper team (caliper-help@cup.hp.com) # # Version: 1.1 (7/18/2006) # # Description: Looks for a minimal percentage of itlb misses which might be # reduced by specifying larger text pages. # # Limitations: Executable objects # HP-UX only (page size cannot be changed on Linux) # def rule_itlb_misses(object): 2 try: 3 # --- Validate rule limitations 4 if object.type != EXECUTABLE_OBJECT \ or object.
of the performance problem it looks for, and any limitations or special conditions on the rule. Other relevant information (such as a reference to a document) can also be included. 2 Function declaration. All rule functions must be named rule_*, where * is replaced by the name of the rule. The name is case-sensitive and must be unique among all rule files. You should use a naming convention that keeps the names unique. The function takes only one argument: the object to be analyzed.
the text of the advice message. The computation of the index value takes into account the frequency of the performance problem and its cost. 7 Exception handling. The simplest handling is to ignore the exception (“pass”), but more sophisticated rules can include error recovery. Note that the accessor functions (get_xxx()) and the advice() function will never raise an exception.
advice_text = "To get more advice on hot functions, " \ "make a 'caliper fprof ...' measurement." Writing a Rule to Analyze the Same Metrics From All Datasets A rule function typically needs metric data from only one performance measurement run. The Advisor tries to return the best data available for the accessor function base version. Sometimes a rule will attempt to analyze the same performance metrics from all applicable datasets.
The call to get_histogram() retrieves the first (and possibly only) IP histogram (in metrics[0]), its sample count (in metrics[1]), and the ID number of the dataset that provided the data (in metrics[2]). The call to get_run_info_nth() retrieves the corresponding user and system time from that same dataset. Additional Tips for Writing Rules Here are some suggestions for writing good Advisor rules: • • Each rule must be independent of all other rules.
• • the HP Caliper Advisor, with Annotations” deals with ITLB data from either a cpu or an itlb HP Caliper run. The advice index value should be calculated carefully. It should reflect how likely a recommended improvement is to actually improve performance. It is better to be a little pessimistic rather than overstate potential benefits. It is more efficient to pre-test for the possible presence of metrics before requesting them. For example, this code: if object.
metric1 = object.get_metrics(‘CPU_CYCLES’) metric2 = object.get_metrics(‘NOPS_RETIRED’) The first get_metrics() call will always return matched data from the same measurement run. The last get_metrics() calls might return metric data from two different measurement runs. The first call must be used when the metrics are going to be used together in a derived metric calculation. The last calls should be used when both metrics are needed but are not going to be combined.
A Python Scripting Language: Overview Python is a general-purpose, object-oriented language with many features that most rule writers do not need. This appendix gives a brief summary of the features of Python that are relevant to writing rules. NOTE: The latest version of Python is 2.4.1. HP Caliper currently uses version 2.3.4. When writing rules, be careful not to use newer Python features that are unsupported by HP Caliper.
• • Python has full support for classes, but most rule writers will not need to define their own classes. The analysis object is an instance of a Python class. Many built-in and library functions are available. In particular, these modules are useful to writing Adviser rule functions: re (regular expressions), time (UNIX time functions), os.path (file and directory name functions), and math (math functions). See the Python Library Reference for more information.
element of a list or tuple can contain a different type of data, including (nested) sequences and mappings. There is a special syntax for 1-element tuples (which would otherwise be misinterpreted as a parenthesized expression): a trailing comma. For example: (value,) • Mappings: dictionaries. Dictionaries are mutable tables of data, accessed by a key rather than position. The key can be any type but is often a string or numeric value.
• For loop for target in sequence: true_statements else: false_statements where the else clause and its associated statements are optional and are only executed if the loop ends without executing a break statement. Note the use of the colon (:) after each condition and note the indented statements. • Pass, break, and continue statements pass break continue where pass is a do-nothing statement, break terminates a loop early, and continue skips to the next loop iteration.
See the Python Reference Manual for other statements. Python Strings Python has a lot of support for creating and manipulating character strings. This is helpful for generating advice. Following is some basic information about Python strings: • String literals are enclosed in single quotes (‘…’), double quotes (“…”), or triple quotes (“””…”””). Triple quotes are used for multiline text. String literals can include C-style escape characters using the backslash character.
Table A-1 Python Built-In String Operations (continued) 70 Function Returns Description s.count(sub) integer counts the number of substring sup in string s s.startswith(sub) boolean tests if string s starts with substring sub s.endswith(sub) boolean tests if string s ends with substring sub s.split(sep) strings split string s into substrings based on separator string sep s.splitlines() strings split string s into substrings based on line breaks sep.
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.
Table B-1 Metrics Available for Global Metrics Accessor Functions (continued) Metric Return Type Description (pmu_event, plm, threshold) integer Similar to pmu_event above, except that the privilege level mask and the threshold are also given. When the plm and threshold modifiers are provided, the entire event description must be enclosed in parentheses to form a Python tuple. Replace plm with USER, KERNEL, BOTH, or ALL. Replace threshold with an integer value.
Table B-2 BRPATH Event Set: Metrics Available for Multiplexed PMU Statistics (continued) Metric Return Type Description BRPATH.IPREL_CALL%.statistic float Returns the Branch Distribution %iprel %call statistic value. BRPATH.IPREL_NON_CALL%.statistic float Returns the Branch Distribution %iprel %non-call statistic value. BRPATH.INDIRECT%.statistic float Returns the Branch Distribution %ind statistic value. BRPATH.RETURN%.statistic float Returns the Branch Distribution %return statistic value.
Table B-3 BRPRED Event Set: Metrics Available for Multiplexed PMU Statistics (continued) Metric Return Type Description BRPRED.OVERALL_CORRECT%.statistic float Returns the Overall correct statistic value. BRPRED.OVERALL_WRONG_PATH%.statistic float Returns the Overall wrong path statistic value. BRPRED.OVERALL_WRONG_TARGET%.statistic float Returns the Overall wrong target statistic value. BRPRED.IPREL_WEIGHT.statistic float Returns the IPREL weight statistic value. BRPRED.IPREL_CORRECT%.
Table B-4 C2C Event Set: Metrics Available for Multiplexed PMU Statistics (continued) Metric Return Type Description C2C.SAMPLE_PLM string Returns the privilege level mask used. Will be one of the following: USER, KERNEL, BOTH, or ALL. C2C.SAMPLE_RATE integer Returns the sample rate. C2C.SAMPLE_THRESHOLD integer Returns the sample threshold value used. C2C.SAMPLE_VARIATION integer Returns the sample rate variation. C2C.SNOOP_COUNT.
CPI Event Set Metrics Table B-5 “CPI Event Set: Metrics Available for Multiplexed PMU Statistics” shows the metrics available using the CPI event set. See “Multiplexed PMU Statistics” (p. 38) for more information. In these metrics, replace statistic with one of the following: MEAN, STDEV, 90%CI, MINIMUM, LOW90, HIGH90, or MAXIMUM. Table B-5 CPI Event Set: Metrics Available for Multiplexed PMU Statistics Metric Return Type Description CPI.SAMPLE_COUNT integer Returns the number of samples taken. CPI.
Table B-6 CPUBUS Event Set: Metrics Available for Multiplexed PMU Statistics Metric Return Type Description CPUBUS.SAMPLE_COUNT integer Returns the number of samples taken. CPUBUS.SAMPLE_EVENT string Returns the name of the PMU sampling event. CPUBUS.SAMPLE_PLM string Returns the privilege level mask used. Will be one of the following: USER, KERNEL, BOTH, or ALL. CPUBUS.SAMPLE_RATE integer Returns the sample rate. CPUBUS.SAMPLE_THRESHOLD integer Returns the sample threshold value used.
Table B-7 CSPEC Event Set: Metrics Available for Multiplexed PMU Statistics Metric Return Type Description CSPEC.SAMPLE_COUNT integer Returns the number of samples taken. CSPEC.SAMPLE_EVENT string Returns the name of the PMU sampling event. CSPEC.SAMPLE_PLM string Returns the privilege level mask used. Will be one of the following: USER, KERNEL, BOTH, or ALL. CSPEC.SAMPLE_RATE integer Returns the sample rate. CSPEC.SAMPLE_THRESHOLD integer Returns the sample threshold value used. CSPEC.
Table B-8 DISPERSAL Event Set: Metrics Available for Multiplexed PMU Statistics Metric Return Type Description DISPERSAL.SAMPLE_COUNT integer Returns the number of samples taken. DISPERSAL.SAMPLE_EVENT string Returns the name of the PMU sampling event. DISPERSAL.SAMPLE_PLM string Returns the privilege level mask used. Will be one of the following: USER, KERNEL, BOTH, or ALL. DISPERSAL.SAMPLE_RATE integer Returns the sample rate. DISPERSAL.
Table B-9 DSPEC Event Set: Metrics Available for Multiplexed PMU Statistics Metric Return Type Description DSPEC.SAMPLE_COUNT integer Returns the number of samples taken. DSPEC.SAMPLE_EVENT string Returns the name of the PMU sampling event. DSPEC.SAMPLE_PLM string Returns the privilege level mask used. Will be one of the following: USER, KERNEL, BOTH, or ALL. DSPEC.SAMPLE_RATE integer Returns the sample rate. DSPEC.SAMPLE_THRESHOLD integer Returns the sample threshold value used. DSPEC.
Table B-10 FP Event Set: Metrics Available for Multiplexed PMU Statistics Metric Return Type Description FP.SAMPLE_COUNT integer Returns the number of samples taken. FP.SAMPLE_EVENT string Returns the name of the PMU sampling event. FP.SAMPLE_PLM string Returns the privilege level mask used. Will be one of the following: USER, KERNEL, BOTH, or ALL. FP.SAMPLE_RATE integer Returns the sample rate. FP.SAMPLE_THRESHOLD integer Returns the sample threshold value used. FP.
L1DCACHE Event Set Metrics Table B-11 “L1DCACHE Event Set: Metrics Available for Multiplexed PMU Statistics” shows the metrics available using the L1DCACHE event set. See “Multiplexed PMU Statistics” (p. 38) for more information. In these metrics, replace statistic with one of the following: MEAN, STDEV, 90%CI, MINIMUM, LOW90, HIGH90, or MAXIMUM. Table B-11 L1DCACHE Event Set: Metrics Available for Multiplexed PMU Statistics Metric Return Type Description L1DCACHE.
Table B-11 L1DCACHE Event Set: Metrics Available for Multiplexed PMU Statistics (continued) Metric Return Type Description L1DCACHE.ALL_L1D_MISS%.statistic float Returns the Miss Rate All statistic value. L1DCACHE.NON_RSE_L1D_MISS%.statistic float Returns the Miss Rate NON RSE statistic value. L1DCACHE.RSE_L1D_MISS%.statistic float Returns the Miss Rate RSE statistic value.
Table B-12 L1ICACHE Event Set: Metrics Available for Multiplexed PMU Statistics (continued) Metric Return Type L1ICACHE.PFETCH_L1I_MISSES/KINST.statistic float Description Returns the L1 Events/Kinst Misses Pfetch statistic value. L1ICACHE.IFILLS/KINST.statistic float Returns the L1 Events/Kinst Ifills statistic value. L1ICACHE.ISB_LINES/KINST.statistic float Returns the L1 Events/Kinst ISB Lines statistic value. L1ICACHE.ISB_LINE_USAGE%.statistic float L1ICACHE.ALL_L1I_MISS%.
Table B-13 L2CACHE Event Set: Metrics Available for Multiplexed PMU Statistics (continued) Metric Return Type Description L2CACHE.TOTAL_L2_MISSES/SEC.statistic integer Returns the L2 Events/Sec Misses Total statistic value. L2CACHE.PFETCH_L2_MISSES/SEC.statistic integer Returns the L2 Events/Sec Misses Pfetch statistic value. L2CACHE.DFETCH_L2_MISSES/SEC.statistic integer Returns the L2 Events/Sec Misses Dfetch statistic value. L2CACHE.DATA_L2_MISSES/SEC.
In these metrics, replace statistic with one of the following: MEAN, STDEV, 90%CI, MINIMUM, LOW90, HIGH90, or MAXIMUM. NOTE: These metrics apply only to the dual-processor Itanium 2 processor (code-named Montecito). Table B-14 L2DCACHE Event Set: Metrics Available for Multiplexed PMU Statistics 86 Metric Return Type Description L2DCACHE.SAMPLE_COUNT integer Returns the number of samples taken. L2DCACHE.SAMPLE_EVENT string Returns the name of the PMU sampling event. L2DCACHE.
Table B-14 L2DCACHE Event Set: Metrics Available for Multiplexed PMU Statistics (continued) Metric Return Type L2DCACHE.INSTRUCTIONS/L2D_ACCESS.statistic float L2DCACHE.MISS%.statistic float Description Returns the Instr/Access statistic value. Returns the % Miss statistic value. L2ICACHE Event Set Metrics Table B-15 “L2ICACHE Event Set: Metrics Available for Multiplexed PMU Statistics” shows the metrics available using the L2DCACHE event set. See “Multiplexed PMU Statistics” (p.
Table B-15 L2ICACHE Event Set: Metrics Available for Multiplexed PMU Statistics (continued) Metric Return Type Description L2ICACHE.DFETCH_L2I_MISSES/KINST.statistic float Returns the L2I Events/Kinst Dfetch statistic value. L2ICACHE.INSTRUCTIONS/L2I_ACCESS.statistic float Returns the Instr/Access statistic value. L2ICACHE.TOTAL_MISS%.statistic float Returns the % Miss Total statistic value. L2ICACHE.PFETCH_MISS%.statistic float Returns the % Miss Pfetch statistic value. L2ICACHE.DFETCH_MISS%.
Table B-16 L3CACHE Event Set: Metrics Available for Multiplexed PMU Statistics (continued) Metric Return Type Description L3CACHE.L3_WRITE_BACKS/SEC.statistic integer Returns the L3 Events/Sec Write Backs statistic value. L3CACHE.TOTAL_L3_MISSES/KINST.statistic float Returns the L3 Events/Kinst Misses Total statistic value. L3CACHE.PFETCH_L3_MISSES/KINST.statistic float Returns the L3 Events/Kinst Misses Pfetch statistic value. L3CACHE.DFETCH_L3_MISSES/KINST.
Table B-17 QUEUES Event Set: Metrics Available for Multiplexed PMU Statistics (continued) Metric Return Type Description QUEUES.SAMPLE_PLM string Returns the privilege level mask used. Will be one of the following: USER, KERNEL, BOTH, or ALL. QUEUES.SAMPLE_RATE integer Returns the sample rate. QUEUES.SAMPLE_THRESHOLD integer Returns the sample threshold value used. QUEUES.SAMPLE_VARIATION integer Returns the sample rate variation. QUEUES.CYCLES.
Table B-18 STALL Event Set: Metrics Available for Multiplexed PMU Statistics (continued) Metric Return Type Description STALL.SAMPLE_RATE integer Returns the sample rate. STALL.SAMPLE_THRESHOLD integer Returns the sample threshold value used. STALL.SAMPLE_VARIATION integer Returns the sample rate variation. STALL.RAW_CPI.statistic float Returns the RAW CPI statistic value. STALL.INSTRUCTION_ACCESS%.statistic float Returns the FE Components Iaccess Total statistic value. STALL.
Table B-19 SYSBUS Event Set: Metrics Available for Multiplexed PMU Statistics Metric Return Type Description SYSBUS.SAMPLE_COUNT integer Returns the number of samples taken. SYSBUS.SAMPLE_EVENT string Returns the name of the PMU sampling event. SYSBUS.SAMPLE_PLM string Returns the privilege level mask used. Will be one of the following: USER, KERNEL, BOTH, or ALL. SYSBUS.SAMPLE_RATE integer Returns the sample rate. SYSBUS.SAMPLE_THRESHOLD integer Returns the sample threshold value used.
TLB Event Set Metrics Table B-20 “TLB Event Set: Metrics Available for Multiplexed PMU Statistics” shows the metrics available using the TLB event set. See “Multiplexed PMU Statistics” (p. 38) for more information. In these metrics, replace statistic with one of the following: MEAN, STDEV, 90%CI, MINIMUM, LOW90, HIGH90, or MAXIMUM. Table B-20 TLB Event Set: Metrics Available for Multiplexed PMU Statistics Metric Return Type Description TLB.SAMPLE_COUNT integer Returns the number of samples taken. TLB.
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).
Table B-21 Metrics Available for Return by Histogram Accessor Functions (continued) Metric Return Type Description SAMPLE_PLM string Returns the privilege level mask. Will be one of the following: USER, KERNEL, BOTH, or ALL. SAMPLE_RATE integer Returns the sample rate. SAMPLE_THRESHOLD integer Returns the sample threshold value. SAMPLE_VARIATION integer Returns the sample rate variation.
Table B-23 Histogram Types and Sort Keys Available (continued) Histogram Type Sort Key IP SAMPLES (default) ITLB HPW_FILLS, L2_FILLS, MISSES (default), SOFT_FILLS Run Information Accessor Functions This section provides reference information for the get_run_info() and get_run_info_nth() accessor functions. For information about how to use these functions, see “Run Information Accessor Function: get_run_info” (p. 47).
Table B-24 Metrics Available for Return by Run Information Accessor Functions (continued) Metric Return Type Description of What Is Returned IMAGES tuple Returns a list of all images (main executable and shared libraries / load modules) that were loaded.
Table B-24 Metrics Available for Return by Run Information Accessor Functions (continued) Metric Return Type Description of What Is Returned PID integer The measured process ID number (PID). HP Caliper report section: Target Application Process ID. PMU_TYPE string The type of the PMU on the measured system. The value will be one of the following: ITANIUM2_PMU or MONTECITO_PMU. REAL_TIME float The total real time of the measured process. The value is in seconds.
Table B-24 Metrics Available for Return by Run Information Accessor Functions (continued) Metric Return Type Description of What Is Returned USER_TIME float The total user time of the measured process. The value is in seconds. HP Caliper report section: Target Execution Time User time. 'n' integer ID number of the dataset whose metric values are being returned in this get_run_info() or get_run_info_nth() call. Advice Function This section provides reference information for the advice function.
Glossary accessor function A function called by an analysis rule to retrieve performance data for the analysis object. advice class A grouping for advice from the Advisor. Every piece of advice belongs to one of these classes: general, CPU, memory, IO, and system. advice function The function called by an analysis rule to generate advice about the user's application performance.
argument list as the base version plus one additional final argument. The other type of accessor function is base version. Python An interpreted, interactive, object-oriented scripting language, sometimes compared to Tcl, Perl, Scheme, or Java. For more information, see http://www.python.org. reference dataset The first dataset found for an analysis object when the Advisor is performing its analysis. rule file A file containing one or more independent rule functions written in Python.
Index Symbols D --advice-classes option used with HP Caliper Advisor, 22 --advice-cutoff option used with HP Caliper Advisor, 22 --advice-details option used with HP Caliper Advisor, 22 --analysis-focus option used with HP Caliper Advisor, 22 --output-file option used with HP Caliper Advisor, 23 --rule-files option used with HP Caliper Advisor, 23 -o option used with HP Caliper Advisor, 23 Database locations, 23 Dataset, 27 DISPERSAL event set metrics, 78 Documentation Python, 65 Documents, related, 10 D
BRPRED event set metrics, 73 C2C event set metrics, 74 CPI event set metrics, 76 CPUBUS event set metrics, 76 CSPEC event set metrics, 77 DISPERSAL event set metrics, 78 DSPEC event set metrics, 79 FP event set metrics, 80 L1DCACHE event set metrics, 82 L1ICACHE event set metrics, 83 L2CACHE event set metrics, 84 L2DCACHE event set metrics, 85 L2ICACHE event set metrics, 87 L3CACHE event set metrics, 88 metrics available for, 71 QUEUES event set metrics, 89 STALL event set metrics, 90 SYSBUS event set metri