Sun Java Solaris Communities My SDN Account Join SDN
 
Downloads

Sun Studio Express 3 - December 2006 Build README

 

Contents

1. Sun Studio Express 3 - December 2006 Build
2. System and Hardware Requirements
3. Installing This Sun Studio Build
4. Update Notification
5. New and Changed Features
6. Additional Notes

1. Sun Studio Express 3 - December 2006 Build 

Welcome to the Sun Studio Express Program: your opportunity to get a window into our early development process and for shaping future decisions by giving us your feedback.

It is our top priority to hear what you have to say -- experiment with the bits, participate in forums and let us know what you think. This is just one build in a continuous program and some functionality is still missing or isn't fully implemented yet. Despite these limitations we think that what's available is interesting enough to make it worth downloading the bits. We encourage you to install and try this Sun Studio Express build:

New in this Sun Studio Express build are the Sun Studio compilers on the Linux platform. Also included is the Data Race Detection Tool that was featured in the first Sun Studio Express build.  

Manuals and man pages are on the Sun Studio 11 documentation page. Note that the man pages and other documentation in the downloaded bits have not been updated since the Sun Studio 11 release.  

You should also read the Sun Studio forums for last minute information, and post feedback. Chances are you'll find answers to your questions in one of these places. We'd also like to hear from you about what what worked and what didn't.

2. System and hardware requirements

The minimum system and hardware requirements for this Sun Studio Express build are:

Operating Systems: Solaris 9 or 10
  • Hardware:
    Mininum on SPARC: Sun Ultra 60 (450 MHz, UltraSPARC II processor)
    Mininum on x86/x64: Pentium III 500-MHz or any AMD64 Opteron or Athlon system.
  • Memory: 512 Mbytes
  • Swap: 1 Gbyte
  • Disk space: 1 Gbyte

Operating System: Linux
  • Any generic x86 system with a minimum requirement being a Pentium III 500-MHz or any AMD64 Opteron or Athlon system. Even though preferred Linux distribution is SuSE Linux Enterprise Server 9, we encourage you to try this preview release on any Linux distribution of your choice, provided it satisfies the minimum requirements of having the 2.6.X Linux kernel and 2.3.3+ glibc.

3. Installing this Sun Studio Express build

Information on downloading this Sun Studio Express release can be found on the main Sun Studio Express page.

After downloading the software from the Sun Download Center:

3.0. If you are running an unpatched SuSE Linux Enterprise Server 9, please follow the instructions on how to install the following two recommended patches:

3.1 Ensure that you have one of the required versions of the J2SE Development Kit (JDK). Sun Studio Express December 2006 build runs with the following version of the JDK:

  • JDK 5.0 Update 3
  • JDK 5.0 Update 4
  • JDK 5.0 Update 5
  • JDK 5.0 Update 6
  • JDK 5.0 Update 7
  • JDK 5.0 Update 8
  • JDK 5.0 Update 9 (recommended version)

You can download and install JDK 5.0 Update 9 from http://java.sun.com/products/archive/j2se/5.0_09/index.html.

By default, the Sun Studio Performance Analyzer looks for JDK 5.0 Update 8. If you have one of the other versions of the JDK listed above, specify the version for the Analyzer to use by doing one of the following:

  • Including the --jdkhome option when you start the Analyzer from the command line
  • Setting the JDK_HOME environment variable
  • Setting the JAVA_HOME environment variable

3.2 If you are running the Solaris 9 OS, you might need to update your OS patches in order for Sun Studio Express December 2006 build to run correctly. Here are the recommended Solaris 9 OS patches:

Patch for Solaris 9 OS on SPARC Platforms Patch for Solaris 9 OS on x86 Platforms Description
32-bit shared library patch for C++
N/A
64-bit shared library patch for C++
Linker Patch (32-bit)
N/A
Assembler Patch
OpenMP support libmtsk
Math Library libm patch
X11 Xsun
make/sccs
Kernel


3.3. Unpack the archive into the directory of your choice with the commands:

