HP Caliper User Guide
 Copyright 2011 Hewlett-Packard Development Company, L.P
 Contents
 Remote GUI
HP Caliper Measurement Configuration Files
HP Caliper Options
 Contents
 Using the HP Caliper Advisor
Using the HP Caliper Advisor in the GUI
Configuring HP Caliper
Threads Traps-reported User-regionsHP-UX only Version
 Controlling the Content of Reports 104
Producing a Sampled Call Graph Profile Analysis 120
Producing a Sampled Call Stack Profile Analysis 132
HP Caliper Environment Variables 103
 Descriptions of Measurement Reports 168
HP Caliper Diagnostic and Warning Messages 164
Limitations to Using cstack 149 Pstack like functionality
 Contents
 Event Set Descriptions for CPU Metrics HP-UX only 219
 Glossary 253 Index 258
 About This Document
 Command
Typographic Conventions
Computer output
File name
 Related Documents
 HP Encourages Your Questions
 HP Caliper at a Glance
What Is HP Caliper?
HP Caliper at a Glance
 What Is HP Caliper?
HP Caliper Components User Interfaces
 Supported Compilers and Application Environments
What Does HP Caliper Run On?
Supported Hardware and Operating Systems
 Summary of HP Caliper Features
Summary of HP Caliper Features
 Getting Started with the HP Caliper Command-Line Interface
Getting Started with the HP Caliper Command-Line Interface
 PLM
 Target
Page
 Example Adding Instructions to an fprof Report
 Example Adding Instructions to an fprof Report
 Types of Measurements
Global Measurement
Sampled Measurements
Precise Measurements
 What to Look for in Using HP Caliper
Syntax for caliper Command
Caliper measurement caliperoptions program programarguments
Measurement
 Basic Tasks a Quick Reference
Starting HP Caliper
Stopping HP Caliper
Showing HP Caliper Options
 Using the HP Caliper Advisor
Restrictions on Using HP Caliper
Creating a Text Report for Analysis
Creating a Report Based on Your Collected Data
 Additional HP Caliper Commands
Getting Information About HP Caliper
Caliper info
Caliper report merge diff
 What Is the HP Caliper GUI?
What Is the HP Caliper GUI?
Getting Started with the HP Caliper GUI
Window Basics
 Projects View
Getting Started with the HP Caliper GUI
 Collect View
Window Basics
 Analyze View
Collect View
 Advisor View
Analyze View
 Console View
Advisor View
 Diagnostics View
Help View
 Making Measurements
Tips for Using Views
Hints on How to Make Measurements
 Exploring Performance Data
Getting Performance Tuning Advice
Exploring Performance Data
 Getting Help
Starting the GUI
Native Local GUI
Remote GUI
 Login Screen
Starting the GUI
 HP Caliper Measurement Configuration Files
Measurement Configuration Files Provided with HP Caliper
 Dtlb
Ecount
Fprof
Icache
 Global Sampled
Overview Measurement
Available Measurements in Each Measurement Type
 Simultaneous fprof Sampling on Multiple PMU Counters
Location of Measurement Configuration Files
Simultaneous fprof Sampling on Multiple PMU Counters
 See Hierarchy for Processing an Option Value p
Specifying Option Values in Measurement Configuration Files
You are free to rename measurement configuration files
 HP Caliper Options
Basic Information About Options
Multiple Ways to Specify HP Caliper Option Values
Examples
 Or --database
Or --duration
Hierarchy for Processing an Option Value
Examples
 Or --options-file
Or -?
Or --help
Or --metrics
 Or --output-file
Cpuevent
 For PMU Histogram Reports
Or --process
Or --report-details
 Or --sampling-spec
For Function Coverage Reports
Speriod Srate ,variation ,cpuevent
Rate
 Default value is 5 percent
Or --version
CPUCYCLES,10000,10%
Branchevent
 Advice-classes
Advice-cutoff
Advice-details
Analysis-focus
 Bus-speed
Callpath-cutoff
Bus-speed int
Callpath-cutoffpercentcutoff,cumpercentcutoff,mincount
 Context-lines
