Transcription

IBM STG - PerformanceVisual Performance AnalyzerIBM Visual Performance AnalyzerUser GuideVersion 5.0Issue Date: 06/06/2007Revision Status: FinalDLMAlphaworksPage 1 of 240

IBM STG - PerformanceVisual Performance AnalyzerAbout this DocumentThis document describes how to install and use the Visual Performance Analyzer tool. This document will help youinstall the tool, learn how to collect performance data on your platform and later analyze the data, using the VPAplug-ins.DLMAlphaworksPage 2 of 240

IBM STG - PerformanceVisual Performance AnalyzerTable of Contents1. INTRODUCTION. 51.1 VPA on Alphaworks. 61.2 Release History.62. VPA BASICS. 72.1 Design Objectives.82.2 Deployment . 82.3 Software Stack Information.93. INSTALLATION. 113.1 Windows. 113.1.1 Download from Alpha works. 113.1.2 Extract the compressed file. 113.1.3 Create a Shortcut . 153.2 Linux. 203.2.1 Download from Alphaworks. 213.2.2 Extract the compressed file. 213.3 AIX. 213.3.1 Download from Alphaworks. 213.3.2 Extract the compressed file. 214. COLLECTING PERFORMANCE DATA. 224.1 Using Platform Tools. 224.2 Setting up Windows to collect Profiling data. 234.2.1 Verify that your Java Runtime is installed on your system. 234.2.2 Verify that the Windows performance tools are installed. 244.2.3 Verify PI Tprof . 244.2.4 Copying data files. 244.3 Setup up AIX to collect Profiling data. 254.3.1 Verify that your Java Runtime is installed on your system. 254.3.2 Verify that the AIX performance tools are installed. 254.3.3 Verify AIX Tprof. 254.3.4 Copying data files. 254.3.5 Using Remote System Explorer. 264.4 Collecting Profiling Data on Linux platform. 304.4.1 Linux CELL/B.E. 304.4.2 Linux PowerPC. 314.4.3 Linux X86. 314.5 Collecting Pipeline data on PowerPC. 314.6 Collecting Counter Data on PowerPC. 325. USING THE VPA ANALYSIS TOOLS. 335.1 Profile Analyzer. 335.1.1 Create a Profiling Configuration. 335.1.2 Run Profiling Configuration. 385.1.3 Load an Existing Profile. 385.1.4 Profile Navigation. 405.1.5 Profile Comparison. 635.1.6 Profile Merge. 665.1.7 Symbol Analysis. 67DLMAlphaworksPage 3 of 240

IBM STG - PerformanceVisual Performance Analyzer5.1.8 Configure database connections and manage cached database files. 985.2 Code Analyzer. 1045.2.1 Load an executable for analysis.1045.2.2 Adding profiling information. 1075.2.3 Navigate the Executable.1085.2.4 Instruction Properties Analysis . 1325.2.5 Statistic Analysis. 1415.3 Pipeline Analyzer. 1495.3.1 Load an existing pipeline file. 1495.3.2 Navigating the scroll pipe view. 1535.3.3 Navigating the resource view. 1565.4 Counter Analyzer . 1615.4.1 Basic concepts for Counter Analyzer. 1625.4.2 Load an existing counter data file.1635.4.3 Navigate the Counter Analyzer Perspective. 1685.5 Trace Analyzer . 1945.5.1 Basic concepts. 1945.5.2 Load an existing trace file. 1955.5.3 Navigate the Trace Analyzer Perspective. 1966. APPENDIX A - SAMPLE PROFILING SESSION. 2017. APPENDIX B – RUN.TPROF XML.SH. 2178. APPENDIX C – RUN.TPROF E.CMD. 225DLMAlphaworksPage 4 of 240

