Sun Java Solaris Communities My SDN Account Join SDN
 
Downloads

Sun Studio Express - February 2008 README

 

Contents

1. Sun Studio Express – February 2008 Build
2. New and Changed Features
3. System and Hardware Requirements
4. Installing This Sun Studio Express Build
5. Update Notification
6. Feature Details
7. Additional Notes
8. Usage Tracking Enabled

1. Sun Studio Express – February 2008 Build

Welcome to the Sun Studio Express Program: your opportunity to get a window into our early development process and to shape 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 build is just one 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.

This README page will give you all the information you need about what's new in this release. In addition, you can consult the Sun Studio forums for last minute information, and you can post feedback. On the forums you'll be able to get answers to your questions from our engineers as well as the community. And, we'd also like to hear from you about what what worked and what didn't, and what we should improve.

Note that the man pages and other documentation in the Express downloaded bits have not all been updated yet. The Sun Studio Information Center links to all the manuals, man pages, and readmes for Sun Studio 12, which is the latest official software release.

2. 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 might not be documented in the Sun Studio man pages in this build. For more detail on these features, see Feature Details.

Some of these features are experimental and might not be available in future releases. Some of these features might change significantly in future releases. The documentation is also preliminary and might not reflect the full range of functionality or problems and workarounds.

IDE

  • Based on NetBeans IDE 6.0
  • Include Hierarchy lets you inspect the hierarchy of source and header files
  • Type Hierarchy lets you inspect all supertypes and subtypes of a class
  • New toolbar button lets you toggle between corresponding source and header files
  • Code completion now works for #include directives
  • New Go to Type menu item lets you find a type (class, struct, enum, or typedef) by its name or prefix
  • New Go to Include menu item lets you go directly to a file that is included in a source or header file
  • New Go to Function or Variable menu item lets you find a function or variable by its name or prefix
  • Project dependencies can be created for projects from existing code

C compiler

  • __FUNCTION__ is a predefined identifier that contains the name of the lexically-enclosing function. It is functionally equivalent to the c99 predefined identifier, __func__. On Solaris platforms, __FUNCTION__ is not available in -Xs and -Xc modes.
  • The -xcrossfile=1 option becomes an alias of the -xipo=1 option. -xcrossfile no longer has any effect.

C++ compiler

  • The code>-xia option is now supported by the C++ compiler on the Solaris OS on x86 platforms. This option links the appropriate interval arithmetic libraries and sets a suitable floating-point environment.
  • The C++ compiler now inlines code when you specify -g with any -0 or -x0 value as long as you do not also specify +d.
  • The -xcrossfile=1 option becomes an alias of the -xipo=1 option. -xcrossfile no longer has any effect.

Fortran compiler

  • The -xcrossfile=1 option becomes an alias of the -xipo=1 option. -xcrossfile no longer has any effect.

Optimizations done by the C, C++, and Fortran compilers

  • -xannotate[=yes|no]
    (SPARC platforms only) Instructs the compiler to create binaries that can later be transformed by binary modification tools like binopt(1).

Compilers on x86 platforms

  • SSSE3 Assembly syntax/semantic and corresponding compiler intrinsics

Assembler on x86 platforms

  • Two new assembler options: -C and -a32

dbx debugger

  • Runtime checking (RTC) now gives information about array out-of-bounds access on the Solaris OS on x86 platforms.

Project D-Light

Project D-Light is a plugin for the Sun Studio 12 IDE that offers a variety of instrumentation that takes advantage of the Dynamic Tracing (DTrace) debugging and performance analysis functionality in the Solaris OS.

NetBeans Dynamic Tracing (DTrace) GUI Plugin

The NetBeans DTrace GUI plugin is a Graphical User Interface (GUI) for running DTrace scripts. After installing this express release, you can download the plugin and install it in the Sun Studio IDE.

3. System and Hardware Requirements

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

Hardware

  • Minimum on SPARC: Sun Ultra 60 (450 MHz, UltraSPARC II processor)
  • Minimum on x86/x64: Pentium III 500-MHz or any AMD64 Opteron or Athlon
  • Memory: Recommended 1 to 2 GBytes
    • Minimum: 512 Mbyte
  • Swap: 1 Gbyte
  • Disk space:
    • SPARC platforms: 1.5 GBytes
    • x86 platforms: 1.1 GBytes
    • Linux platforms: 1 GBytes


Operating Systems

  • Solaris versions:
    • Solaris 9
    • Solaris 10 01/06 or later update
  • Linux versions:
    • SuSE Linux Enterprise Server 9 with Service Pack 3 (or later)
    • Red Hat Enterprise Linux 4

