1. 27 Jul, 2016 5 commits
    • Brenden Blanco's avatar
      Merge pull request #632 from markdrayton/probe-strings · 60b082e0
      Brenden Blanco authored
      Probe registration fixes
      60b082e0
    • Mark Drayton's avatar
      Remove asserts on str probe names · 7c148427
      Mark Drayton authored
      `open_kprobes` is a dict of open kprobes. Its keys are strings for normal
      probes and a tuple for perf buffers. Normal probes need unregistering on script
      exit; perf buffers do not. `cleanup` currently looks for string keys
      (specifically type `str`) when working out what to unregister, which is a bit
      brittle -- in Python2 strings can be both native `str` and `unicode`, depending
      what exactly was passed to `attach-*/detach_*` and whether `from __future__
      import unicode_literals` is used (e.g. #623).
      
      This diff makes the API more relaxed by casting the probe name to `str` to
      match the expectations of `cleanup`. This works in py2 (with and without
      unicode_literals) and py3.
      7c148427
    • Mark Drayton's avatar
      py3 probe registration compatibility fixes · 1d6a31b1
      Mark Drayton authored
      * rework `_get_kprobe_functions` to avoid unclosed blacklist warning
      * rework `cleanup` to avoid changing size of dict while iterating
      * make handling return of `bpf_function_name` work in py2 and py3
      1d6a31b1
    • Brenden Blanco's avatar
      Merge pull request #630 from chantra/cachetop_sort_ui · 5938394e
      Brenden Blanco authored
      [cachetop] Display sorting field and order.
      5938394e
    • Brenden Blanco's avatar
      Merge pull request #631 from brendangregg/refguide · 023d0527
      Brenden Blanco authored
      add a reference guide
      023d0527
  2. 26 Jul, 2016 5 commits
  3. 25 Jul, 2016 5 commits
  4. 24 Jul, 2016 6 commits
  5. 23 Jul, 2016 4 commits
  6. 22 Jul, 2016 1 commit
  7. 19 Jul, 2016 1 commit
  8. 18 Jul, 2016 2 commits
  9. 17 Jul, 2016 2 commits
    • Mark Drayton's avatar
      Move open_{kprobes,uprobes,tracepoints} into BPF object · cb679d7b
      Mark Drayton authored
      * for #605, this diff moves probe storage from the BPF module to the BPF object,
        letting each instantiation clean up its own probes. A module-level counter
        for all open probes is provided for the quota check. It also adds a
        `cleanup()` function to force cleanup before the `atexit` handler runs.
      
      * for #614, it removes the `len(open_kprobes) == 0` check that prevented more
        than one autoload probe working. It fixes the tests that this change breaks by
        calling the `cleanup()` function added.
      cb679d7b
    • Mark Drayton's avatar
      Store kprobes with string keys, fix num_open_kprobes · 8fa8c0e8
      Mark Drayton authored
      Prior to this diff we used inconsistent types for keys in `open_kprobes`. The
      results from the regex match (`attach_kprobe(event_re=..)`) and the automatic
      `kprobe__` features were passed through `str.decode()`, yielding unicode keys,
      but specific matches (i.e. from `attach_kprobe(event=..)`) were stored with
      string keys passed down from the caller. Only probes under string keys were
      released in `cleanup_kprobes`, leaving attached probes on program exit.
      
      This diff makes all the keys regular strings. I erred on the side of using
      regular strings over `str.decode()`ing them because a) this data isn't passed
      outside of Python, b) it's more Python 3 compatible (there is no `.decode()` on
      a regular string object in Python 3 so such a change would ultimately need
      removing again).
      
      I also cleaned up a few other things:
      
      * removed the call to `awk` for getting probable functions
      
      * removed the `isinstance` checks when cleaning uprobes/tracepoints -- we
        should only have string keys in these dicts
      
      * made `num_open_kprobes` skip the perf_events buffers. People likely use this
        to check that the right number of probes have been placed so counting
        perf_events buffers doesn't make sense here
      8fa8c0e8
  10. 14 Jul, 2016 2 commits
  11. 13 Jul, 2016 5 commits
  12. 12 Jul, 2016 2 commits