| Analyzing Program Performance with Sun WorkShop |
Preface
This manual describes the performance and analysis tools available with Sun WorkShopTM. Developing high performance applications requires a combination of compiler features, libraries of optimized routines, and tools to analyze and isolate code. Analyzing Program Performance With Sun WorkShop describes the third part of this development strategy, and shows you how to use these tools:
- The Sampling Analyzer and Sampling Collector
- LoopTool and LoopReport
prof,gprof, andtcovWho Should Use This Book
This manual is intended for programmers with a working knowledge of Sun WorkShop and some understanding of the SolarisTM operating environment and UNIX® commands. Some knowledge of performance analysis is also helpful in understanding how to use the data that is derived from the tools, but is not required for using the tools. The traditional profiling tools
prof,gprof, andtcovdo not require a working knowledge of Sun WorkShop.Multiplatform Release
This Sun WorkShop release supports versions 2.6, 7, and 8 of the SolarisTM SPARCTM Platform Edition and Solaris Intel Platform Edition Operating Environments.
Note The term "x86" refers to the Intel 8086 family of microprocessor chips, including the Pentium, Pentium Pro, and Pentium II processors and compatible microprocessor chips made by AMD and Cyrix. In this document, the term "x86" refers to the overall platform architecture, whereas "Intel Platform Edition" appears in the product name.
Access to Sun WorkShop Development Tools
Because Sun WorkShop product components and man pages do not install into the standard
/usr/bin/and/usr/share/mandirectories, you must change yourPATHandMANPATHenvironment variables to enable access to Sun WorkShop compilers and tools.To determine if you need to set your
PATHenvironment variable:1. Display the current value of thePATHvariable by typing:
%echo $PATH2. Review the output for a string of paths containing/opt/SUNWspro/bin/.
- If you find the paths, your
PATHvariable is already set to access Sun WorkShop development tools. If you do not find the paths, set yourPATHenvironment variable by following the instructions in this section.To determine if you need to set your
MANPATHenvironment variable:1. Request theworkshopman page by typing:
%man workshop2. Review the output, if any.
- If the
workshop(1) man page cannot be found or if the man page displayed is not for the current version of the software installed, follow the instructions in this section for setting yourMANPATHenvironment variable.
Note The information in this section assumes that your Sun WorkShop 6 products were installed in the/optdirectory. Contact your system administrator if your Sun WorkShop software is not installed in/opt.
The
PATHandMANPATHvariables should be set in your home.cshrcfile if you are using the C shell or in your home.profilefile if you are using the Bourne or Korn shells:
- To use Sun WorkShop commands, add the following to your
PATHvariable:
/opt/SUNWspro/bin- To access Sun WorkShop man pages with the
mancommand, add the following to yourMANPATHvariable:
/opt/SUNWspro/manFor more information about the
PATHvariable, see the csh(1), sh(1), and ksh(1) man pages. For more information about theMANPATHvariable, see the man(1) man page. For more information about setting yourPATHandMANPATHvariables to access this release, see the Sun WorkShop 6 Installation Guide or your system administrator.How This Book Is Organized
Chapter 1, "Overview of Performance Profiling and Analysis Tools," introduces the performance analysis tools, briefly discussing what they do and when to use them.
Chapter 2, "Tutorial: Using the Sampling Collector and Analyzer," is a tutorial demonstrating how to use the Sampling Collector and Analyzer to fine-tune the performance of three sample programs.
Chapter 3, "Sampling Collector Reference," describes how to use the Sampling Collector to collect information about program execution.
Chapter 4, "Sampling Analyzer Reference," describes how to use the Sampling Analyzer to fine-tune program performance.
Chapter 5, "er_print Reference," describes how to use the
er_printutility.Chapter 6, "Advanced Topics: Understanding the Sampling Analyzer and Its Data," discusses advanced issues involving the impact of optimization on data that is displayed by the Sampling Analyzer.
Chapter 7, "Loop Analysis Tools," presents LoopReport and LoopTool, which help you analyze program loops that have been parallelized by your compiler.
Appendix A, "Traditional Profiling Tools," covers the traditional profiling tools
prof,gprof, andtcov. These tools help you find the parts of your program that are most heavily used, and determine how much of your program is being tested.Typographic Conventions
TABLE P-1shows the typographic conventions that are used in Sun WorkShop documentation.
Shell Prompts
TABLE P-2 shows the default system prompt and superuser prompt for the C shell, Bourne shell, and Korn shell.
TABLE P-2 Shell Prompts C shell %Bourne shell and Korn shell $C shell, Bourne shell, and Korn shell superuser #
Related Documentation
You can access documentation related to the subject matter of this book in the following ways:
- Through the Internet at the
docs.sun.comsm Web site. You can search for a specific book title or you can browse by subject, document collection, or product at the following Web site:
http://docs.sun.com- Through the installed Sun WorkShop products on your local system or network. Sun WorkShop 6 HTML documents (manuals, online help, man pages, component readme files, and release notes) are available with your installed Sun WorkShop 6 products. To access the HTML documentation, do one of the following:
- In any Sun WorkShop or Sun WorkShopTM TeamWare window, choose Help
About Documentation.
- In your NetscapeTM Communicator 4.0 or compatible version browser, open the following file:
- (Contact your system administrator if your Sun WorkShop software is not installed in the
/optdirectory.) Your browser displays an index of Sun WorkShop 6 HTML documents. To open a document in the index, click the document's title.TABLE P-3 lists related Sun WorkShop 6 manuals by document collection.
TABLE P-4 describes related Solaris documentation available through the
docs.sun.comWeb site.
|
Sun Microsystems, Inc. Copyright information. All rights reserved. Feedback |
Library | Contents | Previous | Next | Index |