Patent ID: 7774769

Claim:
A method comprising: partitioning a program segment into a plurality of stages including at least a first stage and a second stage, each of the first and second stages to be performed on a different processor; determining a live set including at least one variable and control flow information alive at a boundary between the first stage and the second stage, the control flow information corresponding to at least one control object assigned to a control value in the first stage; receiving trace selection information to identify a trace in the first stage for analysis; analyzing the trace to determine a trace-specific portion of the live set to transmit from the first stage to the second stage, the trace-specific portion of the live set comprising at least one trace-specific variable and control flow information from the live set, the analyzing including determining the at least one trace-specific variable by determining if a definition point for the at least one trace-specific variable in the first stage is present in the trace and the at least one trace-specific variable reaches a use point in the second stage that is not control dependent on a conditional instruction in the first stage, the analyzing further including determining the at least one trace-specific control flow information by determining if the corresponding control object is present in the trace; inserting first code in the first stage to determine if the trace is taken; and inserting second code in the first stage to transmit the trace-specific portion of the live set if the trace is taken; and controlling the first stage to transmit the trace-specific portion of the live set to the second stage via a communication channel coupled between the first and second stages using the second code and not to transmit a trace-specific portion of the live set for an alternative trace in the first stage when the alternative trace is not taken as determined by the first code.