how to collect information regarding function calls in run time?