1. 15 Jan, 2017 2 commits
  2. 16 Dec, 2016 1 commit
  3. 06 Oct, 2016 1 commit
    • Sasha Goldshtein's avatar
      tplist: Print USDT locations and arguments (#734) · 6e91a74b
      Sasha Goldshtein authored
      * cc: Add USDT location and argument reporting
      
      libbcc now exposes USDT location and argument information using
      two new APIs: `bcc_usdt_get_location` and `bcc_usdt_get_argument`.
      
      * python: Retrieve USDT locations and arguments
      
      Add wrappers in the libbcc.py file to access the new APIs for
      retrieving USDT location and argument information. Also add
      high-level classes in usdt.py to access this information and
      format arguments and locations in a shape suitable for display.
      
      * tplist: Print USDT locations and arguments
      
      Add super-verbose mode (-vv) to tplist where it prints USDT locations
      and arguments including full detail on registers, offsets, and global
      identifier offsets.
      6e91a74b
  4. 28 Sep, 2016 1 commit
  5. 27 Sep, 2016 1 commit
    • Sasha Goldshtein's avatar
      Fix argdist, trace, tplist to use the libbcc USDT support (#698) · 69e361ac
      Sasha Goldshtein authored
      * Allow argdist to enable USDT probes without a pid
      
      The current code would only pass the pid to the USDT
      class, thereby not allowing USDT probes to be enabled
      from the binary path only. If the probe doesn't have
      a semaphore, it can actually be enabled for all
      processes in a uniform fashion -- which is now
      supported.
      
      * Reintroduce USDT support into tplist
      
      To print USDT probe information, tplist needs an API
      to return the probe data, including the number of
      arguments and locations for each probe. This commit
      introduces this API, called bcc_usdt_foreach, and
      invokes it from the revised tplist implementation.
      
      Although the result is not 100% identical to the
      original tplist, which could also print the probe
      argument information, this is not strictly required
      for users of the argdist and trace tools, which is
      why it was omitted for now.
      
      * Fix trace.py tracepoint support
      
      Somehow, the import of the Perf class was omitted
      from tracepoint.py, which would cause failures when
      trace enables kernel tracepoints.
      
      * trace: Native bcc USDT support
      
      trace now works again by using the new bcc USDT support
      instead of the home-grown Python USDT parser. This
      required an additional change in the BPF Python API
      to allow multiple USDT context objects to be passed to
      the constructor in order to support multiple USDT
      probes in a single invocation of trace. Otherwise, the
      USDT-related code in trace was greatly simplified, and
      uses the `bpf_usdt_readarg` macros to obtain probe
      argument values.
      
      One minor inconvenience that was introduced in the bcc
      USDT API is that USDT probes with multiple locations
      that reside in a shared object *must* have a pid
      specified to enable, even if they don't have an
      associated semaphore. The reason is that the bcc USDT
      code figures out which location invoked the probe by
      inspecting `ctx->ip`, which, for shared objects, can
      only be determined when the specific process context is
      available to figure out where the shared object was
      loaded. This limitation did not previously exist,
      because instead of looking at `ctx->ip`, the Python
      USDT reader generated separate code for each probe
      location with an incrementing identifier. It's not a
      very big deal because it only means that some probes
      can't be enabled without specifying a process id, which
      is almost always desired anyway for USDT probes.
      
      argdist has not yet been retrofitted with support for
      multiple USDT probes, and needs to be updated in a
      separate commit.
      
      * argdist: Support multiple USDT probes
      
      argdist now supports multiple USDT probes, as it did
      before the transition to the native bcc USDT support.
      This requires aggregating the USDT objects from each
      probe and passing them together to the BPF constructor
      when the probes are initialized and attached.
      
      Also add a more descriptive exception message to the
      USDT class when it fails to enable a probe.
      69e361ac
  6. 23 Jul, 2016 1 commit
  7. 06 May, 2016 6 commits
  8. 28 Apr, 2016 3 commits