On 7/29/15 1:00 PM, pi3orama wrote:
I was wondering if you could give us a hint on adding BPF specific builtins?

Doesn't like other machines, currently there's no Builtins.def for BPF to hold
builtins for that specific target. If we start creating such builtins, we can 
bring
more there. One builtins I want to see should be __builtin_bpf_strcmp(char*, 
char*),
with that we can filter events base on name of a task. What I really need is 
filtering
events based on comm of the main thread, which should be useful on Android
since in Android name of working threads are always something like "Binder_?",
only the main threads names are meaningful. But let's work on strcmp first.

Currently there are 4 of them in IntrinsicsBPF.td
but I don't see how strcmp can work with current no-loops restriction.
As an alternative to filter binder threads you can use
memcmp(ptr, "Binder_", 6) since it will get unrolled fully.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to