C H A P T E R  1

Sun Studio 11 New Features and Enhancements

The Suntrademark Studio 11 release includes updates to the following compilers, libraries, and tools:

In most sections, there is a table that lists the new features of that component. The table has two columns, where the left-hand column provides a short description of the feature, and the right-hand column has a longer description.



Note - To find the Sun Studio 11 documentation described in this chapter, see the documentation index installed with the product software at /opt/SUNWspro/docs/index.html on Solaris platforms and at /opt/sun/sunstudio11/docs/index.html on Linux platforms. If your software is not installed in the /opt directory, contact your system administrator for the equivalent path on your system or network.




Common C, C++, and Fortran Features

The following new features are available through the C, C++ or Fortran compilers. See the following new-feature lists for information on new features that are specific to each language.

For more information about the these new features, see the user's guide or man page for each language.


TABLE 1-1 C Compiler New Features

Feature

Description

New -xarch Flags For x86 Development

The -xarch option now supports the following new flags for development on the x86 platform:

  • amd64a
  • pentium_proa
  • ssea
  • sse2a.

Support For x86 -xpagesize Options

The -xpagesize, -xpagesize_heap, -xpagesize_stack options are now enabled for x86 platforms as well as SPARC platforms.

Support for x86 Memory Models

The new -xmodel option lets you specify the kernel, small, or medium memory models on the 64-bit AMD architecture.

Support For SSE/SSE2 Integral Media Intrinsics

This release supports intrinsic functions for SSE2 128-bit XMM register integral media-instructions. Include the sunmedia_intrin.h header file in the source code and specify the -xbuiltin option to take advantage of these functions. Furthermore, these intrinsic functions require SSE2 support so specify options such as -xarch=sse2, -xarch=amd64, or -xtarget=opteron.

New -xvector Flags for x86 SSE2 Platforms

The -xvector option enables automatic generation of calls to the vector library functions and/or the generation of the SIMD (Single Instruction Multiple Data) instructions.

Binary Optimizer for SPARC Platforms

A new -xbinopt option allows the compiler to prepare the binary file for further optimization by the binopt(1) binary optimizer.

New SPARC -xtarget and -xchip Values

The new -xtarget flags ultra3iplus, ultra4plus, and ultraT1 along with the new -xchip flags ultra3iplus, ultra4plus, and ultraT1 provide code generation for the UltraSPARC IIIiplus, UltraSPARC T1, and UltraSPARC IVplus processors.

Enhancements to the STACKSIZE Environment Variable

The syntax of the STACKSIZE environment variable has been enhanced to accept a units keyword for denoting the slave thread stacksize: B for Bytes, K for Kilobytes, M for Megabytes, G for Gigabytes.

For example, setenv STACKSIZE 8192 sets the slave thread stack size to 8 MB. 1235B sets the slave thread stack size for 1235 Bytes. 1235G sets it for 1235 Gigabytes. The default for an integer value without a suffix letter is still Kilobytes.

OpenMP Autoscoping

Autoscoping is now available for C and C++ programs. This feature is described in chapter 3 of the Sun Studio OpenMP API User's Guide.



C Compiler

The C compiler also offers the following new features in addition to those features listed previously under Common C, C++, and Fortran Features.


TABLE 1-2 C Compiler New Features

Feature

Description

A New Default Format For Debugger Information

The C compiler now generates debugger information in the DWARF format by default. This change should be transparent, as the dbx and Performance Analyzer software readily accept and prefer the DWARF format. You can still generate debugger information in the stabs format by specifying -xdebugformat=stabs.

Two new pragmas

  • c99

Use the c99 (implicit | no%implicit) pragma to find implicit function declarations.

  • [no_]warn_missing_parameter_info

Use the [no_]warn_missing_parameter_info pragma to find function declarations which contain no parameter-type information.



C++ Compiler

The C++ compiler also offers the following new features in addition to those features listed previously under Common C, C++, and Fortran Features.


TABLE 1-3 C++ Compiler New Features

Feature

Description

A New Format For Debugger Information

The C++ compiler can now generate debugger information in the DWARF format. The default is still the stabs format, but you can generate DWARF data by setting the new option -xdebugformat to -xdebugformat=dwarf.

Calling Dependent Static Functions From a Function Template

The C++ standard says that function calls that depend on a template parameter can refer only to visible function declarations having external linkage. Specify -features=[no%]tmplrefstatic if your application code depends on the compiler ignoring this rule and calling a dependent static function from a function template.



Fortran Compiler

There are no new features in the Fortran 95 compiler in this release beyond those listed previously under Common C, C++, and Fortran Features.


Command-line Debugger dbx


TABLE 1-4 dbx New Features

Feature

Description

Support for the AMD64 architecture on the Linux operating system

64-bit dbx now supports the AMD64 architecture. On the Linux OS, the 64-bit dbx cannot debug 32-bit programs. To debug a 32-bit program on the Linux OS, use the dbx command with the -x exec32 option to start the 32-bit dbx.

Support for the Sun Studio C compiler generating DWARF symbolic debugging information

The DWARF symbolic debugging information from the C compiler is used by default.

thr_create and thr_exit events

The thr_create event occurs when a thread, or a thread with the specified thread_id, has been created. The thr_exit event occurs when a thread has exited

step_abflow environment variable

When this environment variable is set to stop, dbx stops in longjmp(), siglongjmp(), and throw statements when single stepping.. When set to ignore, dbx does not detect abnormal control flow changes for longjmp() and siglongjmp().