If you want to try Sun Studio Express on a Solaris Express build (Solaris Express, Developer Edition; OpenSolaris, etc.), or on any Linux distribution that minimally has the 2.6.X Linux kernel and 2.3.3+ glibc, we would very much like to receive your input.

4. Installing This Sun Studio Express Build

Access this Sun Studio Express release download by going to the Sun Studio Express page.

Download the product tarfile into a scratch directory, such as /var/tmp.

Note: No package installation is available for this build.

You do not need to have root access to install the tarfile.

Install Sun Studio Express by unpacking the product tarfile into the directory of your choice with the command:

$ bzcat DOWNLOAD-DIRECTORY/StudioExpress-OS-PLATFORM-DATE-ii.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 installed in /opt/SUNWspro/ on Solaris OS, and /opt/sun/sunstudionn on Linux, where nn is the release number (for example /opt/sun/sunstudio12). Be sure to install Express builds in an area separate from these installations.

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

5. 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.

6. Feature Details

Here are further details on some of the new features in this Express build of Sun Studio compilers and tools. Note that most of these features may not be documented in the Sun Studio man pages in this build.

Some of these features are experimental and may not be available in future releases. Some of these features may change significantly in future releases. The documentation is also preliminary and may not reflect the full range of functionality or problems and workarounds.

IDE

The IDE in this Sun Studio Express release is based on NetBeans IDE 6.0, and includes the following new features:
  • Include Hierarchy, opened by right-clicking in a source or header file and choosing Navigate > Inspect Includes Hierarchy, lets you inspect the hierarchy of source and header files
  • Type Hierarchy, opened by right-clicking on a class declaration or class reference and choosing Navigate > Inspect Type Hierarchy, lets you inspect all supertypes and subtypes of a class
  • New toolbar button lets you toggle between corresponding source and header files
  • Code completion now works for #include directives
  • New Go to Type menu item lets you find a type (class, struct, enum, or typedef) by its name or prefix
  • New Go to Include menu item lets you go directly to a file that is included in a source or header file
  • New Go to Function or Variable menu item lets you find a function or variable by its name or prefix
  • Project dependencies can be created for projects from existing code

sunstudio Command Options

The following changes have been made to the options of the sunstudio command:

  • The --enablejava and --disablejava options have been removed. You can now use the Plugin Manager (Tools > Plugins) to enable and disable the Java plugins.
  • The format of the --ui-classpath path option, which appends the specified path to the IDE's classpath, has changed to --cp:apath.

Backward Compatibility of Projects

  • NetBeans IDE 6.0 includes C/C++ Development Pack 6.0, which supports project version 39 and older.
  • The IDE in the Sun Studio 12 multi-language release was based on NetBeans C/C++ Development Pack 5.5.1 update 1 and supports project version 38 and older.
  • The IDE in the Sun Studio 12 English-only release was based on NetBeans C/C++ Development Pack 5.5.1 and supports project version 27 and older.

If you open a project with the IDE in this Express release, you might not be able to open the project with the IDE in the Sun Studio 12 multi-language release or any previous release.

When the IDE opens a project with a lower version number than it supports, it does so without any warnings. If you modify the project, the project system silently upgrades it to the current project version. The project system doesn't update the project's meta data if you don't modify the project.

When the IDE encounters a higher project version than it supports, it shows an error dialog that states the project version is not supported and you need a newer version of the IDE to open the project. The project's meta data is not modified. The unopened project can still be built as a sub-project from within the IDE or from command line (the IDE in the Sun Studio 12 multi-language release throws an exception but it is benign).

This behavior is not new. Projects have had this behavior in Sun Studio releases based on NetBeans C/C++ Development Pack 5.0, 5.5, 5.5.1, and 5.5.1 update 1.

The project version of a project can be found in the configurations.xml file in the nbproject folder of the project. For example:

grep version Welcome/nbproject/configurations.xml
<configurationDescriptor version ="39">

By default, projects are created in ~/SunStudioProjects.


C compiler

Option changes:

  • The -xcrossfile=1 option becomes an alias of -xipo=1 option. -xcrossfile=0 no longer has any effect.
  • The -Y option doesn't accept "i" as argument.
  • The -W option doesn't accept "i" as argument.

__FUNCTION__ is a predefined identifier that contains the name of the lexically-enclosing function. It is functionally equivalent to the c99 predefined identifier, __func__. On Solaris platforms, __FUNCTION__ is not available in -Xs and -Xc modes.


