Wednesday Mar 25, 2015

The "New to Solaris Development Forum" Has Moved

The New to Solaris Development Forum brought over from Sun Microsystems is still pretty active. It used to live in the Oracle Solaris space, but we just moved it under the Application Development in C, C++, and Fortran space.

We did this for two reasons:

  1. To create a dedicated space for systems developers.
  2. To reflect the fact Oracle Solaris Studio is an IDE for Oracle Linux as well as Oracle Solaris applications.

If you haven't been on the Forums in a while, you might not know about the changes we've made to them. Quite a few, actually.

1. It's not longer called forums.oracle.com.

It's called community.oracle.com, and looks like this:

To participate, you'll need to log in and create a profile. The system will assign you a ID such as User7877777. You can be a lout and keep that ID, or you can change it to something magnificent, like TomTheMagnificent. I hope you choose to be magnificent.

2. It's Not Just Discussions Any More

We are posting technical articles, video interviews, and other content on the Community Platform. Over time, the Community Platform and the web pages for the Oracle Technology Network will merge and become one. You can see some of that happening already:

This will take time, and we'll proceed slowly. I'll post lots and lots of blogs about the changes so you can keep track. And be sure to let me know what you think. If I can address any of your concerns by providing more information or altering our design a bit, I will.

- Rick

Follow Rick on:
Personal Blog | Personal Twitter | Oracle Community Profile | The Great Peruvian Novel
  Follow OTN Garage on:
Blog | Community Discussions | Web | Facebook | Twitter | YouTube

Thursday Feb 05, 2015

VBox Image and Instructions for Hands-On Labs Now Available

The instructions for the hands-on labs that will be proctored in OTN's upcoming Virtual Technology Summit are now available on OTN's Community Platform. To register:

As described in a previous blog, the Systems track will feature two 90-minute hands-on labs. The instructions for the labs, including links to the download, are available here:

Although you can work the labs on your own, the Virtual Tech Day will have the engineers from the Oracle Solaris Studio Team available to answer questions.

About the Photograph

I took a photograph of the beach at San Simeon California, during my ride home from the Sun Reunion.

- Rick

Follow Rick on:
Personal Blog | Personal Twitter | Oracle Community Profile
  Follow OTN Garage on:
Blog | Community Discussions | Web | Facebook | Twitter | YouTube

Wednesday Jan 21, 2015

Hands On Labs for C, C++, Fortran (and Java) Developers

I've always been a fan of Oracle Solaris Studio because it's the tool of choice for bad.ass developers. Java developers are ubiquitous, Database developers get more attention here at Oracle, and marketing apps generate a lot of buzz nowadays. But Fortran, C, and C++ developers bend big iron to their will. So I'm pumped that OTN's upcoming Virtual Tech Summit (VTS) will feature two 90-minute hands-on labs proctored by members of the Oracle Solaris Studio engineering team.

Lab: How to Use the Code Analyzer in Oracle Solaris Studio

moderated by Joseph Raja
Note:Instructions will be posted here before the end of January.

The Code Analyzer is a suite of tools designed to work with the Studio C/C++ compiler to identify issues in source code. The tools in this suite are

  • Previse, for compile-time checking of errors e.g. exceeding array bounds, infinite loops, etc.
  • Discover, to identify memory leak and memory corruption issues at run time, etc.
  • Uncover, to verify test coverage and identify sections of code not being tested
  • Codean, allows comparative analysis of error report across large projects
  • Code-analyzer, an intuitive GUI that allows analyzing and fixing the errors.

This lab will show you how to identify and rectify errors with these tools.

Lab: How to Use the Performance Analyzer in Oracle Solaris Studio

moderated by Eugene Loh
Note:Instructions will be posted here before the end of January.

The Performance Analyzer is a GUI and CLI tool for examining the performance of Java, C, C++, and Fortran applications and relating it back to constructs in the source code (functions, call stacks, source code lines, data structures, etc.) so that application performance can be understood and improved. The tool can examine time spent, Solaris microstates, hardware counters (cache and TLB misses, branch mispredicts,and so on), I/O operations, heap memory usage, synchronization locks, etc. Data collection is typically statistical, giving representative results with minimal invasiveness, even on highly optimized code. It is possible to profile the Solaris kernel. A timeline display shows load imbalances, synchronization, and different phases of execution.

