1. A computer-implemented method for recording a trace of call frames during a simulation of a circuit design with a testbench, wherein the testbench comprises a plurality of subroutines, wherein each subroutine of the plurality of subroutines comprises a code section, the method comprising using a computer to perform the steps of: a. for each subroutine of the plurality of the subroutines, providing a first call-back routine which is called before the code section of the subroutine is executed; b. Starting the simulation of the circuit design with the testbench; c. For each subroutine of the plurality of the subroutines, recording a first simulation time at which the corresponding first call-back is executed, a first tag indicating the beginning of the subroutines, and the identification of the subroutines in a beginning call frame when the corresponding first call-back routine is called, and wherein the trace of call frames is formed according to the order of the call-backs called one by one during the execution of the testbench at their respective simulation times.