OSDN Git Service

perf augmented_syscalls: Filter on a hard coded pid
authorArnaldo Carvalho de Melo <acme@redhat.com>
Tue, 6 Nov 2018 18:23:40 +0000 (15:23 -0300)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Wed, 21 Nov 2018 15:00:31 +0000 (12:00 -0300)
commit55f127b43143363d000165c7cb72e4b95de1380d
treedf0387f70dfc0153b74dd1b7f07d44500f3e314c
parent1475d35c4a6174d4ec633b9af5713e9770b3ac0d
perf augmented_syscalls: Filter on a hard coded pid

Just to show where we'll hook pid based filters, and what we use to
obtain the current pid, using a BPF getpid() equivalent.

Now we need to remove that hardcoded PID with a BPF hash map, so that we
start by filtering 'perf trace's own PID, implement the --filter-pid
functionality, etc.

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-oshrcgcekiyhd0whwisxfvtv@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/examples/bpf/augmented_raw_syscalls.c