This lab will help you become familiar with the basic operations of the Performance Analyzer.

Registration

About the Photograph

That's a picture of my daughter and two of her friends preparing for their next hand-to-hand combat session during Basic Training, affectionately referred to as "Beast" at the US Air Force Academy. If they were developers, they'd be Systems developers.

- Rick

Follow Rick on:
Personal Blog | Personal Twitter | Oracle Community Profile
  Follow OTN Garage on:
Blog | Community Discussions | Web | Facebook | Twitter | YouTube

Friday Dec 19, 2014

Three New Dev Tips for C++ Developers

How to Find Out What Resources Your Application Has Used

by Darry Gove

If you want to know how much CPU, memory, or other resources your application has used, you can pre-load a library and define a .fini method that prints out the results. You can also take advantage of the getusage call, which provides some information about CPU time and processes. But more information is available. Darryl provides examples of how to use these two components plus others that fill in the details.

How To Rapidly Identify Performance Opportunities

by Darry Gove

Profiling is critical to improving application performance. Without profiling, it is very easy to guess where the application is spending cycles, and then expend effort optimizing code that has little effect on overall performance. Oracle Solaris Studio 12.4 provides an overview screen designed to focus you on the metrics with the most promise. Darryl Gove walks you through the overview screen and explains what it indicates about your application.

Dev Tip: How to Get Finer Grained Control of Debugging Information

by Ivan Soleimanipour

The new options in Oracle Solaris Studio 12.4 provide much finer-grained control over debug information, which allows you to choose how much information is provided and reduce the amount of disk space needed for the executable. Ivan enumerates the options and provides examples of how to use them.

About the Photograph

I took the picture of the 01 Ducati 748S this summer, in Colorado. It currently has about 1300 miles on the odometer.

- Rick

Follow Rick on:
Personal Blog | Personal Twitter | Oracle Community Profile
  Follow OTN Garage on:
Blog | Community Discussions | Web | Facebook | Twitter | YouTube

Wednesday Sep 03, 2014

New Articles for Oracle Solaris Developers

Even though it was over 10 years ago, I still remember my side of the conversation with Jerry Jackson:

"Tuple? WTF is a Tuple?"

Jerry had just finished writing a language for building online insurance applications, and he was filling me in some of the gaps in my street urchin understanding of computer science. What I remember about Jerry's answer all these years later I can only paraphrase as:

"A tuple is like a grocery list. Except when it's not."

Although I've been focusing on content for sysadmins for the last few years, developers hold a special place in my heart. And Darryl Gove is one of the most generous with his knowledge. Not too long ago he teamed up with Steve Clamage to write several articles for OTN. Here are three of them:

Using the New C++ Array and Tuple Containers

by Darryl Gove and Steve Clamage

An array is equivalent to a traditional fixed length array in C++, but is accessible through standard container methods. A tuple is an ordered set of related elements of different types, such as one person's name, age, height, and so on. Both are new container types introduced in the C++11 Standard. Darryl and Steve explain what they are and how to use them.

How to Use Lambda Expressions in C++ 11

by Steve Clamage and Darryl Gove

Lambda expressions let you treat functions as objects, which means you can use them when you write a function that requires another function as one of its parameters. According to the authors, Lambdas are one of the defining features of the recent C++11 standard, and in this article they describe their syntax, how to pass them as pointers, and more.

Understanding the New Set and Map Containers in the C++ 11 Standard Library

by Darryl Gove and Steve Clamage

Map and set templates have been part of the C++ Standard Library since C++03. The C++11 Standard Library now includes templates for unordered maps and unordered sets. In some situations, the unordered versions can provide faster lookups than their ordered counterparts. Darryl and Steve explain.

About the Photograph

That's JimBob and El Jefe, two of my close riding buddies catching a little warmth from the sun outside of El Paso, Texas, during the now famous Durango Blizzard Ride of 2006. Will have to blog about that some day. They are tuple if there ever was one.

Follow Rick on:
Personal Blog | Personal Twitter | Oracle Community Profile
  Follow OTN Garage on:
Web | Facebook | Twitter | YouTube

Wednesday Jun 25, 2014

Helping Your Compiler Handle the Size of Your Constants

by Darryl Gove

When I use a constant in the following code, I get a warning:

On the other hand if I wrote:

Then then compiler will quite happily handle the constant.