Revised syntax for the intercept and unintercept commands

The syntax now includes the -set option, which clears both the intercept list and the excluded list, and sets the lists to intercept or exclude only throws of the specified types.

Support for debugging Java programs compiled with the javac compiler in Javatrademark 2 Platform, Standard Edition v 5.0 Update 3

Debugging Java programs compiled with J2SE 5.0 Update 3 is supported with the following limitations:

- Partial support for generics

- No support for autoboxing and unboxing

- No support for static import



OpenMP API


TABLE 1-5 OpenMP API New Features

Feature

Description

OpenMP 2.5

The OpenMP implementation has been upgraded to the 2.5 specifications. See the OpenMP website http://www.openmp.org/ for details.

C++ Autoscoping

Automatic scoping of variables is now enabled for C++ programs as well as C and Fortran 95. Autoscoping is described in Chapter 3 of the OpenMP User's Guide.



Interval Arithmetic

There are no new interval arithmetic features in this release.


Sun Performance Library


TABLE 1-6 Sun Performance Library New Features

Feature

Description

Sun Perflib on x86 platforms

This release of Sun Performance Library includes libraries for the Solaris OS on 64-bit x86 based systems. The 64-bit x86 version of Sun Performance Library is functionally identical to the SPARC v9 version, with the following exceptions:

  • Quad-precision routines (dqdoti, dqdota) are not available.
  • Interval BLAS routines are not available.
  • Routines with 64-bit integer parameters are not available; that is, DAXPY() is available, but DAXPY_64() is not.
  • The Portable Performance Library feature is not available on the Solaris OS on x86 based systems.

 

Many frequently-called BLAS kernels in the amd64 library have been optimized. Some internal FFT routines have also been further optimized. Similar to the SPARC v9 version, many routines are parallelized.

Sun Perflib on SPARC platforms

Improvements to BLAS and FFT for the latest UltraSPARC processors.



dmake


TABLE 1-7 dmake New Features

Feature

Description

Compatibility Mode

The -x SUN_MAKE_COMPAT_MODE command line option and SUN_MAKE_COMPAT_MODE environment variable added for compatibility with GNU make.



Performance Analysis Tools


TABLE 1-8 Performance Analysis Tools New Features

Feature

Description

Improved control over tabs displayed

 

 

The Analyzer's tab mechanism has been redesigned for greater flexibility. Only those tabs applicable to at least one loaded experiment are available, and a default set of tabs is shown, rather than all tabs, especially for large experiments. You can set default tabs in a .er.rc file, with the tabs directive. You can add or remove displayed tabs using the Tabs tab in the Set Data Presentation dialog box.

Advanced tab in Filter dialog box

The Filter dialog box now has an Advanced tab that lets you type a filter expression. You can also build an expression using the AND and OR operators, and phrases that reflect single or multiple selections from the Function tab, DataObject tab, DataLayout tab, or MemoryObject tabs.

Timeline tab now respects fltering

The Timeline Tab shows only events that pass the current filter settings.

Improved handling of descendant processes

The Analyzer and the er_print utility process an en_desc on|off directive in a .er.rc file. If the directive specifies on, all descendant experiments are read immediately; if the directive specifies off, only the founder experiment is read.

Improved behavior of New Windows in Analyzer

Additional Analyzer windows opened by clicking the New Window toolbar button or choosing File right arrow Create New Window, are now more cleanly separated from each other. They share the loaded experiments, but you can set filtering, metrics, sorting, and so forth, independently in each window.

New Memory Objects tabs and report

New tabs are available in the Analyzer to show performance data for cache-lines, pages, etc. Several new er_print commands are available for memory objects. You can create a custom memory object by clicking Add Custom Object in the Tabs tab of the Set Data Presentation dialog box.

Hardware counter profiling on Linux

Hardware counter overflow profiling is available on supported Linux systems. This support requires that you install the Perfctr patch.

Improved handling of MPI profiling

Additional variables specifying process rank for LAM and MPICH versions of MPI are recognized.

Java mode has been replaced by View mode

Java mode has been replaced by View mode. The View mode settings user, expert, and machine correspond to the Java mode settings on, expert, and off settings. View mode is applicable to programming models other than Java programs, OpenMP, in particular. The javamode command is accepted with a warning.

er_print command changes

Various commands to the er_print utility have been changed. Commands affecting data objects have been renamed, and the handling of the commands concerning metrics has been made more consistent. The new procstat command prints information concerning the processing of the data. The new filters command lets you specify a filter expression. A new expression grammar has been added for defining a filter and computing a memory object index.

Multiple selection in the Functions tab, DataObjects tab, DataLayout tab,

tabs

In the Functions tab, DataObjects tab, DataLayout tab, and MemoryObjects tabs, you can now select multiple items.

Improved filtering

In addition to selecting experiments and filtering on the samples, threads, LWPs, and CPUs for which you want to display metrics, you can now specify a filter expression that evaluates to true for any data record you want to include in the display.



Integrated Development Environment (IDE)


TABLE 1-9 IDE New Features

Feature

Description

Support for J2SE 5.0 Update 3

The IDE now runs with J2SE 5.0 Update 3



Documentation

See the Latest News page on the developer portal at http://developers.sun.com/prodtech/cc/support_index.html for information that updates the Sun Studio 11 documentation.