Cpu-aggregation
Cpu-counter
Cpu-details
 Csv-file
Dcache-data-profile
Database
Dbrp
 Db-save
Description-details
Details
Detail-cutoff
 Example
Etb-freeze-delay
Duration
 Event-defaults
Event-defaults privilege-level-mask=levelthreshold=int
Etb-walkback-cycles
Etb-walkback-cycles integer
 Exclude-caliper
Exclude-idle
Fold
Frame-depth
 Help
Hotpaths
Ibrp
Info
 Join
Jre
Kernel-path
Kernel-stack
 Latency-buckets
Measure-on-interrupts
Memory-usage=
Metrics
 Module-default
Module-exclude
Module-include
Module-search-path
 Noinlines
Omr
Options-file
Output-file
 Per-module-data
Percent-columns
Percent-sample
Prim-cutoff
 Process
Process-cutoff
See -p or --process p
Process-cutoffpercentcutoff,cumpercentcutoff,mincount
 Read-init-file
Report
Report-details
Rule-files
 Using --scope system for System-Wide Measurements
Psetid psetid
 Search
Skip-functions
Sort-by
Sort-bymetric,cpuevent
 Source-path-map
Stop-functions
Summary-cutoff
Summary-cutoffpercentcutoff,cumpercentcutoff,mincount
 System-model Linux only
System-usage=
Term-display
System-modelmodel-number,number-of-cells
 User-regions
Threads
Traps-reported
 Version
Version
See -v or --version p
 Using the HP Caliper Advisor
What Is the HP Caliper Advisor?
Example of an HP Caliper Advisor Report
Limitations to Keep in Mind
 Example 1 HP Caliper Advisor Report
Steps in Using the Advisor
Steps in Using the Advisor
 Where adviseoptions are
Command Line to Invoke the Advisor
Command line is
 Advice-classes
Advice-cutoff
Advice-details
Max-count
 More Typical Examples
Getting Started with the Advisor Examples
Simplest Example
 Then, run the Advisor on the composite performance data
Explanation of Report Output
Followed by
 How to Read an Advisor Report
 Suggestions for Using the HP Caliper Advisor
Suggestions for Using the HP Caliper Advisor
 How the HP Caliper Advisor Works
 Using the HP Caliper Advisor in the GUI
Basic Steps in Using the HP Caliper Advisor in the GUI
Basic Steps in Using the HP Caliper Advisor in the GUI
Making Performance Measurement Runs
 Using the HP Caliper Advisor in the GUI
Selecting Performance Data to Analyze Optional
 Projects View, with a Single Project Selected
Selecting Performance Data to Analyze Optional
 Generating Advice
Projects View, with a Single Measurement Run Selected
 Reviewing and Acting on the Advice
Reviewing and Acting on the Advice
 Advisor Report in the HP Caliper GUI
 Caliperinit file, you can then simply type
Configuring HP Caliper
Example of a .caliperinit File
 Setting Constants in the .caliperinit File
Disasmtargetnamelimit = limit
Suppressinitwarnings = TrueFalse
Suppressstatementdata = TrueFalse
 Configuring Data Collection
Configuring Data Collection
Specifying Which CPU Events to Measure
Shortening CPU Event Names
 Module-default Module-include Module-exclude
Specifying Which Load Modules to Collect Data For
Module-include modulelist
Module-exclude modulelist
 Default Settings for Load Module Data Collection
How to Specify Load Module Names
 Controlling Granularity of Data Collection and Reports
Specifying Processes to Measure
Process Tree Report
For more information, see -s or --sampling-spec p
 Default
Syntax for -p Option
Root-forks
Customfunctionname
 Someopt1,opt2,...pattern
Using -p some
Some opt1,... pattern Glob1 glob2
 Examples of the -p Option
Process Origin Options Used with -p some
To measure only ecom and ld
Reports information for cc root, cc fork, cc fork, ctcom
 Using HP Caliper in Your Build Process
Using HP Caliper in Testing and Quality Assurance
Using HP Caliper to Generate Test Suite Reports
Attaching to a Running Process to Perform Measurements
 Options for the caliper info Command