$ bzcat DOWNLOAD-DIRECTORY/StudioExpress-OS-PLATFORM-DATE.tar.bz2 | /bin/tar -xf -

WARNING: Do not install any Express builds over an installation of a production Sun Studio release or previous Express build. Typically, production installations of Sun Studio releases are to /opt/SUNWspro/ on Solaris OS, and /opt/sun on Linux.  Be sure to install Express builds in an area separate from these installations.

3.4. Now update your PATH and MANPATH shell variables to the installation and documentation directories or modify your home directory's .cshrc file (for C shell) or .profile file (for Bourne or Korn shells) to make these changes permanent.

If you use csh:

% setenv PATH installpath/bin:$PATH
% setenv MANPATH installpath/man:$MANPATH

If you use sh (or ksh):

% PATH=installpath/bin:$PATH; export PATH
% MANPATH=installpath/man:$MANPATH; export MANPATH

4. Update Notification

The Update Notification feature periodically checks www.sun.com and communicates available changes related to your Sun Studio software, including patches and major software updates.  In this Sun Studio Express build, only usage information is communicated. This information is used by Sun Microsystems to improve future Sun Studio software releases. This information is anonymous and cannot be associated to any individual or organization.

To disable Update Notification, set the SUNW_NO_UPDATE_NOTIFY environment variable to any value other than false.

5. New and Changed Features

Here is an overview of some of the new features in this Express build of Sun Studio compilers and tools. Note that most of these features may not yet be documented in the Sun Studio man pages in this build. 

New Integrated Development Environment (IDE)

The new Sun Studio IDE is based on NetBeans 5.5.1 and adds many new features. It supports C and C++ projects, and includes appropriate project templates for applications, dynamic and static libraries, and projects with existing code. The IDE includes a C and C++ class browser. The powerful language-aware built-in editor supports code completion.

For details, see the IDE README



New Features Common To The C, C++, and Fortran Compilers


   Features appearing in this Sun Studio Express build:

  • No new information

   Features introduced in previous Sun Studio Express builds:

  • The C, C++, and Fortran compilers are now available on Linux (x86 and x64).

  • Performance improvements:
    - Better MMX intrinsics
    - SSE3 instruction support for assembler and inline templates
    - Additional miscellaneous optimizations

suncc, sunCC, sunf90, sunf77, sunf95, sunc89, sunc99, sunas compiler driver nicknames

Aliases for the compiler commands have been added to aid in using the Sun compilers across Solaris and Linux using a common command name that always refers to the Sun compilers. The cc command will often be satisfied in the user PATH out of /usr/bin. /usr/bin/cc on linux is typically the gcc compiler, on Solaris it is the Sun compiler. By placing the Sun Studio bin directory on the user's PATH and using the suncc command, there is no ambiguity, the Sun compiler will always be invoked.

New compiler flags: -m32 -m64

The -m32 and -m64 flags specify the address model. This flag is neutral with respect to the ISA (-xarch).

  • -m32 specifies the ILP32 model: 32-bit int, long, and pointers
  • -m64 specifies the LP64 model: 64-bit long and pointers (32-bit int)

Interactions:

The -m32 and -m64 flags override the model aspects of the -xarch flag as follows:

Overriding a 32-bit value with -m64
Overriding a 64-bit value with -m32
32-bit
64-bit
64-bit
32-bit
generic
generic64
generic64
generic
native
native64
native64
native
v7
v9


v8a
v9


v8
v9


v8plus
v9
v9
v8plus
v8plusa
v9a
v9a
v8plusa
v8plusb
v9b
v9b
v8plusb
386
amd64


pentium_pro
amd64


sse
amd64


sse2
amd64
amd64
sse2
sse2a
amd64a
amd64a
sse2a

Warnings are issued when both -xarch and -m32/64 conflict

In the case where someone uses a 32-bit -xarch value and promotes to 64-bit using -m64 the compiler will not issue a warning. For example, -m64 -fast and -fast -m64 will not generate a warning.

In the case where someone tries to "demote" a 64-bit -xarch value using -m32 we will issue a warning that -m32 overrides the -xarch value. This situation does not arise using any macro option, it only occurs when an -xarch option has been explicitly specified.

