SystemTap script to profile latency of functions
问题 My goal is to profile the execution time of each function in a kernel module. Using the sample scripts I saw online, I came up with the following script to fulfill my need. But occasionally I get negative values for calculated latencies. Although, they happen rarely but I guess that indicates something is wrong with my script. Can anyone help me with that please? probe module(@1).function(@2).call { begin = gettimeofday_ns() } probe module(@1).function(@2).return { if (begin>0) stats <<<