1. 03 Mar, 2017 1 commit
    • Sasha Goldshtein's avatar
      cc: Don't parse the same module multiple times for USDT probes · 69948a69
      Sasha Goldshtein authored
      If a module has more than one executable region, it is reported
      multiple times by `bcc_procutils_each_module`. This is fine for
      symbol resolution, but we don't need the duplicates for parsing
      the ELF header looking for USDT probes: the first appearance of
      that module is enough. This also prevents issues with the same
      probe appearing multiple times with the same location, which
      results in an invalid program when reading USDT arguments.
      
      Fix by storing each visited module in the USDT::Context class,
      and ignoring modules that were already visited.
      69948a69
  2. 02 Mar, 2017 1 commit
  3. 01 Mar, 2017 1 commit
  4. 28 Feb, 2017 5 commits
    • 4ast's avatar
      Merge pull request #1012 from goldshtn/buildid-fix · 4d0d4308
      4ast authored
      cc: Fix SEGV when there is no build-id section
      4d0d4308
    • 4ast's avatar
      Merge pull request #1014 from iovisor/test-debuginfo-fix · 88abfc68
      4ast authored
      Fix long running test_debuginfo and python3 fix
      88abfc68
    • Brenden Blanco's avatar
      Fix long running test_debuginfo and python3 fix · 7b35436a
      Brenden Blanco authored
      Make sure subclass calls super().tearDown to clean up dummy process.
      Also, fixup a python3 str.encode().
      
      Fixes: #1013
      Signed-off-by: default avatarBrenden Blanco <bblanco@gmail.com>
      7b35436a
    • Sasha Goldshtein's avatar
      cc: Retry symbol resolution using perfmap · 8a3fb6cc
      Sasha Goldshtein authored
      When a symbol lies within a module, and that module doesn't have
      debuginfo (or doesn't even have an ELF header), the symbol will
      always be resolved as [unknown]. However, the /tmp/perf-PID.map
      (perf map) for that process might actually have an entry for that
      symbol, if it was dynamically generated by some external tool.
      This commit changes the resolution process such that if the desired
      address lies in a module but that module doesn't have debuginfo,
      we keep trying to resolve it in subsequent modules (including the
      perf map). If we resolve it successfully using the perf map, the
      reported symbol information will have the original module's name,
      so we don't lose fidelity.
      
      The motivation for this change is the way symbols work with .NET
      Core on Linux. The runtime binaries are compiled ahead-of-time to
      native code, but do not have debuginfo. There is an external tool,
      which generates a file similar to a perf map (albeit with relative
      addresses) for these binaries. This file can then be merged into
      the main perf map for the process and used for symbol resolution,
      but only if we keep trying to use the perf map when the symbol is
      in a previously-seen module.
      8a3fb6cc
    • Brenden Blanco's avatar
      Merge pull request #997 from markdrayton/perf-buffer-size · 3febfa49
      Brenden Blanco authored
      Make perf ring buffer size configurable
      3febfa49
  5. 27 Feb, 2017 1 commit
    • Mark Drayton's avatar
      Make perf ring buffer size configurable · 5f5687e4
      Mark Drayton authored
      As discussed in #966, this PR makes the size of the ring buffer used to send
      data to userspace configurable. It changes the Python, Lua and C++ APIs to
      expose this knob.
      
      It also defaults the buffer size to a larger value (64 pages per CPU, an 8x
      increase) for several tools which produce a lot of output, as well as making it
      configurable in `trace` via a `-b` flag.
      5f5687e4
  6. 26 Feb, 2017 3 commits
  7. 23 Feb, 2017 4 commits
  8. 22 Feb, 2017 2 commits
  9. 21 Feb, 2017 19 commits
  10. 20 Feb, 2017 3 commits
    • 4ast's avatar
      Merge pull request #992 from goldshtn/trace-argdist-usdt-arg · 0af31efb
      4ast authored
      trace, argdist: Treat small USDT arguments correctly
      0af31efb
    • Sasha Goldshtein's avatar
      trace, argdist: Treat small USDT arguments correctly · 3a5256f1
      Sasha Goldshtein authored
      trace and argdist currently only work correctly for USDT arguments
      whose size is exactly 8 bytes. Smaller types, such as chars, shorts,
      ints (signed or unsigned) are not treated correctly. The reason is
      that the produced program would invoke the `bpf_usdt_readarg` helper
      with the address of a u64 local variable, and then cast that variable
      to the user-specified type derived from the format string. However,
      the `bpf_usdt_readarg` rewriting then passes `sizeof(u64)` to the
      generated `bpf_..._readarg` macro, which then fails to read anything
      because the provided size doesn't match the argument size it knows
      about.
      
      The fix is fairly easy: instead of declaring a u64 unconditionally
      and reading into that variable with `bpf_usdt_readarg`, declare a
      variable that has the correct type according to what we know about
      the USDT probe.
      3a5256f1
    • 4ast's avatar
      Merge pull request #989 from pchaigno/fix-fd-leak · 203fd276
      4ast authored
      Fix file descriptor leak
      203fd276