New compiler flags (C & C++): -xMD, -xMF, -xMMD

-xMD -- Generate makefile dependencies. Same as -xM, plus runs the compilation
-xMMD -- Generate makefile dependencies excluding system headers. Same as -xM1, plus compilation
-xMF <filename> -- Specify filename for makefile dependency output

All of the -xM, -xM1, -xMD, and -xMMD options are mutually exclusive, and only one can be in effect.

If xMF is not specified, default filename derived from input file name with .d suffix should be generated when either xMD or xMMD is set. Options xM and xM1 would behave as usual when -xMF is not on.

If xMF is set, all makefile dependency output is appended to the specified file. There is no way to specify individual filenames for multiple input files with xMF on one command line.

#include_next

Both C and C++ now support the #include_next directive. The directive does not distinguish between <filename> and "filename" inclusion, nor does it check that the file you specify has the same name as the current file. It looks for the filename, starting with the directory in the search path after the one where the current file containing the #include_next directive was found.

Instrumenting for the Data Race Detection Tool

-xinstrument=datarace : instrument the program for data race detection
-xinstrument=no%datarace : Do not perform the instrumentation

When neither of the above is specified, it is the same as if -xinstrument=no%datarace is used.


C Compiler

   Features appearing in this Sun Studio Express build:

  • Attributes always_inline, noinline, pure, const, malloc and aligned are now supported by the __attributes__ clause.

   Features introduced in previous Sun Studio Express builds:

The C compiler is now available on Linux (x86 and x64).

lock_lint the static data race and deadlock detection tool for C

-Zll Create lock_lint database files (.ll)

The -Zll flag of C compiler and the lock_lint command line utility now available on x86.

lint is Linux-ready

