fche changed the topic of #systemtap to: http://sourceware.org/systemtap; email systemtap@sourceware.org if answers here not timely, conversations may be logged
yogananth has quit [Ping timeout: 268 seconds]
sapatel has quit [Ping timeout: 268 seconds]
__positron has joined #systemtap
hpt has joined #systemtap
<__positron>
I am running this one-liner `sudo stap -e 'probe kernel.function("dequeue_skb") { printf("[%s] func: %s\n", execname(), probefunc()); }'` and I see a lot of `[ksoftirqd/0] func: __qdisc_run`, where I don't even probe this `__qdisc_run` function.
<fche>
__positron, [man function::probefunc] may explain
<fche>
it does an address-to-symbol-table lookup
<fche>
you probably want ppfunc() instead
<__positron>
Thank you fche. using `ppfunc` solved it. Can I take it as, I should _always_ use `ppfunc` and not `probefunc`?
<fche>
pretty much
<fche>
though
<fche>
probefunc() could be handy if you are using e.g. probe timer.profile() and you don't know where you ended up
<__positron>
I see. So, in my case, was `dequeue_skb` inlined inside `__qdisc_run` function which resulted in address-to-symbol lookup returning the latter instead of the former?
<fche>
I believe so
<fche>
you can check e.g. stap -L 'kernel.function("dequeue_skb").*'
<__positron>
ok. Looks like it. `__qdisc_run` calls an inlined function `qdisc_restart` which in turn calls `dequeue_skb`
<__positron>
These are hidden gems. Thank you. I run a custom kernel. I thought, something was broken with my kernel.
<fche>
righto
<fche>
while our man pages are not complete, it's always worth a man -k probefunc kind of query
<__positron>
are these subtleties documented somewhere (other than man pages)? I did a perfunctory look at the manual https://sourceware.org/systemtap/langref.pdf . Sadly, I found only one instance of `probefunc` and no instance of `ppfunc`. I'd be happy to send a PR if the manual's source is open.
<fche>
oh of course it's open :)
<fche>
I kind of wish we didn't have so much overlap between the documents
<fche>
the langref part to be honest should be just in the stap man page
<fche>
and should leave tapset function documentation to ... the other man pages