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