Address some of Issue #16
authorBrenden Blanco <bblanco@plumgrid.com>
Wed, 27 May 2015 08:29:34 +0000 (01:29 -0700)
committerBrenden Blanco <bblanco@plumgrid.com>
Wed, 27 May 2015 08:29:34 +0000 (01:29 -0700)
commit414d614583af43d1a5a221438821e1a2e76590b7
tree5520b5742126d348cecbbc25220d3e485ce67c8a
parentc848e55784e18d1e9cd4b562d8017a278892c5fb
Address some of Issue #16

* Introduce Function object in bpf.py
 - prog load types (kprobe, socket, etc.) are independent
 - fd is a member of each function, to be used later (e.g. tail call table)
* Allow functions to be defined inline in the .py as a text argument
* Rename BPFProgram to BPFModule, which should make more sense

Signed-off-by: Brenden Blanco <bblanco@plumgrid.com>
12 files changed:
src/bpf.py
src/cc/CMakeLists.txt
src/cc/bpf_common.cc
src/cc/bpf_common.h
src/cc/bpf_module.cc [moved from src/cc/bpf_program.cc with 80% similarity]
src/cc/bpf_module.h [moved from src/cc/bpf_program.h with 90% similarity]
tests/jit/CMakeLists.txt
tests/jit/test1.py
tests/jit/test2.py
tests/jit/trace1.py
tests/jit/trace2.py
tests/jit/trace3.py