Re: [RFC PATCH tip 0/5] tracing filters with BPF

From: Alexei Starovoitov
Date: Thu Dec 05 2013 - 14:43:19 EST


On Thu, Dec 5, 2013 at 8:11 AM, Frank Ch. Eigler <fche@xxxxxxxxxx> wrote:
>
> ast wrote:
>
>>>[...]
>> Did simple ktap test with 1M alloc_skb/kfree_skb toy test from earlier email:
>> trace skb:kfree_skb {
>> if (arg2 == 0x100) {
>> printf("%x %x\n", arg1, arg2)
>> }
>> }
>> [...]
>
> For reference, you might try putting systemtap into the performance
> comparison matrix too:
>
> # stap -e 'probe kernel.trace("kfree_skb") {
> if ($location == 0x100 /* || $location == 0x200 etc. */ ) {
> printf("%x %x\n", $skb, $location)
> }
> }'

stap with one 'if': 1M skb alloc/free 200696 (usecs)
stap with 10 'if': 1M skb alloc/free 202135 (usecs)

so systemtap entry overhead is a bit higher than bpf and extra if-s
show the same progression as expected.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/