Oracle Solaris Studio 12.2 DLight 2010 9
2 2 3 DLight 3 3 6 13 CPU 16 18 21 I/O DLight Oracle Solaris (DTrace) C/C++ Solaris DLight DTrace DLight DLight DLight C C++ Fortran CPU I/O DLight AMP Apache MySQL PHP Apache MySQL PHP "Run Monitor" Oracle Solaris Studio 12.2 examples/dlight/profilingdemo ProfilingDemo 1. ProfilingDemo cp -r installation_directory/examples/dlight/profilingdemo ~/ProfilingDemo 2. cd ~/ProfilingDemo make -g DLight Oracle Solaris Studio 12.2 DLight 2
DLight DLight installation_directory/bin/dlight 1. DLight "New DLight Target" DLight a. "Executable Target" b. "Run" profilingdemo "Browse" "Open" profilingdemo c. "Arguments" d. "Trace" e. "Run" f. DLight 2. ProfilingDemo "Run Monitor" "Output" ProfilingDemo 3. Enter 1. "Run Monitor" "View" "Details" "Time" 2. "Time" CPU I/O 3. "Time" 4. "View" "View" 5. "View" "Time" Oracle Solaris Studio 12.2 DLight 3
6. "View" "Time" 7. "Details" "Details" 8. "Details" "View" Oracle Solaris Studio 12.2 DLight 4
9. "Thread Details" "Hot Spots" "Memory Leaks" "Sync Problems" "I/O Details" I/O 10. "View" Oracle Solaris Studio 12.2 DLight 5
"Thread Microstates" Solaris DTrace User Running System Running Other running Text page fault Data page fault Blocked Sleeping Waiting CPU "Thread Microstates" "Sleeping" "Waiting" "Blocked" "Running" "Running" 1. "View" 20 SEQUENTIAL DEMO Enter Oracle Solaris Studio 12.2 DLight 6
2. "Time" "Thread Microstates" 3. PARALLEL DEMO "Waiting" "Sleeping" "Running" PARALLEL DEMO "Blocked" Oracle Solaris Studio 12.2 DLight 7
4. "Time" "Blocked" PTHREAD MUTEX DEMO Oracle Solaris Studio 12.2 DLight 8
5. "Thread Details" "Thread Details" Oracle Solaris Studio 12.2 DLight 9
"Thread Details" 6. "Details" "Summary" Oracle Solaris Studio 12.2 DLight 10
7. "Show" "Live Threads only" "Finished Threads only" "Detail Level" "Moderate" "Advanced" Shift Ctrl "Show Only Selected Threads" "Show" "All Threads" 8. "Zoom In" "Detail Level" "Advanced" 9. "Zoom Out" 10. "Show Complete Run" "Thread Details" 11. 4 "Thread Call Stack" "Expand All" Oracle Solaris Studio 12.2 DLight 11
12. mutex_threadfunc Oracle Solaris Studio 12.2 DLight 12
13. "Thread Details" "Thread Details" "Navigate" "Thread Call Stack" "Thread Call Stack" Ctrl + Ctrl + Ctrl + "Thread Call Stack" Alt + "Thread Call Stack" "Thread Call Stack" Enter CPU "CPU Usage" CPU CPU 1. "Hot Spots" CPU "CPU Time Per Function" CPU CPU CPU Oracle Solaris Studio 12.2 DLight 13
2. "Function Name" 3. "CPU Time (Exclusive)" CPU 4. "CPU Time" CPU "CPU Time (Inclusive)" CPU CPU "CPU Time (Exclusive)" CPU 5. "CPU Time (Inclusive)" CPU work_run_usrcpu "CPU Time (Inclusive)" CPU "CPU Time (Exclusive)" CPU CPU work_run_usrcpu 6. work_run_usrcpu common.c 59 work_run_usrcpu Oracle Solaris Studio 12.2 DLight 14
7. "CPU Time Per Function" CPU CPU CPU common.c CPU work_run_usrcpu 8. Enter "CPU Time Per Function" CPU 0:30 "Run Monitor" "Details" "CPU Time Per Function" CPU "Time Filter" CPU Oracle Solaris Studio 12.2 DLight 15
9. work_run_usrcpu "CPU Time (Exclusive)" CPU "Show only rows where" > "CPU Time (Exclusive) == the metric shown for work_run_usrcpu" CPU == work_run_usrcpu CPU "Memory Usage" 1. "Run Monitor" "Time" SEQUENTIAL DEMO PARALLEL DEMO PTHREAD MUTEX DEMO Oracle Solaris Studio 12.2 DLight 16
2. "Memory Leaks" "Memory Leak Details" "Refresh" "Memory Leak Details" 3. "Run Monitor" "Details" 4. ProfilingDemo work_run_getmem work_run_getmem common.c 5. "CPU Usage" CPU 6. "CPU Time Per Function" CPU "Memory Leak Details" Oracle Solaris Studio 12.2 DLight 17
"Thread Usage" 1. "Time" "Thread Microstates" SEQUENTIAL DEMO PARALLEL DEMO 2. "View" 3. "CPU Usage" CPU "Memory Usage" CPU SEQUENTIAL DEMO Enter CPU Oracle Solaris Studio 12.2 DLight 18
4. "Time" PARALLEL DEMO CPU SEQUENTIAL DEMO Oracle Solaris Studio 12.2 DLight 19
5. PARALLEL DEMO Enter 6. PTHREAD MUTEX DEMO PTHREAD MUTEX DE O 7. "Sync Problems" "Thread Synchronization Details" 8. "Sync Problems" "Refresh" 9. "Wait Time" 10. "Lock Waits" 11. mutex_threadfunc mutex.c pthread_mutex_lock Oracle Solaris Studio 12.2 DLight 20
12. "Wait Time" "Lock Waits" "Thread Synchronization Details" 13. "Show Profiler Metrics" 14. "View" > "Show Profiler Metrics" I/O "I/O Usage" I/O 1. SEQUENTIAL DEMO I/O Enter Enter Oracle Solaris Studio 12.2 DLight 21
2. "Profiling Demo" "Output" SEQUENTIAL DEMO 7998464 76.3M 76.3M "CPU Usage" CPU "Memory Usage" 8K 3. "I/O Details" I/O "I/O Usage" I/O Oracle Solaris Studio 12.2 DLight 22
4. Enter "Bytes Read" "Change Visible Columns" "Bytes Read" "Change Visible Columns" "Bytes Read" "OK" 5. "I/O Usage" I/O /var/tmp/baa[]... 6. work_run_syscpu Oracle Solaris Studio 12.2 DLight 23
7. "CPU Time Per Function" CPU "Thread Synchronization Details" "I/O Usage" I/O "Run Monitor" "I/O Usage" I/O SEQUENTIAL DEMO 8. "End" 0:17 SEQUENTIAL DEMO "Run Monitor" "I/O Usage" I/O SEQUENTIAL DEMO 9. "I/O Usage" I/O 10. "Run Monitor" "Time" PARALLEL DEMO Enter 11. "Start" "End" 0:18 0:29 Oracle Solaris Studio 12.2 DLight 24
12. PARALLEL DEMO "I/O Usage" I/O 13. parallel_threadfunc 14. "Details" PTHREAD MUTEX DEMO Enter I/O 0:24 Oracle Solaris Studio 12.2 DLight 25
15. "I/O Usage" I/O PTHREAD MUTEX DEMO PARALLEL DEMO Oracle Solaris Studio 12.2 DLight 26
2010 U.S. GOVERNMENT RIGHTS Programs, software, databases, and related documentation and technical data delivered to U.S. Government customers are "commercial computer software" or "commercial technical data" pursuant to the applicable Federal Acquisition Regulation and agency-specific supplemental regulations.as such, the use, duplication, disclosure, modification, and adaptation shall be subject to the restrictions and license terms set forth in the applicable Government contract, and, to the extent applicable by the terms of the Government contract, the additional rights set forth in FAR 52.227-19, Commercial Computer Software License (December 2007).Oracle America, Inc., 500 Oracle Parkway, Redwood City, CA 94065. Oracle Corporation Oracle Java Oracle / AMD Opteron AMD AMD Opteron Advanced Micro Devices Intel Intel Xeon Intel Corporation SPARC SPARC International, Inc UNIX X/Open Company, Ltd Oracle Corporation Oracle Corporation 821-2516 Oracle Corporation 500 Oracle Parkway, Redwood City, CA 94065 U.S.A.