in reply to Re: profiling XS routinesin thread profiling XS routines
To instrument code, use functions mentioned in https://stackoverflow.com/questions/49045742/how-to-use-oprofile-to-calculate-execution-time-of-a-part-of-c-program.