perf bpf: Add unistd.h to the headers accessible to bpf proggies
authorArnaldo Carvalho de Melo <acme@redhat.com>
Tue, 6 Nov 2018 18:21:45 +0000 (15:21 -0300)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Wed, 21 Nov 2018 15:00:30 +0000 (12:00 -0300)
commit1475d35c4a6174d4ec633b9af5713e9770b3ac0d
tree668d9e968513443764e7f30d78d486b6884da7ca
parentb1a9d7b0190119dad5b9b7841751b5a7586bbc8b
perf bpf: Add unistd.h to the headers accessible to bpf proggies

Start with a getpid() function wrapping BPF_FUNC_get_current_pid_tgid,
idea is to mimic the system headers.

Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Wang Nan <wangnan0@huawei.com>
Link: https://lkml.kernel.org/n/tip-zo8hv22onidep7tm785dzxfk@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/include/bpf/unistd.h [new file with mode: 0644]