argdist: STRCMP helper function
authorSasha Goldshtein <goldshtn@gmail.com>
Mon, 17 Oct 2016 09:18:43 +0000 (02:18 -0700)
committerSasha Goldshtein <goldshtn@gmail.com>
Mon, 17 Oct 2016 09:18:43 +0000 (02:18 -0700)
commitc8f752f72727ae031f53b70d2a5694c1cbdd9935
treed0f6e1e8caf3be554bf963e2c594f77fe288678f
parentf4797b0c8d9fb8c95dd99d40776a4034890abf44
argdist: STRCMP helper function

argdist filter expressions can now use the STRCMP helper
function to compare strings. The first string must be a
compile-time constant literal string, and the second string
can be determined at runtime. This is a workaround until
BPF introduces a kernel builtin for strcmp.

Example:

```
argdist -H 'r:c:open(char *file):u64:$latency:STRCMP("test.txt",file)'
```
man/man8/argdist.8
tools/argdist.py
tools/argdist_example.txt