conpar94.ftp (1158308), страница 2
Текст из файла (страница 2)
Hence, when collection performance data is presented tothe user, it should be with respect to collection denition and execution semantics (e.g., bycollection element references and total collection method execution times). Access to lowlevel communication timing information, for instance, is not available as a default. Simplyput, the pC++ analysis model that supports is based entirely on language and executionsemantics, leaving the task of associating static and dynamic data at multiple levels in thelanguage system to tool implementation in the programming environment.3 The pC++ Program Analysis EnvironmentIn this section, we discuss (TAU, Tuning and Analysis Utilities)2, a rst prototype for anintegrated portable pC++ program and performance analysis environment.
The toolsetwas designed to meet the requirements described in x1.(R1) Providing a user (program-level) view. Elements of the graphical interface represent objects of the pC++ programming paradigm: collections, classes, methods, andfunctions. These language-level objects appear in all utilities.(R2) Support for high-level, parallel programming languages.
is unique because it is dened by the program analysis requirements of the pC++ language. Also, is designed2 Internally, TAU is fondly referred to as Tools Are Us.4and implemented in concert with the pC++ language system. The most dicult challenge to the development of is in determining what low-level performance (or debugging) instrumentation must be specied for capturing high-level execution abstractions,then translating performance data back to the application/language level.(R3) Integration with compilers and runtime systems.
uses the Sage++ toolkit as aninterface to the pC++ compiler for instrumentation and accessing properties of programobjects. is also integrated with the pC++ runtime system for proling and tracingsupport.(R4) Portability, extensibility, and retargetability. Because pC++ is intended to be portable,the tools have to be portable as well. We are using C++ and C to ensure an ecient,portable, and reusable implementation.
The same reason led us to choose Tcl/Tk[12, 13] for the graphical interface.The tools are implemented as graphical hypertools. While they are distinct tools,they act in concert like they were one single application. Each tool implements somedened tasks.
If one tool needs a feature of another one, it sends a message to the othertool requesting it (e.g., display the source code for a specic function). This designallows easy extensions. The Sage++ toolkit also supports Fortran-based languages,allowing to be retargeted to other programming environments.(R5) Usability. We tried to make the toolset as user-friendly as possible. Many elementsof the graphical user interface act like links in hypertext systems: clicking on thembrings up windows which describe the element in more detail. This allows the userto explore properties of the application by simply interacting with elements of mostinterest.
The tools also support global features. If a global feature is invoked in anyof the tools, it is automatically executed in all currently running tools. Examples ofglobal features include select-function, select-class, and switch-application. also includes a full hypertext help system.3.1 Tool Architecture OverviewFigure 1 shows an overview of the pC++ programming environment. The pC++ compilerfrontend takes a user program and pC++ class library denitions (which provide predenedcollection types) and parses them into an abstract syntax tree (AST).
All access to the AST isdone via the Sage++ library. Through a command line switch, the user can choose to compilea program for proling or tracing. In both cases, the instrumentor is invoked to do the necessary instrumentation in the AST (see Section 5.1 for details). The pC++ backend transformsthe AST into plain C++ with calls into the pC++ runtime system. This C++ source code isthen compiled and linked by the C++ compiler on the target system.5pC++sourcepC++compilerτ staticpC++class libraryanalysis toolsfancycageyclassyfrontendτ dynamicinstrumentcommandsinstrumentorpC++RTSbackendSage++analysis toolsracyASTexecutablefileeasyprofiledataruneventtracesexternal performance toolsSIMPLEUpShotPabloFigure 1: Tools ArchitectureThe program and performance analysis environment is shown on the right side.
Theyinclude the TAU tools, proling and tracing support, and interfaces to performance analysistools developed by other groups [4, 10, 11, 16, 17]. In the following, the static and dynamictools are described in more detail.4 Static Analysis ToolsOne of the basic motivations behind using C++ as a base for a new parallel language is itsproven support for developing and maintaining complex and large applications. However, toapply the C++ language capabilities eectively, users require support tools to manage andaccess source code at the level of programming abstractions. This is even more importantfor pC++.Currently, provides three tools to enable the user to quickly get an overview of a largepC++ program and to navigate through it: a global function and method browser (fancy),a static callgraph display (cagey), and a class hierarchy display (classy). In addition, thetools allow the user to easily nd execution information about language objects as they are6integrated with the dynamic analysis tools through the global features of .
To locate thecorresponding dynamic results (after a measurement has been made), the user only has toclick on the object of interest (e.g., a function name in the callgraph display).Figure 2: Master Control Window and Fancy4.1 FancyFancy (File ANd Class displaY) lets the user browse through the les and classes thatcompose the application, allowing the source text of its functions or methods to be quicklylocated.
The main window displays four listboxes (see Figure 2). The two on the left show allsource les used (Files) and all classes dened (Classes) for the current application. Selectingone item in either of these listboxes displays all global functions dened for the selected le(in Functions) or all methods of the selected class (in Methods), respectively.Selecting a routine (either a global function or class method) displays the source text ofthe selected procedure in a separate viewer window. In Figure 2 the method setplusvalue ofclass DistBlkMatrix was selected. The header and body of the currently selected routine aswell as its children (functions and methods which are called from that routine) are highlighted7Figure 3: Cagey and Classyusing dierent colors.
Routines can also be selected by clicking on the children in the viewerwindow. Class denitions can be displayed by selecting the class name in the function header.In this manner, fancy provides high-level access to pC++ program structure and source code.4.2 CageyCagey (CAll Graph Extended displaY) shows the static callgraph of the functions andmethods of the current user application (see Figure 3). It uses Sage++ to determine thecallgraph structure and to dierentiate between global functions and class methods. Cageyenables the user to quickly observe the calling structure of the program and to locate thoseparts where parallelism is involved by marking routines which are executed in parallel withthe string \k" before the name.As the callgraph can be quite big for large applications, cagey allows one to display eachroutine in two modes: show or hide children.
If a routine has children but is in hide childrenmode, a \..." is displayed behind the name of the function. Clicking on a function togglesits mode. If a function is \expanded" the rst time, only the direct children are shown.To invoke the global feature select-function, the user simply clicks on a function name.8Within cagey, this results in highlighting all appearances of the currently selected functionin the callgraph by showing them in red (e.g., DistBlkMatrix::setplusvalue in Figure 3).4.3 ClassyClassy (CLASS hierarchY browser) is a class hierarchy browser for programs written inC++ and languages based on C++ like pC++.
Classes which have no base class (called level0 classes) are shown in a column on the left side of the display window (see Figure 3).Subclasses derived from level 0 classes are shown in the next column to the right and so on.As in cagey, classy lets the user choose the level of detail in the class hierarchy displayby allowing him to fold or expand subtrees in the graph. If a class has subclasses butwas folded into one node, the name of the class is shown within a double line border. Inaddition to showing the class relationships, classy allows quick access to key properties ofa class.
Collections are marked with a \k" before the name. By selecting a class with theright mouse button, the member table window is displayed, showing a detailed list of all itsmembers (as it is for the collection DistBlkMatrix in Figure 3), which includesthe eld name,whether this eld is a public, private, protected, or method of element class memberwhether this eld is a variable, function, operator, constructor, or destructorwhether the eld was declared inline and/or virtualAlso, if fancy is running, the source code of the class denition is shown in its viewerwindow, by using the global feature select-class. Also, clicking on a function memberin the member table selects it.