1. A computer-readable, non-transitory storage medium storing a processing program that causes a computer to perform a trace process on the basis of a trace code during execution of a program, the trace process comprising: rewriting a first instruction described at a trace point in a function defined in the program to a second instruction which gives instructions to execute the trace code and storing the first instruction in a storage unit; executing the trace code on the basis of the second instruction at the time of execution at the trace point in the function; and replacing, at the time of executing a third instruction which calls the function and which is included in the trace code, the second instruction at the trace point in the function with the first instruction stored in the storage unit and performing the function.