Skip to content
Snippets Groups Projects
  1. Jan 16, 2019
  2. Jan 03, 2019
  3. Aug 16, 2017
  4. Apr 20, 2017
    • Brenden Blanco's avatar
      Disable non-static function calls · 3f28e7bc
      Brenden Blanco authored
      
      Compiled BPF programs must consist of a single contiguous code block,
      meaning trying to call other function entry points (besides the
      kernel-defined helpers) is not possible. The bcc frontend didn't
      explicitly prohibit this, even though the program would fail to
      compile/load. Add an explicit check and error message.
      
      Fixes: #653
      Signed-off-by: default avatarBrenden Blanco <bblanco@gmail.com>
      3f28e7bc
  5. Mar 29, 2017
  6. Feb 15, 2016
  7. Jan 27, 2016
    • Brenden Blanco's avatar
      Updates to use cmake GLOB and libbcc.so.0 in python init · 5bd0eb21
      Brenden Blanco authored
      
      In order not to miss some files in the tools and examples source
      directories, use cmake file(GLOB) to collect relevant files. To ease the
      implementation, move all tools to be .py suffixed in the source, but
      sans-suffix in the installation (same as before)
      
      In addition, to prevent future API breakage confusion (though of course
      that may still happen), use CDLL("libbcc.so.0") in the bcc __init__.py.
      
      Fixes: #317
      Signed-off-by: default avatarBrenden Blanco <bblanco@plumgrid.com>
      5bd0eb21
  8. Jan 14, 2016
  9. Sep 03, 2015
  10. Aug 26, 2015
  11. Aug 24, 2015
    • Brenden Blanco's avatar
      Fix map.clear() usage for array type maps · 8e40c235
      Brenden Blanco authored
      
      Calling delete on an array type map entry does not have an effect.
      Instead, the entry needs to be zeroed out, since the array slot always
      exists. To avoid unnecessary calls to update(), only call update() when
      the map type is array-like. The type was not exposed to python up until
      now, so add it.
      
      Signed-off-by: default avatarBrenden Blanco <bblanco@plumgrid.com>
      8e40c235
  12. Aug 20, 2015
  13. Aug 19, 2015
    • Brenden Blanco's avatar
      Change API of attach_kprobe to take a name argument · 5eef65e6
      Brenden Blanco authored
      
      Per feedback on the attach_kprobe api, change up the arguments to remove
      the load_func that typically preceeds the call. Instead, move this
      inside the attach_kprobe implementation. Also, this makes attach_kprobe
      need to be non-static. The same applies to attach_kretprobe.
      
      Old:
      fn = b.load_func("hello", BPF.KPROBE)
      BPF.attach_kprobe(fn, "sys_clone")
      
      New:
      b.attach_kprobe(event="sys_clone", fn_name="hello")
      
      Note that the kwarg style is not required, but I fixed up the current
      usages to provide readability.
      
      Signed-off-by: default avatarBrenden Blanco <bblanco@plumgrid.com>
      5eef65e6
  14. Aug 18, 2015
Loading