Dataspace Profiling Lives - Sun Studio 11 is out!

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:

-g -xhwcprof 

This tells the compiler to insert additional information in the binary.

Signals

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:

#!/bin/sh
for i in `ps -le | grep $1 | cut -c12-17`
do
	kill -17 $i
	echo Sent USR2 to pid $i
done

This should get you started.

I'll have a section setting up Performance Analyzer in the next entry.

Thanks for your patience.

Comments:

startstop.sh <command>
pkill -17 <regex>
pkill -USR2 <regex>

Posted by guest on December 05, 2005 at 08:26 PM PST #

Thanks.

Posted by Nicolai Kosche on December 12, 2005 at 07:17 AM PST #

Post a Comment:
  • HTML Syntax: NOT allowed
About

nk

Search

Top Tags
Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today