Why collect synchronization wait tracing data?
If you have a performance problem in a multithreaded program written in C, C++ or Fortran, it could be due to synchronization delays. Collecting synchronization data helps you identify where the delays are happening and how much time is used in delays.
If you have recorded timing data and see significant values for the User Lock metric or the Other Wait Time metric, this is an indication that your program might have synchronization delays.
How is synchronization wait tracing data collected by the Collector?
The Collector keeps track of real-time delays in calls to thread- synchronization routines, by interposing wrapper routines on the real routines. Events are recorded if the delay exceeds a predetermined threshold. Each data point contains time stamps for the beginning and the end of the delay, the processor ID, the lock address, and the IDs of the thread and LWP running at the end of the delay.
What synchronization metrics can I see in the Performance Analyzer?
Synchronization wait tracing data is converted into the following metrics:
Metric | Definition |
---|---|
Synchronization delay event count | The number of events in which the delay exceeds the threshold |
Synchronization wait time | The time spent waiting on calls to synchronization routines. Only the events for which the wait time is greater than the threshold are included in this sum. |
How do I set the delay threshold?
The threshold can be set to a time value in microseconds, or determined by a calibration test. In the calibration test, calls are made to the synchronization routines without any synchronization delay. The calibrated threshold is the average time for these calls multiplied by an arbitrary factor. This is the default option when synchronization data is collected.
If you want to record events for which there is a real delay, choose Calibrate. If you want to record all synchronization events regardless of delay time, set the threshold to zero.
What are the limitations on synchronization wait tracing data collection?
You cannot collect synchronization wait tracing data from a program that is already running unless the Collector library, libcollector.so, has been preloaded. See Collecting Performance Data on a Running Process for more information.
Tracing data is not recorded for JavaTM monitors.
For more information, see the Performance Analyzer manual.
See also | |
---|---|
Collecting Performance Data |