×

Low-overhead method and apparatus for collecting function call trace data

  • US 8,910,124 B1
  • Filed: 10/31/2011
  • Issued: 12/09/2014
  • Est. Priority Date: 10/31/2011
  • Status: Active Grant
First Claim
Patent Images

1. A method for on-demand call-trace profiling an application having source code to be executed on a system, the method comprising:

  • compiling a binary object from the source code using a processor while including a plurality of placeholder memory ranges in the compiled binary object, each placeholder memory range being of a size suitable for inserting a call-trace profiling function call and each placeholder memory range including a no operation (NOP) instruction; and

    providing a set of code modification instructions configured to modify the compiled binary object while it is being executed, the instructions including;

    inserting a call to a first call-trace profiling function in at least one of the plurality of placeholder memory ranges in place of the NOP instruction;

    replacing a return instruction and a subsequent NOP instruction with a jump instruction associated with a call to a second call-trace profiling function;

    logging call-trace profiling data using the inserted call-trace profiling function calls;

    and removing the inserted call-trace profiling function call after logging the call-trace profiling data including replacing the removed call-trace profiling function call with the NOP instruction and replacing the jump instruction with the return instruction and the subsequent NOP instruction.

View all claims
  • 2 Assignments
Timeline View
Assignment View
    ×
    ×