Global data is recorded by the Collector in packets called sample packets. Each packet contains a header, a timestamp, execution statistics from the kernel such as page fault and I/O data, context switches, and a variety of page residency (working-set and paging) statistics. The data recorded in sample packets is global to the program and is not converted into performance metrics. The process of recording sample packets is called sampling.
Sample packets are recorded in the following circumstances:
When the program stops for any reason in the Debugging window of the IDE or in dbx, such as at a breakpoint, if the option to do this is set
At the end of a sampling interval, if you have selected periodic sampling. The sampling interval is specified as an integer in units of seconds. The default value is 1 second
When you choose Advanced -> Advanced Profiling -> Configure in the IDE and select the Periodic Samples checkbox in the Project Properties dialog box
When you use the dbx collector sample record command to manually record a sample
At a call to collector_sample, if you have put calls to this routine in your code (see Program Control of Data Collection)
When a specified signal is delivered, if you have used the -l option with the collect command (see the collect(1) man page)
When collection is initiated and terminated
When you pause collection with the dbx collector pause command (just before the pause) and when you resume collection with the dbx collector resume command (just after the resume)
Before and after a descendant process is created
The performance tools use the data recorded in the sample packets to group the data into time periods, which are called samples. You can filter the event-specific data by selecting a set of samples, so that you see only information for these particular time periods. You can also view the global data for each sample.
The performance tools make no distinction between the different kinds of sample points. To make use of sample points for analysis you should choose only one kind of point to be recorded. In particular, if you want to record sample points that are related to the program structure or execution sequence, you should turn off periodic sampling, and use samples recorded when dbx stops the process, or when a signal is delivered to the process that is recording data using the collect command, or when a call is made to the Collector API functions.