IBM STG - PerformanceVisual Performance Analyzer1.IntroductionWhat is Visual Performance Analyzer?Visual Performance Analyzer (VPA) is an Eclipse-based performance visualization toolkit. It consists of five majorcomponents: Profile Analyzer, Code Analyzer, Pipeline Analyzer, Counter Analyzer and Trace Analyzer.Profile Analyzer provides a powerful set of graphical and text-based views that allow users to narrow downperformance problems to a particular process, thread, module, symbol, offset, instruction, or source line. ProfileAnalyzer supports time-based system profiles (Tprofs) collected from a number of IBM platforms.Code Analyzer examines executable files and displays detailed information about functions, basic blocks, andassembly instructions. It is built on top of FDPR-Pro (Feedback Directed Program Restructuring) technology andallows adding of FDPR-Pro and Tprof profile information. (The Linux version of FDPR-Pro is available here atAlphaWorks.) Code Analyzer is able to show statistics; navigate disassembled instructions; and displayperformance comments, instruction grouping information, and map instructions back to source code.Pipeline Analyzer is a port of the IBM Performance Simulator for Linux on POWER , another AlphaWorkstechnology. Pipeline joins the VPA toolkit to provide VPA users with the means of examining how code is executedon various IBM POWER processors. Pipeline Analyzer displays the pipeline execution of instruction tracesgenerated by a POWER series processor. It does so by providing a scroll view and a resource view of theinstruction execution.Counter Analyzer is a common tool to analyze hardware performance counter data among many IBM eServerplatforms, which includes systems running on AIX, i5OS, zOS, Linux on POWER, Linux on CELL/B.E. CounterAnalyzer accepts hardware performance counter data generated by AIX tools hpmc and tcount in the form of across-platform XML file format. The tool uses either build-in hsqldb database engine or external DB2 instance tostore the raw performance counter data. The tool provides multiple views to help users identify and eliminateperformance bottlenecks by examine the hardware performance counter values, computed performance metricsand also CPI breakdown models.Trace Analyzer visualizes Cell/B.E. traces containing information such as DMA communication, locking/unlockingactivities, mailbox messages, etc. Trace Analyzer shows this data organized by core, along a common timeline.Extra details are available for each kind of events, for example, lock identifier for lock operations, accessed addressfor DMA transfers, etc.Visual Performance Analyzer is available as an IBM internal use tool for any IBMer who wants to try it out. Supportis provided on a best-effort basis.How does it work?Profile Analyzer parses system profiles into an internal profiling data model that supports the profile hierarchy,offset locations, tick counts, CPU counter data, source line information, and disassembly. The plug-in then displaysthis data model, using various Eclipse views. The system profiles are those produced by Performance Inspectorand AIX Tprof. However, Visual Performance Analyzer can be extended to support almost any platform byconverting a system profile to an XML schema that it understands.Code Analyzer is able to read profiling information generated by AIX Tprof or FDPR-Pro performance tools. It readsin executable files and shared libraries and analyzes them using FDPR-Pro. FDPR-Pro is a post-link analyzer andperformance optimization tool that can perform accurate static and dynamic analysis of executable files.Pipeline Analyzer reads the .pipe and .config input files that are produced by the IBM Performance Simulator forLinux on POWER. An instruction trace is first collected and analyzed by a processor model. The two output files areproduced for viewing with either the Performance Simulator or Visual Performance Analyzer.DLMAlphaworksPage 5 of 240

IBM STG - PerformanceVisual Performance AnalyzerCounter Analyzer reads the counter data files as its input, parses these files into an internal counter data model,and then displays this data model using various Eclipse views. The counter data files are generated by hpmc ortcount, having a suffix “.pmf”.Trace Analyzer reads in traces generated by the Performance Debugging Tool for Cell, and displays time-basedgraphical visualization of the program execution as well as a list of trace contents and the event details forselection.1.1VPA on AlphaworksVisual Performance Analyzer was released on Alpha works to explore the use of Eclipse-based performance toolswith IBM customers. VPA is built as an Eclipse Rich Client Platform (RCP) package and there are versions for AIXand Windows. An RCP release contains Eclipse runtime files, all required plug-ins and VPA plug-ins.1.2Release HistoryDateDescription09/14/2006Initial release of VPA to Alphaworks06/08/2007VPA 5.0 ReleaseDLMAlphaworksPage 6 of 240

IBM STG - PerformanceVisual Performance Analyzer2.VPA BasicsVisual Performance Analyzer is an Eclipse-based tool set that includes: Profile Analyzer, Code Analyzer, PipelineAnalyzer, Counter Analyzer, and Trace Analyzer. All of these tools are Eclipse plug-ins.Figure 1 System Architecture of Visual Performance AnalyzerProfile AnalyzerProfile Analyzer is a system profile analysis tool. This plug-in obtains profile information from various platformspecific tools, and provide analysis views for user to identify performance bottle necks.Pipeline AnalyzerPipeline Analyzer provides almost the same features as ScrollPipeViewer, a standalone Java application. It getspipeline information of Power processors from the Sim-GX tool, and provides two analysis views; scroll mode andresource mode.Code AnalyzerCode Analyzer reads XCOFF (AIX binary file format) files or ELF files running on Linux on Power, and displaysprogram structure with block information. With related profile information, it can provide analysis views on hottestprogram block as well as some optimization suggestions.Counter AnalyzerDLMAlphaworksPage 7 of 240

IBM STG - PerformanceVisual Performance AnalyzerCounter Analyzer reads counter data files generated by hpmc or tcount running on AIX, and it provides multipleviews to help users identify and eliminate performance bottlenecks by examine the hardware performance countervalues, computed performance metrics and also CPI breakdown models.Trace AnalyzerTrace Analyzer reads in traces generated by the Performance Debugging Tool for Cell, and displays time-basedgraphical visualization of the program execution as well as a list of trace contents and the event details forselection.2.1Design ObjectivesThe base object of Visual Performance Analyzer is to extend the capabilities of Eclipse by adding plug-in supportfor: system profile, code, pipeline, and counter analysis. VPA is a collection of performance data analysis toolsthat can be used to identify performance bottlenecks. VPA does not supply performance data collection tools.Instead, it relies on platform specific tools, like AIX Tprof, to collect the performance data. When necessary, multiplatform support is provided by converting data into XML. The XML schema is understood by VPA and is parsedand loaded for analysis. The VPA tool must be extensible and it achieves this by allowing for additional plug-ins tobe added and also by adding integration between p