This part is really simple, if you have some basic knowledge about any programming language.
I would like to give two examples here, and for more information you could refer to .
probe begin
{
if (pid())
printf("%d:%s\n", pid(), execname());
else
printf("invalid pid\n");
exit();
}
probe begin
{
index = 0;
for (; index < 10; index++)
arr[index] = index;
exit();
}