Skip to content

Instantly share code, notes, and snippets.

@nascheme
Created November 29, 2017 18:26
Show Gist options
  • Save nascheme/33e2ed4a02e37f66616c16f10da11760 to your computer and use it in GitHub Desktop.
Save nascheme/33e2ed4a02e37f66616c16f10da11760 to your computer and use it in GitHub Desktop.
probe process("./python").mark("import__find__load__start") {
modname = user_string($arg1);
printf("%s import start %s\n",
thread_indent(1), modname);
}
probe process("./python").mark("import__find__load__done") {
modname = user_string($arg1);
printf("%s import done %s\n",
thread_indent(1), modname);
}
probe process("./python").mark("function__entry") {
filename = user_string($arg1);
funcname = user_string($arg2);
lineno = $arg3;
printf("%s => %s in %s:%d\n",
thread_indent(1), funcname, filename, lineno);
}
probe process("./python").mark("function__return") {
filename = user_string($arg1);
funcname = user_string($arg2);
lineno = $arg3;
printf("%s <= %s in %s:%d\n",
thread_indent(-1), funcname, filename, lineno);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment