Performance monitoring using hardware counters : Releasing HAR 2.0
By Frederic Pariente on Apr 28, 2009
In 2001, our ISV Engineering group at Sun --f.k.a. Market Development Engineering-- released the first version of the Hardware Activity Reporter (HAR) tool for Solaris 8 and up. Starting with Solaris 8, Sun had begun to deliver public interfaces for the SPARC and x86 hardware performance counters --
libcpc, to access CPU counters and
libpctx, to track a process--, leading to a new generation of performance monitoring tools: the Solaris cpustat and cputrack commands, hardware-counter profiling in Sun Studio's Performance Analyzer, SPOT and HAR, to name a few.
HAR differs from other tools in the fact that it combines the low-level counts into higher-level metrics more useful to application programmers. Application programmers are typically interested in the following metrics: CPI, FLOPS, MIPS, address bus percentage utilization, cache miss rates, branch and branch miss rates, and stall rates. These metrics help in assessing the fair usage of available processing units, locating bottlenecks and guiding tuning efforts, when needed. Check out this SDN article on how to use HAR to identify performance bottlenecks and quantify code-tuning improvements through a couple of case studies in the fields of CFD and MCAD.
Since the release of Solaris 10, HAR 1.x had become somewhat obsolete as we stopped adding support for new processors after UltraSPARC IV and Pentium P6. Today, thanks to the work of Amir Javanshir, we are happy to announce the release 2.0 of HAR, featuring :
- a full C++ rewrite --HAR 1.x was written in plain C, the C++ inheritance mechanism makes it easier to add a new processor type.
- support for Solaris 10 and up --Solaris 10 introduced
libcpc2as a replacement for
libcpc, HAR 2.0 calls into
- support for OpenSolaris
- support for Sun UltraSPARC I to IV+, Sun UltraSPARC T1 & T2, Fujitsu SPARC64 VI & VII, Intel Pentium, AMD Opteron
- open source available under the free-software CDDL license
Both Sparc and x86 binaries of HAR 2.0 are now available for download at http://opensolaris.free.fr/har/, and the source will soon be. HAR 2.0 will also be distributed as part of dimStat which carries a HAR 1.x release today. For your information, dimStat is a powerful tool for system monitoring, developed by Sun's benchmark engineer Dimitri Kravtchuk, widely used during customer benchmarks at the Sun Solution Centers and available to all as free software for Solaris and Linux. Highly recommended!
For documentation, type
For technical support, post your questions on the HPC technology Partners forum on forums.sun.com.