|
|
|||
D-Light System RequirementsD-Light currently runs on the Solaris OS, at least version 10. To use D-Light with JavaTM applications, the system must have a DTrace enabled Java Runtime Environment, at least version 6, installed. The Solaris Express Developer Edition 11/08 OS, which is available free of charge from http://developers.sun.com/solaris/downloads/solexpdev/, is the recommended platform to run the tool. To check your Solaris version, type cat /etc/release at a shell prompt. To run D-Light, your user account must have the dtrace_user, dtrace_proc, and dtrace_kernel privileges. Not all tools require all privileges. If your user account lacks a privilege that a tool requires, the tools that require that privilege are unavailable. To check your user privileges, type /bin/ppriv -v $$ | grep dtrace at a shell prompt. If your account doesn't have the required privileges, consult your system administrator. If you have superuser privileges, you can grant your user account the required privileges. To Permanently Grant Required D-Light Privileges to a User Account
To Temporarily Grant Required D-Light Privileges to a User's Shell
Feedback DirectionsD-Light exists to gather user feedback. Please visit the Sun Studio Tools Forum at the Sun Developer Network site http://forum.java.sun.com/forum.jspa?forumID=852 to submit suggestions, praise, and criticism. D-Light Basic WorkflowD-Light is a plug-in in the Sun Studio IDE. Start D-Light by clicking the D-Light button on the main SunStudio toolbar. SunStudio displays three panes when D-Light starts:
Once D-Light is running, the basic workflow consists of:
Repeat the cycle above until the behavior of the application under analysis is clear. Choosing InstrumentsThe D-Light plug-in provides several instruments that you can use to analyze your application's behavior. Choose an instrument from the D-Light Instruments panel at in the top left of the main SunStudio window. The D-Light tool displays the Instruments panel when you press the Alt-L keyboard shortcut or click the “Show D-Light Instruments Panel” button in the top left corner of the D-Light tool's main window. ![]() Drag and drop individual instruments to the vertical blue bar at the left edge of the main D-Light Tool window. You can also double-click on an instrument to select it. Running D-Light on the SunStudio main projectFrom the D-Light drop-down button on the main SunStudio toolbar, choose 'D-Light Main Project' to analyze the code in SunStudio's main project. Clicking the 'Run' button in the D-Light toolbar runs the application in SunStudio's main project and monitors the instruments that are in the main D-Light pane. Running D-Light with Remote DevelopmentWhen you develop your code on a local machine and run the application on a remote machine, you can run D-Light instrumentation on the remote machine by configuring D-Light for remote development. Configuring a Project for Remote Development
Selecting a Remote Host as a Build TargetBefore You BeginConfigure your project for remote development before starting this procedure.
Running D-Light on an ELF ExecutableChoose 'D-Light Executable' to browse for an ELF executable. The D-Light tool displays the 'Select Executable Target' dialog. ![]() Type the path to the executable in the 'Executable' field, or click the 'Browse' button to browse for an executable. Type any arguments to pass to the executable in the 'Arguments' field. You can specify a working directory in the 'Working Directory' field or click on the 'Browse' button to browse for a directory. Clicking the 'OK' button accepts the contents of the fields and closes the dialog. Clicking the 'Run' button in the D-Light toolbar runs the application that you specified in the 'Executable' field and monitors the instruments that are in the main D-Light pane. Running D-Light on a Java ExecutableChoose 'D-Light Java Executable' to browse for a JAR file. The D-Light tool displays the 'Select Java Application' dialog. ![]() Make sure the 'JVM Path' field contains the correct path to your JVM installation, or click on the 'Browse' button to browse for a directory. Type any options you want to pass to the JVM in the 'JVM Options' field. Type the path to the JAR file in the 'JAR File' field, or click on the 'Browse' button to browse for a JAR file. You can specify a working directory in the 'Working Directory' field or click on the 'Browse' button to browse for a directory. You can choose the main class from the 'Main Class' drop-down or type in a main class. Clicking the 'OK' button runs the Java executable that you specified in the 'JAR File' field and monitors the instruments you selected. Note - To use the JDK's DTrace probes, pass -XX:+ExtendedDTraceProbes as an option to the JVM as an option in the 'JVM Options' field. Note - Monitoring attached processes is not currently supported. The 'D-Light Attached Process' option is unavailable. During an Experimental RunWhen you select a target for your instrumentation, the target application runs. The data that the individual instruments return displays in real time. Click the Stop button to end the experiment or wait for the application to finish. To examine and interpret the application's behavior, navigate the individual timelines examining events and finding correlations between events that happen simultaneously. Display Manipulation TasksThe information that the instruments return displays in the main D-Light Tool window. To zoom in on the data and fill the display window, click on the Fit to Screen button or use the Alt-F keyboard shortcut. ![]() To zoom in on a specific region of the timeline, click and drag in the timeline window to outline the desired region. Click the up and down buttons on the D-Light pane's toolbar to change the display to the timelines reported by different instruments. You can also use the Alt-U (up) and Alt-W (down) keyboard shortcuts. ![]() ![]() To display the D-script code that is associated with a specific instrument, right-click the instrument icon and select 'D-Script' from the drop-down menu. To reset the timeline, click the 'Reset Collected Data' button on the D-Light pane's toolbar, or use the Alt-R keyboard shortcut.
Note - You cannot make changes to the instruments in the main D-Light pane while the pane is displaying existing data. You must clear the collected data before changing the instrumentation. To move an instrument's timeline up or down in the list, drag and drop the instrument's icon to a different location on the instrument panel. To change the color masks that are associated with the events reported on an instrument's timeline, click the 'Show Color Masks Dialog' button on the D-Light pane's toolbar, or use the Alt-C keyboard shortcut. ![]() To display the source code that is associated with a particular monitored event, double-click any element of the stack in the instrument's timeline. For C and C++ source code, you must compile the application with the debug info option -g enabled. |
|||
|
|