Example Output of the caliper info Command
 Examples of the caliper info Command
 HP Caliper Environment Variables
 Layout of an HP Caliper Text or CSV Report
Controlling the Content of Reports
Controlling the Content of Reports
 Metrics You Can Use for Report Sorting and Cutoffs
Metrics You Can Use for Report Sorting and Cutoffs
 Available Metrics for Report Sorting and Cutoffs
 This produces a report similar to this truncated report
Module-Centric Reports
For example, assume that you perform this HP Caliper run
 Process Summary for a Diff Run
Process Summary
Process Summary for a --group-by none Run
 Function Details
Disassembly Listing
Function Details
 Branch Targets in Disassembly Listings
Source Position Correlation
Address Types Shown
Source Line Data
 How Functions Are Named in Reports
VSE Information Shown in Report Output
Unnamed Functions
Unknown Functions
 Controlling the Content of Reports
 Changing the Default Name and Location
How HP Caliper Saves Data in Databases
Names and Locations for the Databases
Or simply
 You can use the caliper report merge diff command to
Where reportoptions is one or more of these options
Creating Reports from Multiple Databases
Caliper report merge diff reportoptions databases
 Databases is one of these
Database2 database1 for caliper diff
Caliper report reportoptions database
Caliper merge reportoptions database1 database2
 Example 2 Example of a caliper merge Run
Cpucycles
 Pmutrace Scgprof
Caliper diff reportoptions database2 database1
 Example 3 Example of a caliper diff Run
 Example of How to Use the caliper diff Command
Cstack Pmutrace Scgprof
As cc1 ld
As cc1
 Producing a Sampled Call Graph Profile Analysis
How Sampled Call Graph Profile Analysis Works
Differences Between scgprof and cgprof
Producing a Sampled Call Graph Profile Analysis
 Running the HP Caliper Sampled Call Graph Profile
Sampled Call Graph Text Report Example
Caliper scgprof caliperoptions program programarguments
Running the HP Caliper Sampled Call Graph Profile
 Sampled Call Graph Text Report Example
 Sampled Call Graph Text Report Example
 Producing a Sampled Call Graph Profile Analysis
 Br.cond.dpnt.many self+0x2db0
 Producing a Sampled Call Graph Profile Analysis
 Sampled Call Graph Text Report Example
 Producing a Sampled Call Graph Profile Analysis
 Root
 Sampled Call Graph Profile Report Details
Flat Profile Part of the Report
Call Graph Part of the Report
Hot Call Paths Part of the Report
 Diagnostic Messages
Diagnostic Messages appear at the end of the report
Gprof Fallacy and Possibly Misleading Results
Gprof Fallacy and Possibly Misleading Results
 Producing a Sampled Call Stack Profile Analysis
Running HP Caliper to Produce a Call Stack Profile
Call Stack Profile Text Report Example for HP-UX
Caliper cstack caliperoptions program programarguments
 Call Stack Profile Text Report Example
Call Stack Profile Text Report Example for HP-UX
 Producing a Sampled Call Stack Profile Analysis
 Call Stack Profile Text Report Example for HP-UX
 Root
 Call Stack Profile Text Report Example for HP-UX
 Producing a Sampled Call Stack Profile Analysis
 Function Indexes Thread 6065598@startroutine Name
 Call Stack Profile Text Report Example for Linux
An example report for HP Caliper on Linux is shown here
 Call Stack Profile Text Report Example for Linux
Call Stack Profile Text Report Example for Linux
 Producing a Sampled Call Stack Profile Analysis
 Root
 Producing a Sampled Call Stack Profile Analysis
 Call Stack Profile Text Report Example for Linux
 Producing a Sampled Call Stack Profile Analysis
 Call Stack Profile Report Details
Blocking Primitives Summary Part of the Report
Samples-running HP-UX only Samples-blocked HP-UX only
Call Stack Profile Report Details
 Example 4 Sample cstack Report Blocking Primitives Details
 Limitations to Using cstack
