1. 18 May, 2018 4 commits
  2. 17 May, 2018 2 commits
  3. 16 May, 2018 3 commits
    • Teng Qin's avatar
      Add extra_flag option to bpf_attach_perf_event_raw · bf2513df
      Teng Qin authored
      The bpf_attach_perf_event_raw API is designed to provide maximum
      flexibility for people to use advanced features of Kernel Perf Events
      with BPF. Some times specifying flags is neccesary, such as if we want
      to use `PERF_FLAG_PID_CGROUP` to profile a container. This commit adds
      `extra_flag` option to C and C++ interface
      bf2513df
    • 4ast's avatar
      Merge pull request #1763 from iovisor/yhs_dev · 683c19a8
      4ast authored
      link with bpf-static library for bps
      683c19a8
    • Teng Qin's avatar
      Misc fixes for C++ USDT class (#1764) · cb5bc0e0
      Teng Qin authored
      * Add stream debug output for C++ USDT class
      
      This commit adds ability to output USDT class debug message to iostream
      
      * USDT::init() as public function
      
      It would be nice for users be able to call init() and see if the probe
      exists / well-formatted before sending them to BPF instance
      cb5bc0e0
  4. 15 May, 2018 2 commits
  5. 14 May, 2018 1 commit
    • Teng Qin's avatar
      Do not calculate syscall prefix proactively in C++ API (#1755) · db6e2931
      Teng Qin authored
      Currently do calculate the syscall prefix in BPF::init, which requires
      loading kallsyms etc. But a lot of times the functionality will not be
      used. This commit changes that we only calculate the syscall prefix the
      first time we call get_syscall_fnname
      
      Also change to use the KSym class directly for better destruct
      production
      db6e2931
  6. 11 May, 2018 2 commits
  7. 10 May, 2018 3 commits
  8. 09 May, 2018 3 commits
  9. 08 May, 2018 4 commits
    • Paul Chaignon's avatar
      Trace all external pointers passed through a first map (#1737) · ad2d0d9f
      Paul Chaignon authored
      * Trace all external pointers going through a first map
      
      Currently, MapVisitor only detects maps with external pointers as
      values if the value was directly passed from a function's argument.
      For example, in the following, the rewriter is currently unable to
      detect currsock has an external pointer as value because an
      intermediate variable is used instead of passing directly sk as the
      map's value.
      
          int test(struct pt_regs *ctx, struct sock *sk) {
              u32 pid = bpf_get_current_pid_tgid();
              struct sock **skp = &sk;
              currsock.update(&pid, skp);
              return 0;
          };
      
      With this commit, MapVisitor is able to trace any external pointer
      derived from the function's argument and used as a map value. This
      commit breaks the ProbeVisitor traversal in two distinct traversals.
      The first rewrites dereferences of external pointers originating
      from function's arguments and helpers, while the second rewrites only
      dereferences of external pointers passed through maps.
      Maps with external pointers as values are identified between the two
      ProbeVisitor traversals.
      
      * New tests for external pointers passed through maps
      
      test_ext_ptr_maps_reverse ensures dereferences are correctly replaced
      even if the update happens after the lookup (in the order of
      MapVisitor traversal).
      test_ext_ptr_maps_indirect ensures the rewriter is able to trace
      external pointers used as map values even if using an intermediate
      variable.
      ad2d0d9f
    • Javier Honduvilla Coto's avatar
      Fix USDT probes arguments' encoding in Python3 (#1736) · 42da08aa
      Javier Honduvilla Coto authored
      * Fix USDT probes arguments' encoding in Python3
      
      Running `trace` on a binary's USDT while fetching some arguments (
      `sudo python3 trace.py -p $(pidof ruby) 'u:ruby:array__create "%d",
      arg1'`) fails with `argument 2: <class 'TypeError'>: wrong type`.
      
      This PR fixes the encoding of the USDT probe name in
      udst.py `get_probe_arg_ctype` function. I've tested this works on Python 2 too.
      42da08aa
    • yonghong-song's avatar
      Merge pull request #1738 from pchaigno/links-circonus · 4139b198
      yonghong-song authored
      Link to article on how Circonus uses bcc
      4139b198
    • Paul Chaignon's avatar
      Link to article on how Circonus uses bcc · 6d822db9
      Paul Chaignon authored
      6d822db9
  10. 06 May, 2018 6 commits
  11. 05 May, 2018 2 commits
  12. 04 May, 2018 1 commit
  13. 03 May, 2018 4 commits
  14. 02 May, 2018 3 commits
    • yonghong-song's avatar
      Merge pull request #1726 from iovisor/yhs_dev · 319487f2
      yonghong-song authored
      fix lua compilation issue with latest clang/llvm 7.0
      319487f2
    • yonghong-song's avatar
      Merge pull request #1725 from iovisor/yhs_dev · aa1201a4
      yonghong-song authored
      fix compilation error with latest llvm
      aa1201a4
    • Yonghong Song's avatar
      fix compilation error with latest llvm · 806627e3
      Yonghong Song authored
      The clang commit https://reviews.llvm.org/rL331155
      changed the clang::SourceManager function prototype
         SourceRange getExpansionRange(SourceRange Range)
      to
         CharSourceRange getExpansionRange(SourceRange Range)
      and caused the following compilation failure:
      
        /home/yhs/work/bcc/src/cc/frontends/clang/b_frontend_action.cc:
        In member function ‘clang::SourceRange ebpf::ProbeVisitor::expansionRange(clang::SourceRange)’:
        /home/yhs/work/bcc/src/cc/frontends/clang/b_frontend_action.cc:267:58:
        error: could not convert ‘(&(&((ebpf::ProbeVisitor *)this)->ebpf::ProbeVisitor::rewriter_)
               ->clang::Rewriter::getSourceMgr())->clang::SourceManager::getExpansionRange(range)’
        from ‘clang::CharSourceRange’ to ‘clang::SourceRange’
           return rewriter_.getSourceMgr().getExpansionRange(range);
                                                                  ^
        ...
      
      It is hard to find a compatible change which works
      for both old llvm and the latest change. So this patch
      just fixed the problem for clang 7.0.0 and the old code
      is used for clang 6.x and lower.
      Signed-off-by: default avatarYonghong Song <yhs@fb.com>
      806627e3