Fix breakage in open_perf_buffer
authorBrenden Blanco <bblanco@plumgrid.com>
Wed, 17 Feb 2016 08:26:14 +0000 (00:26 -0800)
committerBrenden Blanco <bblanco@plumgrid.com>
Wed, 17 Feb 2016 08:28:58 +0000 (00:28 -0800)
commit0dd24416ccd64d0eb77e84274bd32d3ed27f4d7f
treea27002b5b4495c12c5e3d6f956b693ecbee2c85f
parentfe0360681251d97dac94aa131a5922b760365fe3
Fix breakage in open_perf_buffer

The previous commit for splitting table.py into a separate file lost
some required imports. Add those back.

In addition, add a test for open_perf_buffer, and take out the
compile-time check in libbpf.c for this feature.

I couldn't think of a good way to fix the PERF_COUNT_SW_BPF_OUTPUT
literal, so for now left it as a comment. A #define wouldn't work since
the eventual value comes from an enum (no #ifndef/#define/#endif
pattern).

Fixes: #391 #363
Signed-off-by: Brenden Blanco <bblanco@plumgrid.com>
src/cc/libbpf.c
src/python/bcc/__init__.py
src/python/bcc/table.py
tests/cc/test_array.py