lint2 pass now works (no longer dreaded "-lc not found" message instead of super-intelligent pass2 checks

C compiler supports attribute aligned

             int __attribute__ ((aligned (16))) i = 0;

C compiller supports attribute visibility

The visibility attribute has been mapped to the linker scoping specifiers of the Sun Studio C compiler as follows:

The symbol has global linker scoping and is the least restrictive linker scoping. All references to the symbol bind to the definition in the first dynamic module that defines the symbol. This linker scoping is the current linker scoping for extern symbols.

 int __attribute__ ((visibility ("default"))) v5 = 0;
int __global v6 = 0;
The symbol has symbolic linker scoping and is more restrictive than global linker scoping. All references to the symbol from within the dynamic module being linked bind to the symbol defined within the module. Outside of the module, the symbol appears as though it were global.
 int __attribute__ ((visibility ("protected"))) v1 = 0;
int __symbolic v2 = 0;
The symbol has hidden linker scoping. Hidden linker scoping is more restrictive than symbolic and global linker scoping. All references within a dynamic module bind to a definition within that module. The symbol will not be visible outside of the module.
 int __attribute__ ((visibility ("internal"))) v3 = 0;
int __attribute__ ((visibility ("hidden"))) v4 = 0;
int __hidden l = 0;

Value returning blocks 

 #define maxint(a,b) \
({int _a = (a), _b = (b); _a > _b ? _a : _b; })

support for typeof

 #define max(a,b) \
({ __typeof__ (a) _a = (a); \
__typeof__ (b) _b = (b); \
_a > _b ? _a : _b; })

Zero length arrays 

 struct foo {
int a;
int flexarray [0];
int b;
int c;
};

C++ Compiler


   Features appearing in this Sun Studio Express build:

  • Support for g++ extensions
    • __typeof__
    • __alignof__ now accepts expressions
    • extern template
    • long long bitfields, currently by default only on Linux

   Features appearing in previous Sun Studio Express builds:


The C++ compiler is now available on Linux (x86 and x64).

Better function inlining  

The C++ compiler will now generate some system functions inline at high optimization levels, avoiding calls into system libraries.

Support for popular Open Source libraries 

STLport available on Linux  

The STLport library that ships with Sun C++ on Solaris is now available on Linux.

Standard lifetime of temporary variables  

Beginning with Sun Studio Express 2, the compiler default is standard-conforming lifetime of temporary variables. Previously, a command-line option was required to get standard-conforming behavior.

Complex expressions in template parameters  

The compiler previously was unable to handle expressions in non-type template arguments in certain cases. For example:
template<class T, int I, int J>
T func( T (&arr)[I*J] ) { ... } // I*J is a "complex template expression"
The compiler can now handle these usages.

OpenMP debugging

Debugging of OpenMP programs is now considerably enhanced.

Better support for debugging optimized code

Although debugging of optimized code is still limited, debugging is now easier.

Dwarf by default

The C++ compiler now emits debug information in the dwarf format by default. This will make it easier for 3rd party debuggers and other tools to interoperate with Sun compilers. The dwarf format will also make it easier for Sun Studio to add new debug support for optimized code in upcoming releases.


dbx Debugger


  Features appearing in this Sun Studio Express build:

Compilers now generate DWARF by default
The Sun compilers (C/C++/Fortran 95) all generate DWARF 2 symbolic information on all platforms. The old STABS format is still available on Solaris systems if you use the compiler option -xdebugformat=stabs . STABS format is not supported on Linux systems.

The size of the executable file generated with DWARF will be larger than a comparable executable built using STABS. This is because most STABS data appear only in the *.o and *.a files, while all DWARF information always appears in the executable. The compiler option -xs copies all STABS data to the executable; it has no effect when the compiler is generating DWARF. Also, with DWARF, only the executable file is needed for debugging. Using STABS requires that the *.o and *.a files must available for debugging. Finally, the larger size of the executable has no effect on its runtime performance.

dmake - Distributed Make


dmake is integrated with the IDE in the Sun Studio Express 3 December 2006 build. By default all projects are built with dmake, which runs in parallel mode. Project properties let users specify the maximum number of build jobs. By default dmake runs 2 jobs in parallel, which means many projects will build twice as fast on multi-CPU systems.


Fortran Compiler


   Features appearing in this Sun Studio Express build:

  • No new information

   Features introduced in previous Sun Studio Express builds:


  • The Fortran compiler is now available on Linux (x86 and x64).
  • Support for interval arithmetic on Solaris Intel platform with the -xarch=sse2 -xia options.
  • CAUTION messages issued when using the same symbols that are defined in different modules.
    This enhancement provides a CAUTION level message when the same symbols defined in different modules are imported by the USE statement. This helps isolating name duplication problems in large applications using third-party modules.
  • Faster compilation time for source files with many constant values.
  • Intrinsic functions called with UNSIGNED arguments improved.
  • Improved backward compatibility with old F77 objects produced by the Sun WorkShop 6 update 2 compiler.


Sun Performance Library


   Features appearing in this Sun Studio Express build:

  • No new information

   Features introduced in previous Sun Studio Express builds:

The Sun Performance Library is stable on x64 Linux, but some problems have been reported on x86 Linux.
  • In this build, there are major improvements in the performance of the Fast Fourier Transform software for the 1- and 2-dimensional cases on x86-64 and SPARC, and in the 3-dimensional case for SPARC.
  • Improved the performance of the Transpose routines : CTRANS, DTRANS, STRANS, ZTRANS.
  • Improved the performance and scalability of the Cholesky factorization routines: CPOTRF, DPOTRF, SPOTRF, ZPOTRF.


Lock_Lint Tool

lock_lint is now available on Solaris x86/64. There is also a technical article about how to use lock_lint.


The Thread Analyzer, THA, (formerly known as the Data Race Detection Tool, DRDT)


  The Thread Analyzer is available on Linux and Solaris SPARC/x86/x64 platforms.

   »Preliminary Thread Analyzer documentation.

  New In This Express Release:
  • For each data race trace, two full thread callstacks are shown. When using the Thread Analyzer GUI, the two full callstacks are shown in the Race Detail tab when a trace is selected. When using er_print from the command line, the two full callstacks are shown when the rdetail option is specified.

Performance Analyzer

   Features appearing in this Sun Studio Express build:

  • Updated man pages:
    • analyzer.1 - analyze experiment results
    • collect.1 - collect experiment data
    • collector.1 - dbx subcommands to collect experiment data
    • er_print.1 - print a report from one or more experiments
    • tha.1 - analyze multi-threaded program experiments

   Features introduced in previous Sun Studio Express builds:

collect for Linux now supports the -x flag

The -x flag leaves the target process stopped on the exit from the exec system call, in order to allow a debugger to attach to it. The collect command will print a message with the process PID.


Experiment Format

The experiment format has been extended to accomodate data-race detection; new tools will read older experiments written with Forte Developer 7 or any subsequent release.

The experiment format may need to be changed incompatibly later in the mars development, and the tools after that change will not be able to read any early experiments.

Data Collection

The collect command is changed in this release as follows:
  • The collect command accepts a new argument, -r [on|off], which specifies collecting data-race-detection data. The data will produce a list of data-races, which may be written by the er_print races command, and which will appear in the new Races tab in the Analyzer. It will also produce a "Race Accesses" metric for functions, callers and callees, source and disassembly. See the Thread Analyzer web page for more information.

  • The collect command accepts a new argument, -t <duration>, which specifies a time range for data collection. The <duration> may be a single number, with an optional m or s suffix, giving the time in minutes or seconds (default) at which the experiment should be terminated. It may also be given as two such numbers separated by a hyphen, in which case data collection will be paused until the first time is reached, then resumed, and terminated when the second time is reached. If the second number is given as zero, data will be collected from the first time to the end of the run. Even if the experiment is terminated, the target process is allowed to run to completion.

  • New functionality:

    • Function and instruction count data can be recorded using the collect -c on option (SPARC only). Data can be obtained for the executable only, not for any shared objects it links with, and requires that the executable be compiled with the -xbinopt=prepare flag.

    • The collect command accepts a new argument, -P <pid>, which specifies attaching to the process with the given PID, and collecting data from it. The other options to collect are translated into a script for dbx, which is then invoked to collect the data. Only clock- and HWC-profile data may be collected; tracing data is not supported.

    • Data may be selectively collected on descendant processes, by using a new argument to the -F flag, =<regex>. If either the process lineage, or the base name of the executable (a.out) matches the expression, data will be collected; otherwise it will not.

    • The clock profiling argument, -p <interval> may be prepended with a + sign. When specified, it will record additional data corresponding to dataspace profiling. It will generate data if the instruction immediately preceeding the interrupt PC is a memory operation, and the data will be translated into a metric, "Max. Mem. Stall Time". The data may be very misleading, since a high-metric may not mean a high actual memory stall time.

Analyzer and er_print

The analyzer(1) command is changed in this release as follows:

  • The en_desc command in a .er.rc file has been extended to accept an argument in the form =<regex>. Any descendant process whose lineage or target name matches the regular expression will be automatically loaded; any descendant whose lineage and target name does not match will not be automatically loaded.

  • A new Races tab is available to show detected data-races. Selecting one of the Races will fill in a Race Detail tab in the right-hand set of tabs.

  • A new right-hand Race Detail tab is available to show detailed information for whichever data-race is selected in the Races tab.

  • A new Race Source Tab has been added; it shows two source contexts corresponding to the two accesses in the race shown in the Race Detail Tab. It is visible only if data-race-detection data is present.

  • A new metric, Race Accesses, is available for experiments with data-race-detection data, for functions, callers and callees, source and disassembly. Thresholding for highlighting lines in source and disassembly for this metric is set to any non-zero value, independent of the threshold for other metrics.

  • A new type of tab, IndexObject, is available. They are similar to the MemoryObject tabs, but process all data, and show only Exclusive metrics. Custom IndexObject tabs may be defined either in the GUI, or with directives in a .er.rc file. IndexObject tabs for Threads, CPUs, Samples, and Seconds are predefined. The implementation of MemoryObject and IndexObject tabs could change later in the release.

  • The management of the right-hand set of tabs has been changed so that only those tabs corresponding to enabled left-hand tabs will be shown. The Race Detail tab will be shown only if the Races tab is enabled; the Leak tab will be shown only if the LeakList tab is enabled; and the Event tab will be shown only if the Timeline is enabled. Selection in a left-hand tab will raise the corresponding right-hand tab, except that selection in the Source or Disassembly tab will not raise the Summary tab.

  • A new tab, Source/Disassembly has been added; it shows the source for the selected function in the upper panel, and the disassembly for that function in the lower panel. It is not visible by default, but can be made visible by selection from the GUI, or by adding srcdis to the list of tabs in the tabs or rtabs command in a .er.rc file.

  • A new command, tha, has been implemented to bring up the Analyzer with a simplified set of Tabs, tailored for Thread Analysis. The set of tabs shown are governed by a new rtabs directive from the user or system .rc files.

  • The Legend Tab has been removed, and the color legend for the Timeline moved to the Timeline color chooser dialog.

The er_print(1) command is changed in this release as follows:

  • The en_desc command in a .er.rc file has been extended to accept an argument in the form =<regex>. Any descendant process whose lineage or target name matches the regular expression will be automatically loaded; any descendant whose lineage and target name does not match will not be automatically loaded. 

  • A new command, ifreq prints a summary of instruction-frequencies from a count-data experiment. 

  • A new command, races prints a list of the detected data-races from a data-race-detection experiment.

  • A new command, rsummary which takes an argument of either a race ID, or the word "all". It prints detailed information for the given race.

  • A new metric, Race Accesses, is available for experiments with race-detection data, for functions, callers and callees, source and disassembly.

  • New commands to support IndexObject reports are available: indxobj <type>, indxobj_list, indxobj_sort, and indxobj_metrics <metric_spec>, as well as the commands for the predefined threads, cpus, seconds, and samples. A new command, indxobj_define, can be used to predefine custom IndexObject tabs, either in a .er.rc file, or from the command line. The implementation of MemoryObject and IndexObject tabs, and the commands for them, could change later in the release.

  • A new command in a .er.rc file, rtabs, can be used to specify which tabs are visible in the Analyzer, when invoked with the tha command. The tabs are specified as they are in the tabs directive.

The er_archive command is changed in this release as follows:

  • The er_archive command accepts a new argument, -n, specifying that the current experiment, but not any of its descendants, should be archived. This option is normally only used from libcollector.

Compiler Code Generators


x86/x64 Code Generation


Performance
  • Improved register allocation of stack based function arguments
  • Introduced fallthrough optimization for C++ code
  • Improved processing of extended intermediate representation types
  • Improved 32/64 bit alignment implementation
  • Improved inline template optimization under 64 bit mode
  • Implemented smart jump target alignment
  • Improved tailcall optimization
  • Improved profile feedback optimizations
  • Reworked and enhanced peephole optimizer
  • Compile time improvements - rewritten graphs processing algorithms
  • Improved performance for MMX based intrinsics
  • Improved generation of data prefetch instruction
Correctness
  • Fixed bugs reported through Sun Studio Forums
  • Fixed bugs which prevented CPU2006 from being built with very aggressive optimizations
  • Fixed long standing problems with openmp debug on x64
  • Fixed multiple other problems with debug info generation
Features
  • Added SSE3 instructions support to assembler and inline templates
  • Implemented the value profiling infrastructure
  • Media floating point intrinsic functions support

6. Additional Notes

Using the -xipo command line flag

You must specifiy -xipo both at compile time and link time. Failure to specify -xipo at link time on Linux could result in significantly large executable files.

Source Code for libelf and ld

Source code for libelf version 0.8.6 can be found at the following URL:
http://directory.fsf.org/libs/misc/libelf.html

Source code for ld version 2.16.1 (part of binutils) can be found at the following URL:
http://ftp.gnu.org/gnu/binutils/

Third-Party Technology Licenses

Sun Studio software includes third-party technologies governed by a third party license readme  file. Similarly, NetBeans includes third-party technologies governed by a NetBeans third-party license readme file. NetBeans C++ is governed by its own NetBeans C++ third-party license readme file.

(Last updated December 18, 2006)