struc Msg {
 int Length;
 ptr Address);

 void SendMsg(Msg SendThis);
 ...
#include "aprobe.h"
probe thread
{
   probe "SendMsg"
   {
    on_entry
      log($SendThis.Length, ap_GetCurrentTime());
    on_exit
      log(ap_GetCurrentTime());
    }
}

Example 3: Benchmarking the throughput of a SendMsg function.

Back to Article