Avoids gprof Fallacy
Pstack like functionality
Sample report follows
 Producing a Sampled Call Stack Profile Analysis
 Performing CPU Metrics Analysis
151
 HP Caliper Features Specific to HP-UX
Measuring Memory Usage Concurrently with Other Measurements
 Examples of the --memory-usage= Option
 Example Report Output
How to Read the Reports
System Memory Configuration Table
 Process Memory Usage Table
 Measuring System Usage Concurrently with Other Measurements
 Example System Usage Report Output
Measuring System Usage Concurrently with Other Measurements
 Interpreting the Data
Caliper measurement options pid
 Taking PMU Samples in Your Code
Triggering PMU Samples in Specific Code Regions
Run ./myprog and find the process ID of the process
Taking PMU Samples in Your Code
 Precautions When Using Triggered Samples
160 shows part of the resulting report
 Restricting PMU Measurements to Specific Code Regions
 Caliperpmuenable
 Restricting PMU Measurement to Specific Code
 HP Caliper Diagnostic and Warning Messages
Error #28 Caliper Invalid Measurement Combination
HP Caliper Diagnostic and Warning Messages
Instructions Labeled Stub
 Mispredicted Branches Example
Mispredicted Branches
 PMU Sample Hits Outside Function Range
Scgprof Reports Require Kernel Patch
 Scgprof Reports Require Kernel Patch
 Example Command Line for Text Report
Example Command Line for CSV Report
Descriptions of Measurement Reports
Alat Measurement Report Description
 Alat Metrics Summed for Entire Run
Metrics for Integrity Servers Itanium 2 Systems
 Alat Measurement Report Metrics
INSTCHKALDCALAT.FP
INSTCHKALDCALAT.INT
INSTFAILEDCHKALDCALAT.FP
 Information in alat Measurement Reports
Branch Measurement Report Description
How Alat Metrics Are Obtained
 Branch Metrics Summed for Entire Run
 BRMISPREDDETAIL.NRETIND.WRONGPATH
BRMISPREDDETAIL.NRETIND.WRONGTARGET
BRMISPREDDETAIL.RETURN.CORRECTPRED
BRMISPREDDETAIL.RETURN.WRONGPATH
 Branch Measurement Report Metrics
Information in branch Measurement Reports
 Cgprof Report Description
How branch Metrics Are Obtained
Available only on HP-UX
For rows showing instructions on a bundle boundary
 Profiled otherwise blank
HP Caliper Call Graph Profile Results Accuracy
Call Graph Profile Metrics
 Information in cgprof Measurement Report Parent Listings
 Cpu Measurement Report Description
Information in cgprof Measurement Report Children Listings
Column Description Func Hits In Children
This child entry
 Example Command Lines for Text Report
CPU Event Sets
 Dspec
L1dcache
L1icache
L2cache
 Threadswitch
Cstack Measurement Report Description
Cstack Measurement Report Metrics
Sysbus
 Be resolved to a symbol
Column Description Total Hits Waiting
Message queue, socket, pipe, file descriptor
Semaphore, message queue, socket, pipe, file descriptor
 Cycles Measurement Report Description
Parent Func Hits
Children
Cycles Measurement Report Description
 Cycles Metrics Summed for Entire Run
 Cycles Measurement Metrics
Information in cycles Measurement Reports
 How cycles Metrics Are Obtained
From that bundle are split issued
Dcache Measurement Report Description
 L1DREADMISSES.ALL
Dcache Metrics Summed for Entire Run
L1DREADS
 L2DMISSES
Datareferences
L2DINSERTMISSES
 Dcache Measurement Report Metrics
L2DREFERENCES.ALL
Information in dcache Measurement Reports
Cycles Object Avg. Dcache
 Example dcache Reports
 Dcache Measurement Report Description
 How Data Cache Metrics Are Obtained
 Dtlb Measurement Report Description
How Latency Bucket Metrics Are Obtained
How the Data Summary Information Is Obtained
Dtlb Measurement Report Description
 Dtlb Metrics Summed for Entire Run