The problem with the first bit of code is that it treats the value as a signed integer, and a signed integer can only hold 31 bits of precision plus a sign bit.

So how does the compiler decide how to represent a constant? The answer is interesting.

The compiler will attempt to fit a constant into the smallest value that it can. So it will try to fit the value into these types, in order: into an int, a long int, and then a long long int.

In the above code sample, the compiler will find that 1 and 31 both fit very nicely into signed ints. There's a shift left operation (<<) in the expression that produces a result of the same type as the left operand. So the whole expression (1<<31) has type signed int, which leads to the the warning.

To avoid the warning we can tell the compiler that this is an unsigned value. Either by typecasting the 1 to be unsigned in this manner:

or by declaring it as an unsigned value, like this:

More About Oracle Solaris Studio

Oracle Solaris Studio is a C, C++ and Fortran development tool suite, with compiler optimizations, multithread performance, and analysis tools for application development on Oracle Solaris, Oracle Linux, and Red Hat Enterprise Linux operating systems. Find out more about the Oracle Solaris Studio 12.4 Beta program here.

About the Photograph

Photograph of Zion National Park, Utah taken by Rick Ramsey in May 2014 on The Ride to the Sun Reunion.

- Darryl

Follow Darryl on:
Oracle Blog | Twitter
  Follow OTN Garage on:
Web | Facebook | Twitter | YouTube

Monday Feb 24, 2014

If Your Processor Stalls From a Read After Writer Operation ...

... rewrite your code. Better yet, write code that avoids this problem in the first place. The problem can occur when an application wants to load a value that it has just stored in memory. Read After Write (RAW) operations are common, so most chips are designed with hardware that makes that happen fast. But in some cases, you can write code that stumps the hardware. And so it stalls.

And you tumble to earth in horror, screaming for your life and clawing at the controls.

And you smack into the a pile of rocks. Or, to the horror of young mothers in minivans, the freeway during rush-hour traffic. Or worse, the middle of the ocean, so that if you somehow survive the impact, you drown. And nobody finds your body. And your loved ones can never move on.

Unless you're wearing a parachute. Like the one we just published from Darryl Gove.

Tech Article: Avoid Performance Loss (And a Fiery Death) from RAW Hazards

by Darryl Gove

Darryl explains exactly how a processor can stall from a bad RAW operation, and the common situations that cause this problem. Then he shows you how to identify, fix, and avoid writing that kind of code. Examples included. Help your loved ones move on. Read Darryl's article.

About the Author

Darryl Gove is a senior principal software engineer in the Oracle Solaris Studio team, working on optimizing applications and benchmarks for current and future processors. He is also the author of the books Multicore Application Programming, Solaris Application Programming, and The Developer's Edge.

Read Darryl Gove's blog on blogs.oracle.com/d.

Picture of radial engine taken by Rick Ramsey at Bay Area Aerospace Museum

- Rick

Follow me on:
Blog | Facebook | Twitter | YouTube | The Great Peruvian Novel

Thursday Mar 15, 2012

How to Unlock the Performance of Your Multithreaded Applications

Does the memory allocation of your multi-threaded application look like this?

That's probably because you're using a memory allocator designed for single-thread, single-CPU applications. Those memory allocators use malloc() and free() to reserve a portion of memory for your application, and then release it.

That type of memory allocator can continue to work in an application that ventures timidly into the possibilities of a multi-core, multithread-capable system. However, as the thread count begins to increase, different threads will start to request access to memory at the same time, and the traditional memory allocator won't be able to keep up.

Article: How Memory Allocation Affects Performance in Multithreaded Applications

Rick Weisner explains how memory allocation has evolved over the years, then shows you how to recognize a performance deficiency in your multithreaded application. Then he describes how to use three MT-aware memory allocators to take advantage of the performance promises of multi-core systems:

  • mtmemlock shipped with Oracle Solaris
  • libumem shipped with Oracle Solaris
  • the hoard allocator, publicly available

Stop the madness. Read Rick Weisner's article.

- Rick (Ramsey)

Website

Newsletter

Facebook

Twitter

About

Contributors:
Rick Ramsey
Kemer Thomson
and members of the OTN community

Search

Archives
« June 2015
SunMonTueWedThuFriSat
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
17
18
19
20
21
22
23
24
25
26
27
28
29
30
    
       
Today
Blogs We Like