bcc/python: Add support for API 'bpf_attach_perf_event_raw' in BPF python interface
authorAthira Rajeev <atrajeev@linux.vnet.ibm.com>
Mon, 26 Jul 2021 16:56:06 +0000 (12:56 -0400)
committerAthira Rajeev <atrajeev@linux.vnet.ibm.com>
Fri, 13 Aug 2021 11:20:40 +0000 (16:50 +0530)
commit38821fe299c7a39d1b410a9901038392aa26021f
tree39c5db6be4a7bcadb03c2f7e6173738c2e17fdf3
parent101304bb771b2d98e34e3957851fd2f77ec0c35b
bcc/python: Add support for API 'bpf_attach_perf_event_raw' in BPF python interface

Add python interface for attach_perf_event_raw to bcc.
The bpf_attach_perf_event_raw API provide flexibility to use
advanced features of perf events with BPF. Presently, this
API is available to use in BPF programs via C and C++ interface.
Patch enables support to use in python interface.

Patch also adds testcase under 'tests/python' which uses
the newly added python interface 'attach_perf_event_raw'.

Signed-off-by: Athira Rajeev <atrajeev@linux.vnet.ibm.com>
src/python/bcc/__init__.py
src/python/bcc/libbcc.py
tests/python/test_attach_perf_event.py [new file with mode: 0755]