Skip to content

Instantly share code, notes, and snippets.

@danmcd
Created August 20, 2019 19:29
Show Gist options
  • Save danmcd/becf0474be6df7ba00590bf8b6738f51 to your computer and use it in GitHub Desktop.
Save danmcd/becf0474be6df7ba00590bf8b6738f51 to your computer and use it in GitHub Desktop.
#!/usr/sbin/dtrace -FCs
treeclimb_export:entry
{
stack();
self->trace = 1;
}
treeclimb_export:return
/self->trace == 1/
{
printf("Returns 0x%llx", arg1);
exit(1);
}
vop_fid_pseudo:entry
/self->trace == 1/
{
print(*(args[0]));
print(stringof(args[0]->v_path));
}
vop_fid_pseudo:return
/self->trace == 1/
{
printf("Returns 0x%llx", arg1);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment