1. 01 Feb, 2017 7 commits
    • 4ast's avatar
      Merge pull request #928 from goldshtn/tp-data-loc · 4a57f4dd
      4ast authored
      Support for __data_loc tracepoint fields
      4a57f4dd
    • Sasha Goldshtein's avatar
      tplist: Don't ignore __data_loc fields · 3ea6eee8
      Sasha Goldshtein authored
      3ea6eee8
    • Sasha Goldshtein's avatar
      c6aaaed1
    • Sasha Goldshtein's avatar
      cc: Support for __data_loc tracepoint fields · b9545a5c
      Sasha Goldshtein authored
      `__data_loc` fields are dynamically sized by the kernel at
      runtime. The field data follows the tracepoint structure entry,
      and needs to be extracted in a special way. The `__data_loc` field
      itself is a 32-bit value that consists of two 16-bit parts: the
      high 16 bits are the length of the data, and the low 16 bits are
      the offset of the data from the beginning of the tracepoint
      structure. From a cursory look, there are >200 tracepoints in
      recent kernels that have this kind of field.
      
      This patch fixes `tp_frontend_action.cc` to recognize and emit
      `__data_loc` fields correctly, as 32-bit opaque fields. Then, it
      introduces two helper macros:
      
      `TP_DATA_LOC_READ(dst, field)` reads from `args->field` by finding
      the right offset and length and emitting the `bpf_probe_read`
      required to fetch the data. This will only work with new kernels.
      
      `TP_DATA_LOC_READ_CONST(dst, field, length)` takes a user-specified
      length rather than finding it from `args->field`. This will work
      on older kernels, where the BPF verifier doesn't allow non-constant
      sizes to be passed to `bpf_probe_read`.
      b9545a5c
    • 4ast's avatar
      Merge pull request #918 from derek0883/mybcc · b77915df
      4ast authored
      Handling multiple concurrent probe users.
      b77915df
    • Derek's avatar
      enum bpf_probe_attach_type to CAPITAL · 227b5b99
      Derek authored
      227b5b99
    • Derek's avatar
      undo rebase · a112514c
      Derek authored
      a112514c
  2. 31 Jan, 2017 10 commits
  3. 30 Jan, 2017 4 commits
  4. 29 Jan, 2017 2 commits
  5. 26 Jan, 2017 1 commit
  6. 24 Jan, 2017 2 commits
  7. 23 Jan, 2017 1 commit
    • Derek's avatar
      Handling multiple concurrent probe users. · 739581f8
      Derek authored
      Event naming pattern changed to $(eventname)_bcc_$(pid)
      Detect /sys/kernel/debug/tracing/instances in bpf_attach_probe,
      if it exist, then will per-instance event, if failed the make global
      event instance as same as before.
      739581f8
  8. 22 Jan, 2017 1 commit
  9. 21 Jan, 2017 2 commits
  10. 20 Jan, 2017 3 commits
  11. 17 Jan, 2017 7 commits
    • 4ast's avatar
      Merge pull request #911 from goldshtn/trace-params-signature · 3cc4c0a2
      4ast authored
      trace: Allow function signatures in uprobes and kprobes
      3cc4c0a2
    • 4ast's avatar
      Merge pull request #909 from goldshtn/tp-str-fixes · e30eaecd
      4ast authored
      trace, tplist, argdist: UDST probe miscellaneous fixes
      e30eaecd
    • Sasha Goldshtein's avatar
      trace: Allow function signatures in uprobes and kprobes · 23e72b89
      Sasha Goldshtein authored
      §`trace` now allows uprobes and kprobes to have function signatures,
      which means function parameters can be named and typed, rather than
      relying on the positional arg1, arg2, etc. arguments. This also
      enables structure field access, which is impossible with the unnamed
      arguments due to rewriter limitations.
      
      The example requested by @brendangregg, which now works, is the
      following:
      
      §Â```
      PID    TID    COMM         FUNC             -
      777    785    automount    SyS_nanosleep    sleep for 500000000 ns
      777    785    automount    SyS_nanosleep    sleep for 500000000 ns
      777    785    automount    SyS_nanosleep    sleep for 500000000 ns
      777    785    automount    SyS_nanosleep    sleep for 500000000 ns
      ^C
      ```
      23e72b89
    • Sasha Goldshtein's avatar
      dcf1675a
    • Sasha Goldshtein's avatar
      trace: Use correct argument index and tgid for filters · b630092f
      Sasha Goldshtein authored
      `trace` would use the incorrect argument index for USDT probes when
      filtering specifically, e.g. `trace u:lib:tp (arg1 != 0) ...` would
      actually use the type of the 2nd argument, and not the 1st argument
      for the type of the filter variable in the generated program. This
      could cause compilation errors or subtle bugs where the data would
      be either extended or contracted to fit the wrong argument's type.
      
      Additionally, `trace` would use the pid (thread id, `-L`) filter
      with the `attach_uprobe` API, which expects a tgid (process id).
      As a result, incorrect filtering would happen.
      b630092f
    • Sasha Goldshtein's avatar
    • Sasha Goldshtein's avatar
      argdist: Generated streq-helper to ignore null terminator · fd44cd24
      Sasha Goldshtein authored
      Oftentimes we want to use the STRCMP helper to compare strings that
      are not null-terminated, e.g. in USDT probes this often happens.
      Ignore the null terminator (i.e. loop until the last character
      excluding the null terminator).
      fd44cd24