C++ compiler

Option changes:

  • The -xcrossfile=1 option becomes an alias of -xipo=1 option. -xcrossfile=0 no longer has any effect.
  • The -Y option doesn't accept "i" as an argument.
  • The -Qoption option doesn't accept "ube_ipa" as an argument.
  • The -xia option is now supported by the C++ compiler on x86 platforms. This option links the appropriate interval arithmetic libraries and set a suitable floating-point environment. The -xia is a macro which expands to -fsimple=0 -ftrap=%none -fns=no -library=interval. This option also requires that you specify an -xarch value that supports SSE2 instructions, such as -xarch=sse2. See CC.1 for more information.

The C++ compiler now inlines code when you specify -g with any -0 or -x0 value as long as you do not also specify +d. In previous releases, -g automatically specified +d, but this is no longer the case.


Fortran compiler

Option changes:

  • The -xcrossfile=1 option becomes an alias of -xipo=1 option. The -xcrossfile=0 no longer has any effect.
  • The -Qoption option doesn't accept "ube_ipa" as an argument.


Optimizations done by the C, C++, and Fortran compilers

-xannotate[=yes|no]

(SPARC platforms only) Instructs the compiler to create binaries that can later be transformed by binary modification tools like binopt(1). Future binary analysis, code coverage and memory error detection tools will also work with binaries built with this option.

Use the -xannotate=no option to prevent the modification of the binary file by these tools.

The -xannotate=yes option must be used with optimization level -xO1 or higher to be effective, and it is only effective on systems with the new linker support library interface -ld_open(). The new compiler support library libld_annotate.so uses this new interface. If the compiler is used on a system without this linker interface (for example, Solaris OS 9), it silently reverts to -xannotate=no. The new linker interface is provided by the fix to bug id: 6479848. This fix is available in Solaris 10 patch 127111-07, and current versions of OpenSolaris.

The default is -xannotate=yes, but if either of the above conditions is not met, the default reverts to -xannotate=no.


Compilers on x86 platforms

SSSE3 Assembly Syntax/Semantic and Corresponding Compiler Intrinsics

	
	PSIGNB, PSIGNW, PSIGND

	- Syntax: psignb/psignw/psignd mem64/mmxreg, mmxreg
	psignb/psignw/psignd mem128/xmmxreg, xmmxreg
	- Semantic: Packed Sign
	- Corresponding intrinsics:
	extern __m64 _mm_sign_pi8 (__m64 p1, __m64 p2);
	extern __m64 _mm_sign_pi16 (__m64 p1, __m64 p2);

	extern __m64 _mm_sign_pi32 (__m64 p1, __m64 p2);
	extern __m128i _mm_sign_epi8 (__m128i p1, __m128i p2);
	extern __m128i _mm_sign_epi16 (__m128i p1, __m128i p2);
	extern __m128i _mm_sign_epi32 (__m128i p1, __m128i p2);
	
