HPUX Debuggers and Profilers - PowerPoint PPT Presentation

1 / 12
About This Presentation
Title:

HPUX Debuggers and Profilers

Description:

has replaced all previous debuggers on HP-UX (xdb, dde) for ... Program: /home/daveb/crafty.O3. Invocation: crafty.O3. Process ID: 8859 (started by Caliper) ... – PowerPoint PPT presentation

Number of Views:78
Avg rating:3.0/5.0
Slides: 13
Provided by: sabinebu
Category:

less

Transcript and Presenter's Notes

Title: HPUX Debuggers and Profilers


1
HP-UX Debuggers and Profilers
  • see http//www.hp.com/go/wdb
  • http//www.hp.com/go/hpcaliper

2
WDB/GDB Debugger
  • has replaced all previous debuggers on HP-UX
    (xdb, dde) for both PA-RISC and IPF.
  • Choice of user interfaces
  • gdb for command line use
  • vdb runs gdb in a split terminal window like xdb
  • wdb is a Motif GUI on top of gdb
  • Location /opt/langtools/bin

3
HP WDB Features
  • Support for 32 bit and 64 bit data models and all
    languages
  • Debugs optimized code up to O2
  • Support for pthreads and consequently OpenMP
  • HW watchpoints
  • Memory checking (currently only on PA-RISC)
  • Array browsing
  • User definable buttons
  • Basic MPI supportAn extra wdb instance is
    started for every MPI process, so this is usable
    up to maybe 4 processes.read man mpidebug for
    MPI debugging instructions

4
Debug Preparation
  • On PA-RISC
  • Compile and link with gDebug information is in
    the executable
  • No support for 64 bit optimized programs. Compile
    at O0
  • 32 bit programs can be debugged at O1 (good) and
    O2 (limited)
  • Trouble with NFS mounted executables. Try to work
    on local disk.
  • On IPF
  • Compile and link with gDebug information stays
    in the object filesCompile with noobjdebug for
    debug info in the executable
  • Both 32 bit and 64 bit programs can be debugged
    at O1 (good) and O2 (limited).Note that
    register variables cant be viewed at O2

5
Profiling with CALIPER (1)
  • Highlights
  • Dynamic instrumentation requires no preparation
    for executables
  • All Itanium PMU counters are available for event
    counts
  • Supports multithreaded execution
  • Wish List
  • Support for MPI profiling and 3D charts for
    parallel profiles
  • Better source line mapping
  • Two modes of operation
  • Low intrusion hardware counters based
    measurements
  • Sample based/ clock driven profiling
  • Measure execution cycles, cache misses, branch
    mispredictions, etc.
  • Dynamic binary instrumentation for precise counts
  • e.g. function call graph, basic block arc counts
    accurately
  • event driven (Gprof or Cxperf type)

6
Profiling with CALIPER (2)
  • Usage/opt/caliper/bin/caliper config-file
    ltoptionsgt ltprogramgt ltargsgt
  • Common config-files (many more available)
  • cgprof call graph profile (intrusive)
  • sample_ip sampling profile like PROSPECT (non
    intrusive)
  • pbo create flow.data for PBO (requires O1
    build)
  • dcache_miss cache metrics
  • Output options (many more available )
  • -oltfilegt single file ASCII output
  • --htmlltdirgt HTML output into directory

7
Profiling with CALIPER (3) measurements
  • type config_file comments
  • optimization pbo black box
  • total measurements total_cpu exact
    totals, no impact
  • sample measurements branch_prediction
    sampled details, low
  • dicache_miss impact
  • ditlb_miss
  • sample_cpuip
  • precise measurements arc_count exact
    details, high
  • func_count impact
  • func_cover
  • hybrid cgprof sampled exact, high
  • impact

8
Profiling with CALIPER (4) measurement strategy
  • if automatic optimization
  • if call graph profile
  • if correctness testing
  • determine what takes time
  • determine where event happens
  • determine when event happens
  • Pbo
  • cgprof
  • arc_count, func_count, func_cover
  • total_cpu w/ various events
  • branch_prediction,dicache_miss,
    ditlb_miss,sample_ip w/ select trigger
  • sample_cpu w/ select trigger

9
Profiling with CALIPER (5)
  • All PMU counters of ITANIUM can be used with
    CALIPER config files. See the list in
    /opt/caliper/doc/text/itanium2_cpu_counters
  • For counter description see the Intel Itanium-2
    Processor Reference Manual For Software
    Development and Optimisation
  • Measure total of Flops, Underflows and Clock
    Cycles
  • caliper total_cpu global-counters\
    FP_OPS_RETIRED, FP_FLUSH_TO_ZERO, CPU_CYCLES \
    ltprogramgt ltargsgt
  • Measure of MFlops per subroutine
  • caliper sample_ip \ sampling-counterFP_O
    PS_RETIRED,,1000000 \ ltprogramgt ltargsgt

10
total_cpu example
  • caliper total_cpu crafty.O3 lt crafty.in
  • HP Caliper Total CPU Counts Report
  • Target Application
  • Program /home/daveb/crafty.O3
  • Invocation crafty.O3
  • Process ID 8859 (started by Caliper)
  • Start time 075639 AM
  • End time 075643 AM
  • Last modified June 01, 2002 at 0756 AM
  • Processor Information
  • Machine name longsp8
  • Number of processors 2
  • Processor type Itanium2
  • Processor speed 798 MHz
  • Report Help
  • Use the caliper option --info to append help to
    this report,
  • or see /opt/caliper/doc/text/total_cpu.help.
  • -----------------------------------------
  • Counter Priv. Mask Count
  • -----------------------------------------
  • INST_DISPERSED 8 (USER) 5029272413
  • NOPS_RETIRED 8 (USER) 690880642
  • CPU_CYCLES 8 (USER) 3140760527
  • -----------------------------------------
  • CPI
  • 0.6245 CPU_CYCLES / INST_DISPERSED
  • Useful CPI
  • 0.7239 CPU_CYCLES / (INST_DISPERSED -
    NOPS_RETIRED)

11
branch_prediction (html) example
12
More Profiling Tools ...
  • TUSC aka TRUSS is a system call tracer. Not
    supported but usable and robust. Get it here
  • ftp//ftp.cup.hp.com/dist/networking/tools
  • Visual Threads thread tracer was recently ported
    from Tru64 to HP-UX (IPF only).Currently in beta
    status. See
  • http//shvlhd.zko.cpqcorp.net/ThreadTools
  • GlancePlus, the official HP-UX system monitor
    with GUI offers detailed statistics and graphs on
    all relevant system resources like CPUs, Memory,
    Swap, Disks, Network, ProcessesInvocation
    /opt/perf/bin/gpm
Write a Comment
User Comments (0)
About PowerShow.com