Patent ID: 7698602

Claim:
A method for generating full tracing in a private memory on a work unit basis, the method comprising: generating a set of trace data in the private memory, wherein generating the set of trace data includes source code having trace statements, wherein trace data based on the work unit includes one of an identifier and a layer to establish a start and an end of the work unit, wherein one of the identifier and the layer is specific to an application, and wherein the private memory includes a plurality of private trace tables; determining whether the work unit was successful; and selectively transferring, using a selection value, a subset of the set of trace data of the work unit to a shared trace table by one of writing minimal trace data to the shared trace table, if it is determined that the work unit was successful and writing a full set of trace data of the work unit to the shared trace table, if it is determined that one of errors, unusual conditions and hung work units occurred, wherein data collected in the shared trace table is reduced and a time period before trace data wraps is increased, wherein the subset of the set of trace data includes trace entries created while executing the work unit, wherein each trace entry created while executing the work unit contains a selection field for selecting which entries are transferred to the shared trace table, when the work unit completes, wherein the selection field is one of a numerical value and a bit mask, which will be compared to a work unit completion value, and wherein using the private memory and the shared trace table reduces memory cache contention.