PABSB, PABSW, PABSD - Syntax: pabsb/pabsw/pabsd mem64/mmxreg, mmxreg pabsb/pabsw/pabsd mem128/xmmxreg, xmmxreg - Semantic: Packed Absolute Value - Corresponding intrinsics: extern __m64 _mm_abs_pi8 (__m64 p); extern __m64 _mm_abs_pi16 (__m64 p); extern __m64 _mm_abs_pi32 (__m64 p); extern __m128i _mm_abs_epi8 (__m128i p); extern __m128i _mm_abs_epi16 (__m128i p); extern __m128i _mm_abs_epi32 (__m128i p);
PALIGNR - Syntax: palignr imm, mem64/mmxreg, mmxreg palignr imm, mem128/xmmreg, xmmreg - Semantic: Packed Align Right - Corresponding intrinsics: extern __m64 _mm_alignr_pi8 (__m64 p1, __m64 p2, int immd); extern __m128i _mm_alignr_epi8 (__m128i p1, __m128i p2, int immd);
PSHUFB - Syntax: pshufb mem64/mmxreg, mmxreg pshufb mem128/xmmxreg, xmmxreg - Semantic: Packed Shuffle Bytes - Corresponding intrinsics: extern __m64 _mm_shuffle_pi8 (__m64 p1, __m64 p2); extern __m128i _mm_shuffle_epi8 (__m128i p1, __m128i p2);
PMULHRSW - Syntax: pmulhrsw mem64/mmxreg, mmxreg pmulhrsw mem128/xmmxreg, xmmxreg - Semantic: Packed Multiply High with Round and Scale - Corresponding intrinsics: extern __m64 _mm_mulhrs_pi16 (__m64 p1, __m64 p2); extern __m128i _mm_mulhrs_epi16 (__m128i p1, __m128i p2);
PMADDUBSW - Syntax: pmaddubsw mem64/mmxreg, mmxreg pmaddubsw mem128/xmmxreg, xmmxreg - Semantic: Multiply and Add Packed Signed and Unsigned Bytes - Corresponding intrinsics: extern __m64 _mm_maddubs_pi16 (__m64 p1, __m64 p2); extern __m128i _mm_maddubs_epi16 (__m128i p1, __m128i p2);
PHSUBW, PHSUBD - Syntax: phsubw/phsubd mem64/mmxreg, mmxreg phsubw/phsubd mem128/xmmxreg, xmmxreg - Semantic: Packed Horizontal Subtract - Corresponding intrinsics: extern __m64 _mm_hsub_pi16 (__m64 p1, __m64 p2); extern __m64 _mm_hsub_pi32 (__m64 p1, __m64 p2); extern __m128i _mm_hsub_epi16 (__m128i p1, __m128i p2); extern __m128i _mm_hsub_epi32 (__m128i p1, __m128i p2);
PHSUBSW - Syntax: phsubsw mem64/mmxreg, mmxreg phsubsw mem128/xmmxreg, xmmxreg - Semantic: Packed Horizontal Subtract and Saturate Words - Corresponding intrinsics: extern __m64 _mm_hsubs_pi16 (__m64 p1, __m64 p2); extern __m128i _mm_hsubs_epi16 (__m128i p1, __m128i p2);
PHADDW, PHADDD - Syntax: phaddw/phaddd mem64/mmxreg, mmxreg phaddw/phaddd mem128/xmmxreg, xmmxreg - Semantic: Packed Horizontal Add - Corresponding intrinsics: extern __m64 _mm_hadd_pi16 (__m64 p1, __m64 p2); extern __m64 _mm_hadd_pi32 (__m64 p1, __m64 p2); extern __m128i _mm_hadd_epi16 (__m128i p1, __m128i p2); extern __m128i _mm_hadd_epi32 (__m128i p1, __m128i p2);
PHADDSW - Syntax: phaddsw mem64/mmxreg, mmxreg phaddsw mem128/xmmxreg, xmmxreg - Semantic: Packed Horizontal Add and Saturate Words - Corresponding intrinsics: extern __m64 _mm_hadds_pi16 (__m64 p1, __m64 p2); extern __m128i _mm_hadds_epi16 (__m128i p1, __m128i p2);

Assembler on x86 platforms

There are two new assembler options:

  • -C: In general you do not need -C to be GNU Assembler compatible; -C is needed only in several situations to make the semantic compatible. Refer to the changes below.
  • -a32: To allow 32-bit memory addresses in -m64 64-bit mode.

Major area of changes:

  • For mnemonics without suffix, the presence of register operand determines the suffix implicitly. If size of operation can not be determined due to absence of register operand, an error is issued if the option -C was used, otherwise the suffix defaults to 'l'. For example
    mov $10, %ax
    can now be used for
    movw $10, %ax
    Note if we have
    mov $10, mem
    the Sun Studio Assembler defaults to
    movl $10, mem
    but gives an error if -C is used, to be compatible with the GNU Assembler.
  • Allow all 16-bit instructions to accept 32-bit register operands, but to issue warning if the -C option is used.
  • Allow 32-bit addresses under 64-bit mode using the new option -a32. For example, the command
    fbe -m64 -a32 file.s
    can assemble
    lea 123(%eax,%r10d),%eax
  • A program can now have more than 10 local labels, a local label can now be as large as a 32-bit integer.
  • You can now place lock/rep/repnz/repz/repe/repne prefix on the same line as the following instruction.
  • GNU Assembler compatible instruction synonyms have been added:
    cbw==cwtd, cwd==cwtd, cwde==cwtl, cdq==cltd, cdqe==cltq, cqo==cqto,
    movzb==movzbl, sysret==sysretl
  • GNU Assembler compatible assembler directives have been added: .p2align,.extern,.global,.equiv
  • One obsolete option: -b generates extra symbol table information for the SourceBrowser, which is now obsolete.

dbx debugger

Runtime checking (RTC) now gives information about array out-of-bounds access on the Solaris OS on x86 platforms. Runtime Checking reports the following array out-of-bounds errors:

rob   Read from array out-of-bounds memory
wob   Write to array out-of-bounds memory


Project D-Light

