What's New in Sun WorkShop 6 update 1 | ![]() ![]() ![]() ![]() ![]() |
New Features in Sun WorkShop 6
This chapter describes the new features of the Sun WorkShopTM 6 compilers and tools. Tables summarize new features, and explanations of some of the new features follow the summary tables.
This chapter has the following sections:
- C Compiler
- C++ Compiler
- Fortran Compilers
- Fortran 95 Interval Arithmetic
- dbx
- Sun WorkShop 6
- Sun WorkShop TeamWare 6
- Sun WorkShop Visual 6
- Sun Performance Library
- Sampling Analyzer
- Installation
- Documentation in HTML
Key Features
The following key features are the highlights of this release:
- Additional ANSI/ISO C++ compliance
- Fortran 95 compiler with OpenMP parallelization directives
- Support for the UltraSPARCTM III instruction set architecture
- Easier-to-use programming environment
- New Performance Analysis tool
- Fortran 95 interval arithmetic
- Installation improvements
- Manuals, man pages, readmes, and online help in HTML
C Compiler
TABLE 2-1 lists the new features available with the release of the Sun WorkShop 6 C compiler. These features enhance the capabilities of the C compiler and
lint
source-code checker.
C++ Compiler
TABLE 2-2 lists the new features available with the release of the Sun WorkShop 6 C++ compiler. Some of these features are described more completely in the sections following the table.
TABLE 2-2 C++ Compiler New Features Partial Specialization A template can be partially specialized, meaning that only some of the template parameters are specified or that one or more parameters are limited to certain categories of type. Explicit Function Template Argument If a template argument cannot be deduced from the function arguments, you can specify it explicitly using the syntax f
<template args>(
function args)
.Non-Type Function Template Parameters This release supports non-type function template parameters, such as: template<int I>
void foo(
int a[I]
)
{ ... } template<int I>
void foo(
mytype<I>
m )
{ ... }
Member Templates In standard mode, classes and class templates can have templates as members. Definitions-Separate Template Organization Restriction Removed The compiler no longer has a restriction against "definitions-separate template organization" for -instances
!= extern
(that is,-instances=explicit
,-instances=global
, -instances=semiexplicit,
or-instances=static
). Regardless of the-instances
setting, by default the compiler now includes separate source files in the search for definitions.Prefetch Instructions You can use -xprefetch
in conjunction with the header file<sun_prefetch.h>
to specify prefetch instructions on those architectures that support prefetch, such as the UltraSPARC II instruction set architecture (-xarch=v8plus
,v8plusa
,v8plusb
,v9
,v9a
, orv9b
).Extern Inline Functions This version of the compiler allows extern inline functions. If there is any local static data in an inline function, only one copy of the static data is used in all compilation units. However, the addresses of inline functions taken in different translation units will not compare as equal. Ordering of Static Variable Destruction The standard has defined the order of destruction of objects with static storage duration more fully; static objects must be destroyed in the reverse order of their construction. Previous language definitions left some aspects unspecified. Sub-Aggregate Initialization When using brace-initialization of class objects (for types where brace-initialization is allowed), the C++ standard permits a member which is itself an aggregate class to be initialized by a value of its own type. Using Your Own C++ Standard Library By specifying the -library=no%Cstd
option, you can use your own version of the C++ standard library, instead of the version supplied with the compiler.Cache Versioning The C++ compiler has the ability to detect cache version differences and issue the appropriate error message. Restrictions on Bitfield Size Removed The restriction on the size of a bitfield to 32 or less is removed. Bitfields can be any size. Warnings About Conversions Between Pointer-To-Function and void*
Previously, the compiler issued warnings about conversions between pointer-to-function and void*
. The compiler only issues these warnings when you use the+w2
option.New and Changed Options The following list shows the new and changed options. New Options: -xcrossfile
.
-Bsymbolic
-features=[no%]strictdestrorder
-template=extdefChanged Options: -fast
,
-library=[no%]Cstd+p
,
-ptr-xprefetch
For more information, see the entry for each option in the C++ User's Guide. To access this guide in HTML, point your browser tofile:/opt/SUNWspro/docs/index.html
.
Partial Specialization
A template can be fully specialized, meaning that an implementation is defined for specific template arguments. See the following code example.
template<class T, class U> class A { ... }; //primary templatetemplate<> class A<int, double> { ... }; //specializationA template can also be partially specialized, meaning that only some of the template parameters are specified, or that one or more parameters are limited to certain categories of type. The resulting partial specialization is itself still a template. The following examples use the previous primary template.
- Special template definition for cases when the first template parameter is type
int
. See the following code example.
template<classU> class A<int> { ... };- Special template definition for cases when the first template parameter is any pointer type. See the following code example.
template<class T, class U> class A<T*> { ... };- Special template definition for cases when the first template parameter is pointer-to-pointer of any type, and the second template parameter is type
char
. See the following code example.
template<class T> class A<T**, char> { ... };Explicit Function Template Argument
If a template argument cannot be determined from the function arguments, you can now explicitly specify the template argument using the syntax
f<
template args>(
function args)
. See the following code example.
template<class Mytype> Mytype* construct(float, float);...int* x = construct<int>(a, b);
Non-Type Function Template Parameters
This release supports non-type function template parameters, as illustrated in the following code example.
template<int I> void foo( int a[I] ) { ... }template<int I> void foo( mytype<I> m ) { ... }This release does not allow expressions involving non-type template parameters in the function parameter list, as illustrated in the following code example.
// these are not supportedtemplate<int I> void foo( mytype<2*I> ) { ... }template<int I, int J> void foo( int a[I+J] ) { ... }Member Templates
In standard mode, classes and class templates can have templates as members, as illustrated in the following code example.
template <class T1>class OuterClass {public:// class member templatetemplate <class T2>class MemberClass{T2 MCmember;T1 OCmember;};template<class T3> operator T3() { ... }...};
Note Member templates are not supported in compatibility mode (-compat[=4]
).
Definitions-Separate Template Organization Restriction Removed
The compiler no longer has a restriction against "definitions-separate template organization" for
-instances
!= extern
(that is,-instances=explicit
,-instances=global
,-instances=semiexplicit
or-instances=static)
. Regardless of the-instances
setting, the compiler will now, by default, include separate source files in the search for definitions.To turn this restriction back on, use the
-template=no%extdef
option. Note, however, that when the-template=no%extdef
option is specified, the compiler does not search for separate source files even with-instances=extern
.Ordering of Static Variable Destruction
The standard has defined the order of destruction of objects with static storage duration more fully; static objects must be destroyed in the reverse order of their construction. Previous language definitions left some aspects unspecified.
This stricter ordering is implemented for standard mode only. In compatibility mode (
-compat[=4]
), the order of destruction is implemented as before.If your program depends on a particular order of destruction and worked with an older compiler, the order required by the standard might break the program in standard mode. The
-features=no%strictdestrorder
command option disables the strict ordering of destruction.Sub-Aggregate Initialization
When using brace-initialization of class objects (for types where brace-initialization is allowed), the C++ standard permits a member that is itself an aggregate class to be initialized by a value of its own type. See the following code example.
Using Your Own C++ Standard Library
If you want to use your own version of the C++ standard library instead of the version supplied with the compiler, you can do so by specifying the
-library=no%Cstd
option. This option prevents finding any of the following headers:
<algorithm>
<bitset>
<complex>
<deque>
<fstream>
<functional>
<iomanip>
<ios>
<iosfwd>
<iostream>
<istream>
<iterator>
<limits>
<list>
<locale>
<map>
<memory>
<numeric>
<ostream>
<queue>
<set>
<sstream>
<stack>
<stdexcept>
<streambuf>
<string>
<strstream>
<utility>
<valarray>
<vector>
When
-library=no%Cstd
is specified, thelibCstd
library, which implements those headers, is not automatically linked with your program. To use any of the features declared in the above headers, you must use the-I
option to point to the directory where the replacement headers are located, and you must link your program with a library or set of object files containing the implementation of the replacement headers.You cannot reliably replace only a portion of the headers listed above, nor can you reliably link
libCstd
with all or part of another library implementation. For example, you cannot replace only the string classes and uselibCstd
for everything else. Either use the library supplied with the compiler, or replace all of the functionality listed above.The remaining headers (
<exception>
,<new>
,<typeinfo>
, and all the headers inherited from C) are integral to the compiler itself or to Solaris, and are not affected by the-library=no%Cstd
option. Linking of the librarylibCrun
also is not affected by the-library=no%Cstd
option.There is no mechanism to replace any of the functionality of
libCrun
. If you replace the standard library, the code must be compiled with the versions of<exception>
,<new>
, and<typeinfo>
supplied with the compiler. In standard mode (the default mode) C++ programs must be linked withlibCrun
.
Note This option is available to "use at your own risk." Using your own version of the C++ standard library might not produce optimal results.
Cache Versioning
The C++ compiler now has the ability to detect cache version differences and issue the appropriate error message. The compiler marks each template cache directory with a version string that uniquely identifies the template cache version. Subsequent releases of the compiler will also use cache version strings, although these versions may be different from the current version.
This compiler and future compilers will detect the version strings from within the cache directories and issue an error as appropriate. For example, a future compiler that uses a different template cache version string and processes a cache directory produced by this release of the compiler might issue the following error.
SunWS_cache: Error: Database version mismatch
/SunWS_cache/CC_version
Similarly, this release of the compiler issues an error if it encounters a cache directory produced by a future compiler.
The template cache directories produced by the Sun WorkShop C++ compiler 5.0 compiler are not versioned. However, the Sun WorkShop 6 C++ compiler processes these cache directories without an error or a warning. These cache directories are converted to the cache directory format used by the Sun WorkShop 6 C++ compiler.
A template cache directory produced by the Sun WorkShop 6 C++ compiler or later releases cannot be used by the Sun WorkShop C++ compiler 5.0. The Sun WorkShop C++ compiler 5.0 is not capable of recognizing format differences and it will issue an assertion.
Fortran Compilers
Sun WorkShop 6 includes the Sun WorkShopTM Compilers Fortran 77 and Sun WorkShopTM Compilers Fortran 95.
The Fortran compilers in this Sun WorkShop 6 release support only versions 2.6, 7, and 8 of the Solaris SPARCTM Platform Edition Operating Environment. For the Solaris Intel IA-32 platform, Sun has discontinued development of Fortran compilers and the Sun Performance Library. Sun does not offer ForteTM for High Performance Computing or the ForteTM Fortran Desktop Edition (formerly known as Sun Performance WorkShop Fortran) for the Solaris Intel IA-32 platform in this release. You can contact The Portland Group (
http://www.pgroup.com
) for information about their line of software development tools for the Solaris IA-32 platform.Fortran 77 Compiler
TABLE 2-3 lists the new features available with the release of the Sun WorkShop 6 Fortran 77 compiler. Some of these features are described more completely in "New Fortran Compiler Features" on page 52.
TABLE 2-3 Fortran 77 Compiler New Features Effect of FORM="BINARY" on I/O Operations Specifying this new option in an OPEN(...)
statement causes the file to be treated as a sequential binary (unformatted) file with no record marks. This enables data to be written and read as a continuous stream of bytes, and provides compatibility with other vendor systems. It is implemented in both the Fortran 95 and Fortran 77 compilers.Debugging Optimized Code The restrictions on compiling with -g
have been relaxed so that it is now possible to compile at-O4
and-O5
or any of the parallelization flags (-parallel
,-explicitpar
,-autopar
) with debugging (-g
).New Command-Line Flags The following new command-line flags appear in this release of f77
(see thef77
(1) man page):-aligncommon
Aligns common block elements to specified byte boundaries -r8const
Promotes single-precision data constants to REAL*8
-xmemalign
Specifies general alignment of data elements Expanded Command-Line Flags The following f77
command-line flags have been expanded (see thef77
(1) man page):-fast
Sets -O5,
-fsimple=2,
-xvector=yes,
-pad=common
-xprefetch
Enables explicit pragma prefetch directives to force generation of prefetch instructions on UltraSPARC platforms -xtypemap
Includes an expanded set of possible data type specifications Cray-Style Directives AUTOSCOPE
qualifier added to Cray-style parallelization directives.Licensing The parallelization features of the Fortran 77 compiler require a Sun WorkShop HPC license. Hyper-Linked Compiler Diagnostics f77
error messages in the Sun WorkShop Building window now have hyperlinks to help pages that explain the messages.
Fortran 95 Compiler
TABLE 2-4 lists the new features available with the release of the Sun WorkShop 6 Fortran 95 compiler. Some of these features are described more completely in "New Fortran Compiler Features" on page 52.
TABLE 2-4 Fortran 95 Compiler New Features Compliance The Fortran 95 compiler is fully compliant with the Fortran 95 standard. New Command The Fortran 95 compiler is invoked by both the f90
andf95
command. Thef95
command is new.f90
is equivalent tof95
.File Extensions The compiler will accept free-format source files with .f95
and.F95
extensions as well as.f90
and.F90.
Effect of FORM="BINARY" on I/O Operations Specifying this new option in an OPEN(...)
statement causes the file to be treated as a sequential binary (unformatted) file with no record marks. The enables data to be written and read as a continuous stream of bytes, and provides compatibility with other vendor systems. It is implemented in both the Fortran 95 and Fortran 77 compilers. See the FORTRAN 77 Language Reference.Debugging Optimized Code The restrictions on compiling with -g
have been relaxed so that it is now possible to compile at-O4
and-O5
or any of the parallelization flags (-parallel
,-explicitpar
,-autopar
) with debugging (-g
).f77
FlagsMost of the f77
compiler flags are now implemented inf95
. See thef95
(1) man page for details. These include:-erroff
Turns off selected error messages -errtags
Displays error messages with tags -ext_names
Creates external names with or without underscores -fpp
Specifies source code preprocessor -loopinfo
Shows which loops are parallelized -sbfast
Produces browser table information -silent Suppresses compiler messages -U Allows lowercase and uppercase -u Implies IMPLICIT
NONE
-xcrossfile Enables optimization across files -xF Allows function-level reordering for Analyzer -xinline Compiles functions inline -xtypemap
Specified default data sizes New Flags The following new flags are implemented in f95
:-aligncommon
Aligns common block elements to specified byte boundaries -mp=openmp
Accepts OpenMP directives -r8const
Promotes single-precision constants to REAL*8
-xia
Enables processing of INTERVAL
data types (recommended)-xinterval
Enables processing of INTERVAL
data types-xmemalign
Specifies general alignment of data elements -xrecursive
Allows recursive calls without RECURSIVE
attributeExpanded Flags The following f95
command-line flags have been expanded (see thef95
(1) man page):-fast
-xprefetch
-xtypemap
Sets -O5
-fsimple=2
-xvector=yes
-pad=common
Enables explicit pragma prefetch directives to force generation of prefetch instructions on UltraSPARC platforms Includes an expanded set of possible data type specificationsOpenMP This release of Fortran 95 implements the OpenMP interface for explicit parallelization, including a set of source code directives, runtime library routines, and environment variables. See the Fortran User's Guide. Cray-Style Directives AUTOSCOPE
qualifier added to Cray-style parallelization directives.Interval Arithmetic Extensions This release of Fortran 95 implements extensions to support intrinsic INTERVAL
data types.Licensing The parallelization features of the Fortran 95 compiler require a Sun WorkShop HPC license. Hyper-Linked Compiler Diagnostics Sun WorkShop Building window now interprets f95
error messages as live links into the online help.
New Fortran Compiler Features
The following sections describe some of the new Fortran compiler features in greater detail.
Effect of
FORM="BINARY"
on I/O Operations
WRITE
statement--Data is written to the file in binary, with as many bytes transferred as there is specified in the output list.READ
statement--Data is read into the variables on the input list, with as many bytes transferred as demanded by the list. Because there are no record marks on the file, there will be no "end-of-record" error detection. The only error detected is end-of-file, or abnormal system errors.INQUIRE
statement--INQUIRE
on a file opened withFORM="BINARY"
returns the following information:
FORM="BINARY"
ACCESS="SEQUENTIAL"
SEQUENTIAL="YES"
DIRECT="NO"
FORMATTED="NO"
UNFORMATTED="YES"
RECL= and NEXTREC= are undefined.BACKSPACE
statement--Not allowed; returns an error.ENDFILE
statement--Truncates file at current position, as usual.REWIND
statement--Repositions file to beginning of data, as usual.OpenMP
(Fortran 95 only) This release of Fortran 95 implements the OpenMP interface for explicit parallelization, including a set of source code directives, runtime library routines, and environment variables. Preliminary documentation is available in the OpenMP README. The OpenMP specifications can be viewed at
http://www.openmp.org/
.A summary of all directives accepted by the Fortran compilers, including OpenMP, can be found in Appendix E of the Fortran User's Guide. See also the Fortran Programming Guide for additional information on the parallelization features of the Fortran compilers.
Note The parallelization features of the Fortran compilers require a Sun WorkShop HPC license.
Interval Arithmetic Extensions
(Fortran 95 only) This release of Fortran 95 includes interval arithmetic extensions. See "Fortran 95 Interval Arithmetic" on page 53.
Hyper-Linked Compiler Diagnostics
When you use Sun WorkShop to build and compile applications,
f77
andf95
diagnostic messages in the Building window now have hyperlinks to help pages. Clicking on the error message launches a help browser with additional information about the specific error diagnostic.Fortran 95 Interval Arithmetic
Support for intrinsic
INTERVAL
data types is a new feature in the Sun WorkShop 6 Fortran 95 compiler.Two new compiler flags,
-xia
and-xinterval
, tell the compiler to recognize interval-specific languages extensions and generate the code to implement interval instructions.What Is Interval Arithmetic?
Interval arithmetic is used to evaluate arithmetic expressions over sets of numbers contained in intervals. An interval is the set of all real numbers between and including the interval's lower and upper bound. Any interval arithmetic result is a new interval that is guaranteed to contain the set of all possible resulting values.
With Sun WorkShop 6 Fortran 95, it is a simple matter to write interval programs to compute rigorous bounds on the value of arithmetic expressions:
- Declare variables to be type
INTERVAL
.- Write normal Fortran code using the intrinsic
INTERVAL
functions and operators, relational operators, and format edit descriptors.- Compile the code using the -
xia
command-line option.To achieve the best results, use existing interval algorithms that compute narrow width interval results. Devising algorithms to compute narrow interval results is the topic of interval analysis.
Why Is Interval Arithmetic Important?
Interval arithmetic is important for the following reasons:
- Interval arithmetic can be used to perform machine computations with guaranteed bounds on errors from all sources, including input data errors, machine rounding, and their interactions.
- Interval algorithms can be developed that solve nonlinear problems, such as the solution to nonlinear systems of equations and nonlinear programming.
As intervals become more widely used, libraries of interval solvers will be used routinely to compute sharp interval solutions to linear and nonlinear problems, while taking into account all sources of error. With these libraries, scientists, engineers, and developers of commercial applications will be able to write programs to solve problems that are currently out of reach.
Where Can I Get More Information?
See the Interval Arithmetic Programming Reference or the list of online resources in the Interval Arithmetic readme.
dbx
TABLE 2-5 lists the new features available with the release of Sun WorkShop 6
dbx
.
Sun WorkShop 6
TABLE 2-6 lists the new features available with the release of Sun WorkShop 6. Some of the features are described in greater detail in the sections following the table.
Text Editing
The following two sections describe the new Sun WorkShop 6 text editing features.
Balloon Expression Evaluator
The balloon expression evaluator instantly shows you the current value of the expression at which your cursor is pointing in your text editor. You can also see the type of expression and dereference the pointer through the balloon expression evaluator feature. For more information, see Using the Balloon Expression Evaluator in the Text Editing section of the online help.
NEdit and Vim Text Editors
Text editors are the center of the Sun WorkShop integrated development tool set that includes building, debugging, and browsing. The Sun WorkShop programming environment makes it possible to evaluate expressions, set breakpoints, and step through functions from your text editor.
NEdit, a plain-text editor with a graphical user interface for X/Motif systems, and Vim, an improved version of the vi standard text editor on UNIX systems, are new integrated text editors in this release. The following is a list of integrated text editors provided with Sun WorkShop 6:
- NEdit (version 5.1)
- XEmacs (version 20.4 or compatible versions)
- GNU Emacs (version 19.28 or compatible versions)
- Vi
- Vim (version 5.3 with graphical user interface option)
For more information about each editor's options, see:
- The online documentation available from the Help menu in the editor's menu bar
- Text Editor Options Dialog Box in the Text Editing section of the online help
Debugging a Program
The following sections describe new program debugging features.
Button Editor
The Button Editor now allows you to customize the toolbars in your editor window and the Debugging window, in addition to adding, removing, and editing buttons in the Custom Button window.
For more information, see Toolbar Options.
Debugging Window
The following sections describe changes made in the Debugging window.
Session Status and Context Information
By default, the State, Stopped In, Evaluation Context, and Number of Sessions information no longer appears below the toolbar. If you want to display this information, you can select Show 3 Line Context/Status Area at Top of Display on the Window Layout tab in the Debugging Options dialog box. For more information, see Displaying Session Status and Context Information in the Using the Debugging Window section of the Sun WorkShop online help.
Data History Pane
The Data History pane has been replaced with tabs for Data History and Program I/O, and an optional Data Display tab:
- The Data History tab displays the Data History pane. For more information, see Data History Tab in the Using the Debugging WIndow section of the Sun WorkShop online help.
- The Program I/O tab displays program input and output within the Debugging window rather than in a separate Program Input/Output window. (For more information, see Program I/O Tab in the Using the Debugging Window section of the Sun WorkShop online help.) This is now the default behavior, but you can use the Program output section of the Debugging Output tab of the Debugging Options dialog box to choose where you want to direct program input and output. For more information, see Redirecting a Program's Input/Output in the Using the Debugging Window section of the Sun WorkShop online help.
- The Data Display tab is included (instead of a separate Data Display window) if you select Tab in Debug Window in the Data Display Window Shown As section on the Data Display Window tab in the Debugging Options dialog box. For more information, see Data Display Tab and Choosing How to Show the Data Display in the Using the Debugging Window section of the Sun WorkShop online help.
Sessions and Threads Panes
The radio buttons for switching the Sessions and Threads panes have been replaced by tabs for Sessions, Threads, and Breakpoints:
- The Sessions tab displays the Sessions pane. When you press the right mouse button over this tab, a popup menu is displayed. For more information, see Sessions Tab in the Using the Debugging Window section of the Sun WorkShop online help.
- The Threads tab displays the Threads pane. For more information, see Threads Tab in the Using the Debugging Window section of the Sun WorkShop online help.
- The Breakpoints tab displays a scrolling list of breakpoints and tracepoints assigned in your program. When you press the right mouse button over this tab, a popup menu is displayed that lets you enable, disable, delete and show source instantly for each breakpoint. The popup menu includes an Add item that displays the separate Breakpoints window in which you add, enable, disable, change, and delete breakpoints. For more information, see Breakpoints Tab in the Using the Debugging Window section of the Sun WorkShop online help.
Debugging Options Dialog Box
The Debugging Options dialog box contains the following new features.
Category Tabs
The Category list box in the Debugging Options dialog box has been replaced with tabs at the right side of the window for switching among the categories of options.
New Program Output Option
You now direct program input or output to the Program I/O tab in the Debugging window. As before, you can also direct it to a separate Program I/O window, to the
dbx
Commands window, or to a custompty
. For more information, see Redirecting a Program's Input/Output in the Using the Debugging Window section of the Sun WorkShop online help.New Call Stack Option
During debugging, if your program was not compiled with
-g
, execution might stop in a function in the program that is not debuggable source code. You can now choose to have the call stack pop to the first debuggable source code in this case. For more information, see Going Up the Stack When Execution Stops in the Using the Debugging Window section of the Sun WorkShop online help.New Stepping Option
By default, the step granularity for debugging is set to Statement, so that if more than one statement is included in a source code line, it requires the same number of commands to step through that line. You can now choose to set the step granularity to Line, so that a single next command steps through a line regardless of the number of statements it includes. For more information, see Setting Step Granularity in the Using the Debugging Window section of the Sun WorkShop online help.
New Window Layout Option
By default, the State, Stopped In, Evaluation Context, and number of sessions information is no longer displayed below the toolbar. If you want to display this information, you can select Show 3 Line Context/Status Area at Top of Display on the Window Layout tab in the Debugging Options dialog box. For more information, see Displaying Session Status and Context Information in the Using the Debugging Window section of the Sun WorkShop online help.
New Window Behavior Option
By default, the debugger warns you if the
main
()
module of your program is not compiled with debugging information. You can choose to not have this warning displayed. For more information, see Being Warned If Your main () Module is Not Compiled With Debugging Information in the Using the Debugging Window section of the Sun WorkShop online help.New Data Display Option
You can choose to have the Data Display window shown as a tab in the Debugging window or as a separate window. For more information, see Choosing How to Show the Data Display in the Using the Debugging Window section of the Sun WorkShop online help.
New Debugging Performance Option
You can delay the loading of modules compiled with
-xs
until the debugging information for these modules is needed, rather than having the modules loaded during the startup of the debugging session. This may shorten the debugging startup time when modules have been compiled with-xs
. By default, this debugging option is set to on. For more information, see Delaying Loading of Modules Compiled with -xs in the Using the Debugging Window section of the Sun WorkShop online help.New Forks and Threads Option
If you want to debug processes with a large number (up to 300) of LWPs (lightweight processes), you can now set debugging to be conservative in its resource usage. When doing so, debugging performance might be slowed. For more information, see Debugging a Large Number of LWPs in the Using the Debugging Window section of the Sun WorkShop online help.
New Advanced Options
By default, the debugger checks that
dbx
has exclusive control of the program being debugged. It preventsdbx
from attaching to the process if another tool is already attached to the process. You can now turn off this behavior. For more information, see Checking that dbx has Exclusive Control of the Program in the Using the Debugging Window section of the Sun WorkShop online help.By default, the debugger disallows the exclusion of certain shared libraries that are critical to
dbx
functionality. You can now choose to allow these libraries to be excluded, in which case you can debug core files only. For more information, see Requiring Inclusion of Critical dbx Libraries in the Using the Debugging Window section of the Sun WorkShop online help.Working With Projects
This release of Sun WorkShop uses projects to track the files, programs, and targets associated with your development projects and to build your programs without your needing to write a makefile. A project is a list that includes the files and the compiler, debugger, and build-related options used to build an executable, a static library or archive, a shared library, a Fortran application, a complex application, or a user makefile application.
In previous versions of Sun WorkShop, a workset was used instead of a project. Projects still have some workset features (there continue to be menu picklists that make it easy to access directories and files associated with a project), but a project includes more information about your program, such as which source files you want to build and how you want them built. If you have Sun WorkShop worksets, you can automatically convert your worksets to Sun WorkShop 6 projects when you load them. For more information, see Converting a Workset to a Project in the Working With Projects section of the online help.
When you start Sun WorkShop, the Welcome to Sun WorkShop dialog box opens and gives you immediate access to Sun WorkShop projects and the project wizard. Sun WorkShop also has project functions available from the Project Menu in the WorkShop Main Window to help you complete the following tasks:
- Create a new project or build a simple program using the project wizard and your own makefile or a makefile that Sun WorkShop creates for you (see Creating a New Project in the Working With Projects section of the online help)
- Change existing project settings, including how you want your project compiled and whether you want source browsing information generated (see Editing a Project and Edit Current Project Window in the Working With Projects section of the online help)
You can also choose to use the Sun WorkShop 6 programming environment without loading a project. Picklists keep track of the files, programs, directories, and targets associated with your development projects (see WorkShop Targets in the Building Programs section of the online help for more information). You can access each file, build the target, and debug the executable from the menus in the WorkShop Main Window. Build target information cannot be edited because it is not persistent; rather, it changes as you access, add, and remove build targets.
Sun WorkShop TeamWare 6
TABLE 2-7 lists the new features available with the release of Sun WorkShopTM TeamWare 6. Some of the features are described in greater detail in the sections following the table.
TABLE 2-7 Sun WorkShop TeamWare 6 New Features Autofreezepointing Autofreezepointing creates a freezepoint file for you before or after specific transactions. You can select the time that you want freezepoint files created: before or after bringovers, putbacks, undo actions, or resolve actions. Versioning customized menu The customized menu feature adds a new menu in the Versioning window titled "Customized," which provides access to your own commands. For information about creating a customized menu, see Creating a Customized Menu in the Managing Files section of the online help. Delta comments This new option adds delta comments to transaction output and email notification, including delta number, owner, and comments. In Configuring, choose Workspace Bringover Create/Bringover Update/Putback and check the Delta Comments box, or use the
-d
option with the bringover or putback command.Merging diff navigator The diff navigator appears between two unmerged files. You can click on the slide boxes on either side of the diff navigator to scroll through either file, or click on the arrows on the top or bottom to move the same distance in both files. Configuring Menu Reorganization Sun Workshop 6 TeamWare has implemented changes to the Configuring user interface. Putback Validation When you turn on putback validation, only putbacks are allowed to the workspace. You can control which users can perform a putback and require that they have a specific password. SCCS Admin Flags Allows you to set SCCS admin flags for a file. Workspace integrity check New option to workspace
command:check [ -W ] [ - s ] wsname ...
checks files, access modes, parent-child relationships, and condition of the history file. The command exits with the following values: 0 = workspace is okay or 1 = error.Workspace History Viewer Sun WorkShop TeamWare now includes an easy way to view the information in the workspace history file. Workspace labels With this feature, you can give a workspace a descriptive name that is more meaningful to your team. Choose Workspace Properties and select the Description tab.
New man page description
(4)
Configuring Menu Reorganization
Sun Workshop TeamWare 6 includes the following changes to the menus.
Putback Validation
When you turn on putback validation, only putbacks are allowed to the workspace. The user is prompted for a password (Integration Request Identifier) before performing a putback. This feature only records the Integration Request Identifier, it does not check it. To check the Integration Request Identifier, you must write your own validation program. For more information, see Protecting Workspaces With Putback Validation in the Managing Workspaces section of the online help.
SCCS Admin Flags
You can set SCCS admin flags for a file by using Versioning, choose File
File Info. For example, if you want Versioning to prompt for MRs (modification request strings) during putbacks, put the name of a validation program in the Validation Program box.
Workspace History Viewer
Sun WorkShop TeamWare now includes an easy way to view the information in the workspace history file (choose Workspace
View History). In the Workspace History Viewer, you can view the transaction history of a workspace, transaction details, comments, and the command log. You can sort and filter the entries and search the comments and command log.
Sun WorkShop Visual 6
TABLE 2-9 lists the new features available with the release of Sun WorkShop Visual 6. Some of the features are described in greater detail in the sections following the table.
TABLE 2-9 Sun WorkShop Visual 6 New Features Swing Support Sun WorkShop 6 Visual now has the ability to generate Java Swing code in addition to Java 1.0 and 1.1 code. As well as generating appropriate Swing components for the Motif widgets, Visual has increased the range of supported mappable resources: It is now possible to generate appropriate Swing code for toggles that contain images, shell icons, shell resize and delete response, the contents of lists, and rowcolumn entry alignment, among other extensions. Enhanced Windows Support Sun WorkShop Visual has added support for mapping X events to Windows MFC. Integration With Sun WorkShop Projects Sun WorkShop Visual works with Sun WorkShop project wizards to help create projects with graphical user interfaces.
Swing Support
Sun WorkShop 6 Visual now has the ability to generate JavaTM Swing code in addition to Java 1.0 and 1.1 code. As well as generating appropriate Swing components for the Motif widgets, Sun WorkShop 6 Visual has increased the range of supported mappable resources: It is now possible to generate appropriate Swing code for toggles that contain images, shell icons, shell resize and delete response, the contents of lists, and rowcolumn entry alignment, among other extensions.
The MWT class library, which maps Motif components into Java where the standard classes lack equivalence, has been ported to Swing in order to provide a more consistent look and feel. The dependence on the MWT to provide a Motif-compatible interface has been reduced as some of the Motif components are now mapped directly into an appropriate Swing component.
The Java Layout emulation widgets have been reworked where necessary to provide a more consistent behavior with respect to Java Layout characteristics.
As part of a move towards supporting cross-platform code for third- party (non-Motif) components, Visual now has the ability to specify default base classing for any integrated component. The classing can be on a general language basis or for specific variants. For example, it is possible to specify in a general way the proposed default class for Java, as well as Java 1.0, Java 1.1, and Swing-specific classing. Proposed component MFC classing can also be specified. The mechanisms address the problem wherein each given third-party component required individual manual configuration in order to create the right kind of object in the target language. Third-party specific resources are not mapped. The mechanisms do not address the following situations:
- A given component needs to be mapped into multiple native objects
- A compound component can be mapped by consideration of the constituent built-in parts.
Enhanced Windows Support
Sun WorkShop Visual 6 has added the following support for mapping X events to Windows MFC.
Sun Performance Library
Sun Performance LibraryTM is a set of optimized, high-speed mathematical subroutines for solving linear algebra and other numerically intensive problems. Sun Performance Library is based on a collection of public domain applications available from Netlib at
http://www.netlib.org
. These routines have been enhanced and bundled as the Sun Performance Library.TABLE 2-11 lists the new features available with the Sun WorkShop 6 release of the Sun Performance Library. Some of the features are described in greater detail in the sections following the table.
Fortran 95 Language Feature Support
By including the
f95
statementUSE
SUNPERF
in your application, you can use the Sun Performance Library modules and definitions with the following features:
- Type independence. In Fortran 77 routines, you must specify the type as part of the name. In Fortran 95, a routine for a specific data type can be determined by the data type of the arguments passed to the routine.
- Compile-time checking. In Fortran 77, it is generally impossible for the compiler to know what parameters should be passed to a particular routine. In Fortran 95, the
USE
SUNPERF
statement allows the compiler to know what the number, type, size, and shape of each parameter to each Sun Performance Library routine should be. It can check your calls against the expected value and identify errors during compilation.- Optional parameters. In Fortran 77, all parameters must be specified in order for all routines. Fortran 95 allows some parameters to be optional. In Sun Performance Library, all increment parameters (
INCX
,INCY
, and so on), workspaces, leading dimensions (LDA
,LDB
, and so on), and length or size parameters are optional.For information on using these features and examples, see the Sun Performance Library User's Guide.
Changes to Sun Performance Library Licensing
Sun Performance Library is no longer licensed. However, you should continue to link using
-xlic_lib=sunperf
rather than-lsunperf
. Use-xlic_lib=sunperf
to ensure that the following occurs:
- The application is linked with the correct support libraries. In this release, Sun Performance Library is compiled with Fortran 95 instead of Fortran 77. Using
-xlic_lib
will correctly link in the Fortran 95 runtime libraries instead of the Fortran 77 runtime libraries.- The correct version of Sun Performance Library is used. There are different versions of Sun Performance Library to support programs built with and without
-subparallel
and for different values of-xarch
. Using-xlic_lib=sunperf
will cause the driver to use the version of Sun Performance Library that best matches your command line options.Sampling Analyzer
Sun WorkShop 6 Sampling Analyzer is a complete rewrite of the Analyzer that was provided with Sun WorkShop 5.0.
TABLE 2-12 lists the new features available with the release of the Sun WorkShop 6 Sampling Analyzer. Some of these features are described in greater detail in the sections following the table. See also "Additional Changes" on page 74.
TABLE 2-12 Sampling Analyzer New Features Function List as Primary Display The Function List is the primary display and is displayed by default when the Analyzer is invoked. Multiple Metrics The Function List displays multiple metrics at the same time, instead of requiring you to select one category at a time to view. The Function List can also display metrics as values or a percentage. Summary Metrics Window A new Summary Metrics window, accessed from the View menu, displays all metrics recorded for a selected function, both as values and percentages. The contents of the Summary Metrics window are independent of what appears in the function list display. Callers-Callees Window From the Function List, you can access a new Callers-Callees window that shows how metrics are attributed from the callees of a selected function and to the callers of that function. Generate Annotated Source Code You can now generate annotated source code for a selected function and display the results in an edit window. Generate Annotated Disassembly You can generate annotated disassembly for the selected function and display the results in an edit window. Filter Data by Samples, Threads, LWPs You can now use the Select Filters dialog box to filter data by samples, threads, LWPs, or any combination of these. All displays and windows are updated to show data from the selected subset only. Thread Synchronization Delay Metrics Two thread synchronization delay metrics are now available: a count of synchronization events exceeding the designated threshold, and the aggregate delay from those events. For more information about metrics, see "Metrics" on page 74. Load Multiple Experiments You can now load multiple experiments into the Analyzer at the same time. Their combined metrics appear in the Function List display.
Function List as Primary Display
The Function List is the primary display, and is displayed by default when the Analyzer is invoked.
Because the Function List can display multiple types of metrics at the same time, the Data list option menu has been redesigned to change only the display type. The Display list option menu has been removed.
You can now show metrics in the Function List as absolute values in seconds or counts, or a percentage of the total program metric, or both. By invoking a Select Metrics dialog box from the Function List display, you can do any of the following:
- Select the metrics displayed in the Function List
- Display metrics as counts, percentages, or both
- Specify which metric is used to sort the Function List
- Reorder the list
Callers-Callees Window
From the Function List, you can access a new Callers-Callees window that shows how metrics are attributed from the callees of a function and to the callers of that function. The Caller-Callees window shows the selected function in the center of the display, with callers of that function in the panel above and callees of the function in the panel below. For the selected function, the attributed metric represents usage within the function itself. For the callers above, it represents usage within the selected function and all functions it calls, as attributed up the callstack to its callers. For the callees below, it represents the proportion of the callee's metric that is attributable to calls from the selected function.
You can navigate through the program's structure in the Callers-Callees window by clicking on a function in either the caller panel or the callee panel; the display recenters on the newly selected function.
Generate Annotated Source Code
You can now generate annotated source code for a selected function and display the results in an edit window. Source code is annotated with per-line metrics, using the same set of metrics as the Function List. The source code also contains compiler parallelization commentary and Fortran 95 copyin and copyout commentary interleaved with the source. Source code display requires compiling with
-g
and will work for optimized code (-g
no longer disables optimizations and parallelization).Generate Annotated Disassembly
You can now generate annotated disassembly for a selected function and display the results in an edit window. Disassembly is annotated with per-instruction metrics, using the same set of metrics as the Function Display. Disassembly also contains compiler commentary and interleaved source code.
Metrics
The following new metrics or changes to existing metrics are provided with Sun WorkShop 6 Analyzer:
- Execution profile data is now called clock-based profiling. Execution profile data always includes called-function times.
- Histogram data is now called exclusive metrics.
- Cumulative data metrics are now called inclusive metrics.
- Clock-based profile data generates the following metrics:
- Total LWP time
- User CPU time
- System CPU time
- System wait time
- Text-page fault time
- Data-page fault time
- Wall-clock time
- Thread synchronization delay tracing, a new kind of data, is provided that generates the following metrics:
- A count of synchronization events exceeding the designated threshold
- The aggregate delay from those events.
- These metrics are not collected by default.
Additional Changes
The Sun WorkShop 6 Sampling Analyzer provides the following additional changes:
- You can no longer select a subset of samples by clicking on them in the Overview display. The Select Samples text box and arrow buttons are no longer part of the Analyzer, and selection commands no longer appear in the View menu. You must do all filter selection of samples, threads, and LWPs in the Select Filters dialog box.
- You cannot delete an experiment record from inside the Analyzer. The Experiment
Delete command has been changed to Experiment
Drop. Use this command to drop an experiment from the Analyzer. The experiment record remains on disk until you remove it with the
er_rm
command.- The format of
er_export
ASCII data has been changed. (er_export
is used only for debugging.)Installation
TABLE 2-13 lists the new installation features available with the release of Sun WorkShop 6.
Documentation in HTML
The manuals, man pages, and readme files in Sun WorkShop 6 and Sun WorkShop TeamWare 6 are available in HTML as well as in text files. The online help is now in HTML.
To view Sun WorkShop 6 documentation that is available in HTML format, you must use NetscapeTM Communicator 4.0 or a compatible Netscape version. Netscape Communicator is included in the SolarisTM 7 Operating Environment and the SolarisTM 8 Operating Environment.
If you are running the Solaris 2.6 Operating Environment and you do not have Netscape Communicator 4.0 or a compatible version, you can download Netscape Communicator 4.7 from the following Netscape Communications Corporation Web site:
http://www.netscape.com/download/index.html
Sun WorkShop online help (in HTML) requires that you have JavaScriptTM enabled, which is a setting in Netscape preferences.
To access the installed Sun WorkShop 6 documentation in HTML format, point your browser at the following file:
file:/opt/SUNWspro/docs/index.html
If your Sun WorkShop software is not installed in the
/opt
directory, contact your system administrator for the equivalent path on your system.
Sun Microsystems, Inc. Copyright information. All rights reserved. Feedback |
Library | Contents | Previous | Next | Index |