Thursday Jun 14, 2007
|
We are the Solaris Developer Information Products Team:
Richard Friedman, David Lindt, Kami Shahi, Jyothi Srinath, Paul Echeverri, Ann Rice, Alta Elstad, Susan Morgan, Frank Jennings
Today's Page Hits: 45
Thursday Jun 14, 2007
|
Wednesday Jun 13, 2007
|
There's a new article on the Sun Studio SDN portal:
| By Dmitry Mikhailichenko, Sun Microsystems, St Petersburg, Russia, June 2007 |
|
This article gives an overview of the following C-language extensions (part of the GNU C-implementation) introduced in the Sun Studio 12 C compiler. Although these extensions are not part of the latest ISO C99 standard, they are supported by the popular gcc compilers.
The article also demonstrates how to use the new C compiler features for creating generic macros on example of linked-list manipulation-routines. Such macros semantically mimic C++ Standard Template Library, support arbitrary data types and provide strict compile-time type-checking.
Monday Jun 11, 2007
|
SDN Share is a new pilot program (http://sdnshare.com) that enables the developer community to submit content to the Sun Developer Network websites.
Anyone can submit tips, code, examples, even articles of some length, to the site. Submissions are moderated and reviewed, but the turnaround time seems to be measured in hours currently (except on weekends). And, viewers can vote up or down on submissions.
There are categories for Solaris that include debugging, driver development, installation, Java on Solaris, migration, networking, predictive self healing (SMF), resource management (ZFS, Zones, Containers), and security. And there's a developer tools/sunstudio category as well.
SDN Share has just started up and the content is started to flow in. There's also an RSS feed at http://sdnshare.com/index_rss.jsp and individual feeds for individual categories.
Got some great tip on using Solaris or Sun Studio? Put it on SDN Share.
Saturday Jun 09, 2007
|
Friday Jun 08, 2007
|
Here's what's new and changed in the Sun Studio 12 compilers:
You no longer need use the -xarch option to specify a 32-bit or 64-bit address model (LP64 versus ILP32). Two new options make it easier:
-m32 specifies the ILP32 model: 32-bit ints, longs, and pointer types.
-m64 specifies the LP64 model: 32-bit ints, 64-bit longs and pointers types. (Note that -m64 is the default on Linux platforms.)
Use -m64 in place of -xarch=generic64
Use -m64 -xarch=native in place of -xarch=native64
If you are using -xarch=v9 or -xarch=amd64 to specify a 64-bit address model, use just -m64 instead. No -xarch value is required.
[Read More] There's a new article on the SDN Sun Studio portal:
| By Timothy Jacobson, Sun Microsystems, June 2007 |
|
By using performance flags, developers can quickly improve execution speed. However, sometimes compiler flags alone do not result in optimum performance. For this reason, Sun Studio compilers also allow inline assembly code to be placed in critical areas. The inline code behaves similarly to a function or subroutine call, which enables cleaner, more readable code and also enables variables to be directly accessed in the inline assembly code.
This paper provides a demonstration of how to measure the performance of a critical piece of code. An example using a compiler flag and another example using inline assembly code are provided. The results are compared to show the benefits and differences of each approach.
mandelbrot.cmandelbrot.c With -fastmandelbrot.c With Inline Assembly CodeFor demonstration purposes, this paper uses an academic program to generate the Mandelbrot set. The example Mandelbrot program is written in C. Computing all the pixel values of the Mandelbrot set using the Sun Studio compiler is timed. Then, optimization flags are used and the computations are timed again. Finally, example Sun Studio inline assembly code is used and the computations are timed again and compared with the previous timings. The examples demonstrate two different methods for improving performance with the Sun Studio compiler: using flags and using inline assembly code.
THE REST OF THE ARTICLE IS ON THE SUN STUDIO SDN PORTAL