L2DTLBMISSES
Dtlbinsertshpw
L2DTLBMISSES / Datareferences
 Dtlb Measurement Report Metrics
Cycles lost due to all stalls lower is better
 Information in dtlb Measurement Reports
How Data TLB Metrics Are Obtained
Function Source statement Instruction
 Ecount Measurement Report Description
Ecount Metrics Summed for Entire Run
Cpucycles
Ecount Measurement Report Description
 Descriptions of Measurement Reports
 Fcount Measurement Report Description
Fcover Measurement Report Description
Fcount Measurement Report Metrics
Fcover Measurement Report Metrics
 Fprof Measurement Report Description
Unknown Source Files
Directory
Function
 Fprof Metrics Summed for Entire Run
Number of elapsed processor cycles
Full pipe bubbles in main pipe
Fprof Measurement Report Description
 Fprof Measurement Metrics
 How fprof Metrics Are Obtained
Information in fprof Measurement Reports
 Icache Measurement Report Description
Icache Metrics Summed for Entire Run
L1IREADS
L2INSTDEMANDREADS
 L1IPREFETCHES
 Information in icache Measurement Reports
Icache Measurement Report Metrics
That are misses
 Function Details
How Instruction Cache Metrics Are Obtained
 Itlb Measurement Report Description
Itlb Metrics Summed for Entire Run
ITLBMISSESFETCH.L1ITLB
ITLBMISSESFETCH.L2ITLB
 Itlb Measurement Report Description
Itlb Measurement Report Metrics
BELOSTBWDUETOFE.IMISS
 Function Statement Cache line
Information in itlb Measurement Reports
 Pmutrace Measurement Report Description
Scgprof Measurement Report Description
How Instruction TLB Metrics Are Obtained
Pmutrace Measurement Report Description
 Is profiled otherwise blank
Scgprof Measurement Report Metrics Flat Profile
Scgprof Measurement Report Metrics Call Graph Profile
 Information in scgprof Measurement Report Parent Listings
Scgprof Measurement Report Description
 Traps Measurement Report Description
 Vfault
Darght
Dbit
Debug
 Traps Metrics Summed for Entire Run
 Information in traps Measurement Reports
Traps Measurement Metrics
Cycles lost due to RSE stalls
 How traps Metrics Are Obtained
 Event Set Descriptions for CPU Metrics
Brpath Event Set
Metrics Available from this Measurement
Include idle --exclude-idle False
 Brpred Event Set
Event Set Descriptions for CPU Metrics
 Iprel
Brpred Event Set
 C2c Event Set
 Cpi Event Set
Cpi Event Set
 Mips
Pred-Off
CPI
 Cpubus Event Set
Cpubus Event Set
Available only on Itanium 2 and dual-core Itanium 2 systems
 Cspec Event Set
 Dispersal Event Set
Dispersal Event Set
 Dspec Event Set
 Dspec Event Set
 Fp Event Set
FCVT.fx
 SIR
Fp Event Set
 L1dcache Event Set
 L1icache Event Set
L1icache Event Set
NON RSE Misses per Kinst
 Metrics Available from this Measurement
 L2cache Event Set
L2cache Event Set
 Metrics Available from this Measurement
 L2dcache Event Set
L2dcache Event Set
 L2icache Event Set
 L2icache Event Set
 L3cache Event Set
 L3cache Event Set
 Memreq Event Set
 Queues Event Set
Queues Event Set
 Snoop Event Set
 Stall Event Set
Stall Event Set
 Metrics Available from this Measurement
 Sysbus Event Set
Sysbus Event Set
 Bril
CPU
BRL
 Threadswitch Event Set
BWL
BRC
BIL
 Tlb Event Set
 Tlb Event Set
 Event Set Descriptions for CPU Metrics
 Glossary
253
 Set p
Glossary
 Hot spot
255
 Nop
 Measurements p
257
 Symbols
Index
 259
CPU event names shortening, 93 CPU events
Daemon processes measuring
 Environment variables HP Caliper, 103 Error messages
 Sampled measurements performing
261
 Useparensforstatementdata constant