Dataspace Profiling Lives - Sun Studio 11 is out!
By nk on Nov 20, 2005
Download the development environment with Dataspace Profiling: Sun Studio 11. It's FREE!
Get your SPARC box out. Get your app built with the new Sun Studio 11 C compiler. C++ works also, but Dataspace Profiling support is a bit more buggy.
I'll describe how to use Dataspace Profiling on this blog.
When building your application, add these two options to your compile line in the C compiler:
This tells the compiler to insert additional information in the binary.
You need to understand what signals your command catches and which it ignores.
Use psig pid on any of the processes and check the signal layout.
Booting with Collector Framework
Next, boot your application with the collector framework disabled. This lets you have your address the same with and without measurement.
If possible, use /tmp or any local filesystem when you start your command, as an experiment file is created in the local directory. This yields better results.
collect -p +on -A copy -F on -y 17 command
Where 17 is SIGUSR2 from the Signals chapter. Use startstop.sh (provided below) to control when data is collected.
To collect data for a short-lived command use:
collect -p +on -A copy -F on command
This does not require startstop.sh.
If possible, use sig 16 SIGUSR1 or 17 SIGUSR2.
Generating an Experiment
To start and stop collection of the command, use startstop.sh (change the kill signal to the signal you are using.)
% startstop.sh command
starts and stops the data collection. Use this command at the start of your run and at the end of your run.
Here is startstop.sh:
for i in `ps -le | grep $1 | cut -c12-17`
kill -17 $i
echo Sent USR2 to pid $i
This should get you started.
I'll have a section setting up Performance Analyzer in the next entry.
Thanks for your patience.