Skip to content
Snippets Groups Projects
  1. Jan 16, 2019
  2. Mar 04, 2017
    • Paul Chaignon's avatar
      Travis CI build to check compliance with PEP8 (#987) · 956ca1c8
      Paul Chaignon authored
      * Travis CI build to check compliance with PEP8
      
      * argdist: linter cleanup
      
      * dbslower: linter cleanup
      
      * dbstat: linter cleanup
      
      * memleak: linter cleanup
      
      * syscount: linter cleanup
      
      * tplist: linter cleanup
      
      * trace: linter cleanup
      
      * ucalls: linter cleanup
      
      * uflow: linter cleanup
      
      * ugc: linter cleanup
      
      * uobjnew: linter cleanup
      
      * ustat: linter cleanup
      956ca1c8
  3. Mar 03, 2017
  4. Feb 09, 2017
  5. Feb 01, 2017
  6. Jan 17, 2017
    • Sasha Goldshtein's avatar
      tplist: Print one-based location and argument indices · 50486ff5
      Sasha Goldshtein authored
      The `trace` and `argdist` tools expect location and argument indices
      to start at 1 -- the first argument is arg1, and so on. The `tplist`
      tool now prints UDST argument indices (and location indices, for
      consistency) as 1-based as well.
      50486ff5
  7. Oct 18, 2016
    • Sasha Goldshtein's avatar
      Tools lint cleanup (#764) · f41ae861
      Sasha Goldshtein authored
      * argdist: linter cleanup
      
      * cpudist: linter cleanup
      
      * execsnoop: linter cleanup
      
      * funclatency: linter cleanup
      
      * gethostlatency: linter cleanup
      
      * hardirqs: linter cleanup
      
      * memleak: linter cleanup
      
      * mountsnoop: linter cleanup
      
      * offcputime: linter cleanup
      
      * softirqs: linter cleanup
      
      * solisten: linter cleanup and u+x mode
      
      * stacksnoop: linter cleanup
      
      * tplist: linter cleanup
      
      * trace: linter cleanup
      f41ae861
  8. Oct 06, 2016
    • 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
  9. Sep 27, 2016
    • 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
  10. May 05, 2016
  11. Mar 28, 2016
    • Sasha Goldshtein's avatar
      argdist, trace, and tplist support for USDT probes · 3e39a08a
      Sasha Goldshtein authored
      These tools now support USDT probes with the 'u:provider:probe' syntax.
      Probes in a library or process can be listed with 'tplist -l LIB' or 'tplist -p PID'.
      Probe arguments are also parsed and available in both argdist and trace as arg1,
      arg2, etc., regardless of the probe attach location.
      
      The same USDT probe can be used at multiple locations, which means the attach infra-
      structure must probe all these locations. argdist and trace register thunk probes
      at each location, which call a central probe function (which is static inline) with
      the location id (__loc_id). The central probe function checks the location id to
      determine how the arguments should be retrieved -- this is location-dependent.
      
      Finally, some USDT probes must be enabled first by writing a value to a memory
      location (this is called a "semaphore"). This value is per-process, so we require a
      process id for this kind of probes.
      
      Along with trace and argdist tool support, this commit also introduces new classes
      in the bcc module: ProcStat handles pid-wrap detection, whereas USDTReader,
      USDTProbe, USDTProbeLocation, and USDTArgument are the shared USDT-related
      infrastructure that enables enumeration, attachment, and argument retrieval for
      USDT probes.
      3e39a08a
  12. Mar 20, 2016
Loading