This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
Re: Hashtable
arkady.miasnikov wrote:
> I am trying to implement full bypass of the code generated by the
> SystemTap in some special cases. [...]
OK, interesting.
> My goal is to be able to write code like this:
> probe syscall.dup2
> { /* bypass */ /* arg: oldfd */
> printk(KERN_ALERT "tid=%d oldfd=%d\n", current->pid, l->l_oldfd);
> // Unmanaged C code
> }
So like an embedded-C probe handler?
> [...] When generating the code I add the relevant dwarf_tvar_get_
> calls and initialize "local" variables in the context
> structure. Because the probes I am targeting are very short and simple
> and do not involve nested calls I shortcut lot of variables copying.
How much more efficient can this get, beyond
function foo (l) %{
STAP_PRINTF ("tid=%d oldfd=%d\n", current->pid, STAP_ARG_l);
%}
probe syscall.dup2 { foo ($oldfd) }
? Which parts of the latter can we elide? Could we improve the
translator so that this elision can be done for general systemtap
scripts, not just your special case?
- FChE