Patent ID: 7441234

Claim:
In a computing system that uses trace events to describe the runtime behavior of executing software code, wherein events are included in the software code during development to track execution of one or more developer defined logical operations, wherein the logical operations are arbitrarily portions of the software that a developer chooses to observe for a tracing purpose, each of the logical operations being associated with a correlation identifier, a method of correlating, during runtime, the one or more logical operations associated with one or more trace events to facilitate analysis of the one or more trace events based on how logical operations associated with the one or more trace events are related to the logical operation associated with any other trace event, the method comprising acts of: prior to execution of the software code: inserting one or more events, by the developer, into the software source code to indicate points within the software code trace for subsequent analysis; and defining logical operations within the software code: and during the execution of the software code: creating a correlation identifier stack for maintaining correlation identifiers received within the executing software code, wherein the correlation identifiers stack comprises a hierarchy of correlation identifiers with each correlation identifier indicating a logical operation being traced at a given point in time; creating a trace log for storing trace event information, wherein the trace log maintains trace events generated during the execution of the programs and is subsequently utilized to analyze the execution of the software code based on the logical operation relationship information indicated by the logged correlation identifier stacks and the logged event payloads, and wherein the trace log is created by, for each occurrence of a trace event, acts comprising: receiving either a correlation identifier that marks the occurrence of a logical operation within the executing software code, or receive an indication that the logical operation has ended within the executing software code; if the correlation identifier is received, updating the correlation identifier stack by adding the received correlation identifier to the correlation identifier stack; if the indication that the logical operation has ended is received, updating the correlation identifier stack by removing a correlation identifier associated with the logical operation that ended; subsequent to updating the correlation identifier stack, generating a trace event that comprises both the correlation identifier stack and a trace event payload that describes runtime behavior of the executing software; and adding the trace event to the log.