The objective of Project D-Light is to make sophisticated application and system profiling, accessible. There are many tools that profile applications and there are other tool that profile the system stack, but there are few tools that can join these views into an easy to use interface. For the first time, you can optimize your application and system environment by visualizing performance bottlenecks and resource contention up and down the application system stack.

Using an intuitive drag and drop interface, Project D-Light provides an extensible library of instruments that represent the latest advances of profiling technology, including Solaris Dynamic Tracing (DTrace). With instruments like CPU accountant and Sampler, developers can use the interactive GUI to quickly profile and peer into the runtime behavior of their applications.

For more information on using D-Light refer to the Project D-Light Tutorial


NetBeans Dynamic Tracing (DTrace) GUI Plugin

The NetBeans DTrace GUI plug-in is a Graphical User Interface (GUI) for running DTrace scripts, which this express build installs in the IDE. You can run D scripts from the GUI, even those that are embedded in shell scripts. In fact, the DTrace GUI plug-in runs all of the D scripts that are packaged in the DTraceToolkit. The DTraceToolkit is a collection of useful documented scripts developed by the OpenSolaris DTrace community.

The NetBeans DTrace GUI plug-in is architected in such a way that you can easily extend and customize it.

The GUI package consists of two components: The NetBeans plug-in and the DTraceScripts directory. The DTraceScripts directory contains several subdirectories. Each subdirectory contains several D scripts. The D scripts are categorized mostly based on DTrace providers. You can copy a new D script to an existing subdirectory from the shell command line, you can copy it into a newly created subdirectory in the DTraceScripts directory. You can also create and save a new D script from within the IDE.

After installing this Express release and starting the Sun Studio IDE with the sunstudio command, you can download the DTrace GUI Plugin by doing the following:

  1. Choose Tools > Plugins.
  2. On the Available Plugins tab of the Plugins window, click the checkbox for DTrace to add a checkmark. (If DTrace does not appear in the available plugins list, click Reload Catalog and try again.) Click Install.
  3. In the Plugin Installer window, click Next.
  4. Accept the License Agreement and click Install.
  5. Click Finish.
  6. Close the Plugins window.

The NetBeans DTrace GUI plugin is now installed into the IDE. Before using the plugin, you must install the DTraceScripts file. If you will be running the IDE as yourself, the DTraceScripts.tar file needs to be installed in your home directory. If you will be running the IDE as root, the DTraceScripts.tar file needs to be installed in the root directory.

After you have installed the DTrace GUI plug-in, the DTraceScripts.tar file is in the .sunstudio/ceres-dev2-SunOS-sparc/dtrace-gui-102007 directory in your home directory.

To install the DTraceScripts.tar file:

  1. In your home directory or root directory, untar the file. For example:
          tar -xvf /home/foo/.sunstudio/ceres-dev2-SunOS-sparc/dtrace-gui-102007/DTraceScripts.tar
    
  2. The file permissions for all of the scripts need to be set to -rwxr-xr-x or 755. If necessary, use the UNIX chmod command to set the proper file permissions. For example:
    
          chmod -R 755 DTraceScripts
    

Your installation of the DTrace GUI is now complete. To open the DTrace GUI, choose Window > DTrace. For information on using the DTrace GUI, see NetBeans DTrace GUI Plug-in.

7. Additional Notes

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 in the Sun Download Center

8. Usage Tracking Enabled

Usage tracking provides a way for Sun software engineers to collect information about how developers use Sun compilers and tools. This information can then be used to improve future revisions of the products.

Usage tracking is enabled in this Express release. Usage tracking will not be enabled in the final release.

Usage tracking captures the compiler and tools command options that you specify. Usage tracking also uses the uname -a command to capture platform information and operating system information from the runtime environment. No file names, directory names, or macros are collected. For example, you might issue the following command:

CC -DMACRO -L/directory1 -I/directory2 -Xa -O hello.cc

In this case, only the following information is reported back to Sun:

CC -D -L -I -Xa -O

Each time a compiler or tool is invoked, the options that are used are logged in the file /tmp/.UT... The log file is sent to Sun software engineers if the file exceeds 10 Kbytes or is more than 24 hours old.

You can turn off usage tracking by defining the environment variable UT_NO_USAGE_TRACKING before running any of the Sun compilers and tools.

(with csh) % setenv UT_NO_USAGE_TRACKING

(with ksh) $ export UT_NO_USAGE_TRACKING

(with sh)   $ set UT_NO_USAGE_TRACKING; export UT_NO_USAGE_TRACKING

(Last updated February 5, 2008)