This section describes the limitations on data collection that are imposed by the hardware, the operating system, the way you run your program, or by the Collector itself.
There are no limitations on simultaneous collection of different data types: you can collect any data type with any other data type.
The minimum value of the profiling interval and the resolution of the clock used for profiling depend on the particular operating environment. The maximum value is set to 1 second. The value of the profiling interval is rounded down to the nearest multiple of the clock resolution. The minimum and maximum value and the clock resolution can be found by typing the collect command with no arguments.
Clock-based profiling records data when a SIGPROF signal is delivered to the target. It causes dilation to process that signal, and unwind the call stack. The deeper the call stack, and the more frequent the signals, the greater the dilation. To a limited extent, clock-based profiling shows some distortion, deriving from greater dilation for those parts of the program executing with the deepest stacks.
Where possible, a default value is set not to an exact number of milliseconds, but to slightly more or less than an exact number (for example, 10.007 ms or 0.997 ms) to avoid correlations with the system clock, which can also distort the data. Set custom values the same way on SPARC platforms (not possible on Linux platforms).
You cannot collect any kind of tracing data from a program that is already running unless the Collector library, libcollector.so, had been preloaded. See Collecting Tracing Data From a Running Program for more information.
Tracing data dilates the run in proportion to the number of events that are traced. If done with clock-based profiling, the clock data is distorted by the dilation induced by tracing events.
Hardware counter overflow profiling has several limitations:
You can only collect hardware counter overflow data on processors that have hardware counters and that support overflow profiling. On other systems, hardware counter overflow profiling is disabled. UltraSPARC® processors prior to the UltraSPARC III processor family do not support hardware counter overflow profiling.
You cannot collect hardware counter overflow data on a system while cpustat(1) is running, because cpustat takes control of the counters and does not let a user process use the counters. If cpustat is started during data collection, the hardware counter overflow profiling is terminated and an error is recorded in the experiment.
You cannot use the hardware counters in your own code with the libcpc(3) API if you are doing hardware counter overflow profiling. The Collector interposes on the libcpc library functions and returns with a return value of -1 if the call did not come from the Collector. Your program should be coded so as to work correctly if it fails to get access to the hardware counters. If not coded to handle this, the program will fail under hardware counter profiling, or if the root invokes system-wide tools that also use the counters.
If you try to collect hardware counter data on a running program that is using the hardware counter library by attaching dbx to the process, the experiment may be corrupted.
To view a list of all available counters, run the collect command with no arguments.
Hardware counter overflow profiling records data when a SIGEMT is delivered to the target. It causes dilation to process that signal, and unwind the call stack. Unlike clock-based profiling, for some hardware counters, different parts of the program might generate events more rapidly than other parts, and show dilation in that part of the code. Any part of the program that generates such events very rapidly might be significantly distorted. Similarly, some events might be generated in one thread disproportionately to the other threads.
You can collect data on descendant processes subject to some limitations.
If you want to collect data for all descendant processes that are followed by the Collector, you must use the collect command with the one of the following options:
-F on option enables you to collect data automatically for calls to fork and its variants and exec and its variants.
-F all option causes the Collector to follow all descendant processes, including those due to calls to system, popen, and sh.
-F '=regexp' option enables data to be collected on all descendant processes whose name or lineage matches the specified regular expression.
See Experiment Control Options for more information about the -F option.
You can collect data on Java programs subject to the following limitations:
You should use a version of the Java 2 Platform, Standard Edition (J2SE) no earlier than 1.5.0_03. By default, the collect command uses the path where the J2SE was installed by the Sun Studio installer, if any. You can override this default path by setting either the JDK_HOME environment variable or the JAVA_PATH environment variable. The Collector verifies that the version of java it finds in these environment variables is an ELF executable, and if it is not, an error message is printed, indicating which environment variable was used, and the full path name that was tried.
You must use the collect command to collect data. You cannot use the dbx collector subcommands or the data collection capabilities of the IDE.
Applications that create descendant processes that run JVM software cannot be profiled.
If you want to use the 64-bit JVM software, you must use the -j on flag and specify the 64-bit JVM software as the target. Do not use java -d64 to collect data using the 64-bit JVM software. If you do so, no data is collected.
Java profiling uses the Java Virtual Machine Tools Interface (JVMTI), which can cause some distortion and dilation of the run.
For clock-based profiling and hardware counter overflow profiling, the data collection process makes various calls into the JVM software, and handles profiling events in signal handlers. The overhead of these routines, and the cost of writing the experiments to disk will dilate the runtime of the Java program. Such dilation is typically less than 10%.
For synchronization tracing, data collection uses other JVMTI events, which causes dilation in proportion to the amount of monitor contention in the application.