Changes

Summary

  1. Adjust the order of linux kernel header include paths (commit: c31e9d6) (details)
  2. libbpf-tools: update bpftool and fix .rodata hack (commit: a02663b) (details)
  3. Add return value check and handling for xattr loading (commit: ba0bacf) (details)
  4. tools/opensnoop: Snoop all open related syscall stubs (commit: 6889afe) (details)
  5. man: fix tcpconnect man page (commit: 7ce6f64) (details)
  6. Add example for new helper to documentation. (commit: 7928ea0) (details)
  7. libbpf-tools: add CO-RE biopattern (commit: ca5bcd2) (details)
  8. libbpf-tools: add CO-RE tcpconnlat (commit: b6ffa24) (details)
  9. sync with latest libbpf repo (commit: 8a164f9) (details)
  10. libbpf-tools: add CO-RE biosnoop (commit: e0e2215) (details)
  11. libbpf-tools: fix tcpconnect compile errors (commit: f8ac3c6) (details)
  12. Offset support for uprobe and kprobe (commit: d7b427e) (details)
  13. Update the documentation of the k/uprobe offset support (commit: 8105317) (details)
  14. typos (commit: 6432324) (details)
  15. sync with latest libbpf repo (commit: 9ef20e7) (details)
  16. Fixes a problem when LLVM_DEFINITIONS contains a definition with an `=` in it. (commit: 3fbb664) (details)
  17. bcc/tools/fileslower: Attach to vfs_read after failing to attach __vfs_read (commit: b61e65f) (details)
  18. libbpibbpf-tools: fix tcpconnect types usage (commit: 5c27222) (details)
  19. libbpf-tools: add CO-RE readahead (commit: fb54a82) (details)
  20. libbpf-tools: fix tcpconnlat types usage (commit: 7d081eb) (details)
  21. docs: fix broken links (commit: 639e83f) (details)
  22. Forbid trampolines for archs other than x86_64 (commit: 49beed8) (details)
  23. kernel-versions.md: document map UAPI features (#3058) (commit: e73e1f6) (details)
  24. tools/funccount: support funccount on specified CPU (#3059) (commit: f4e65ac) (details)
  25. Extend PerfType members (commit: 785924b) (details)
  26. libbpf-tools: add CO-RE biostacks (commit: 71c22fc) (details)
  27. sync libbpf repo release 0.1.0 (commit: a79ec23) (details)
  28. prepare for release v0.16.0 (commit: fecd934) (details)
  29. sync with libbpf repo (commit: 43910c4) (details)
  30. fix the exits abnormal due to trace buffer (commit: 60de171) (details)
  31. doc: fix mismatched link (commit: fc92caa) (details)
  32. tools/capable: support new capabilities (commit: 0e7304e) (details)
  33. fix retruning typo (commit: 892475f) (details)
  34. tests: only run arg parser test on supported arches (commit: 4344034) (details)
  35. Add instructions on how to install amazon linux 2 from source (commit: 7ac370b) (details)
  36. memleak: fix false positive on failed allocations (commit: b8e661f) (details)
  37. tools/tcprtt: add tcprtt to trace the RTT of TCP (commit: e42ac41) (details)
  38. Netqtop 3037 (#3048) (commit: ba73657) (details)
  39. add threadsnoop (commit: 3f95637) (details)
  40. add tcpsynbl (commit: 12c234f) (details)
  41. add swapin (commit: da8c6a9) (details)
  42. libbpf-tools: add hardirqs (commit: 3953c60) (details)
  43. libbpf-tools: add softirqs (commit: bf4668d) (details)
  44. libbpf-tools: add runqlat (commit: 48b7d61) (details)
  45. libbpf-tools: add runqlen (commit: 911ce07) (details)
  46. libbpf-tools: add numamove (commit: caaeb0a) (details)
  47. Add uretprobe example for indirect function (commit: 39a2a8f) (details)
  48. tools/tcpstates: remove unnecessary checking of TCP (commit: e548dd5) (details)
  49. tool: port readahead tool to bcc (commit: 561a71e) (details)
  50. tcprtt: add --byladdr/--byraddr (#3106) (commit: 4cbcd9a) (details)
  51. add average function latency (#3061) (commit: af90bd4) (details)
  52. slabratetop: Add memcg_cache_params struct def (commit: 788303e) (details)
  53. Fix v6 source (remote) and dest (local) address (commit: 7e3f0c0) (details)
  54. tools: tcptracer: fix alignement in tcp_ipv6_event_t (commit: 21b810a) (details)
  55. tools/biolatency: Handle signals from user (commit: 87792ce) (details)
  56. libbpf-tools: make some minor refactoring (commit: 73cf23b) (details)
  57. Revert "tools/biolatency: Handle signals from user" (commit: 17e14ef) (details)
  58. sync with latest libbpf repo (commit: d0e1c93) (details)
  59. add C++ bpf_iter support (commit: 5fe3576) (details)
  60. docs: Add missing code block closure (commit: 5e55c22) (details)
  61. tools: Use correct key key when deleting item from map (commit: 884799f) (details)
  62. sslsniff: fix comparing bytes to string (commit: 49fdec6) (details)
  63. Update installation instructions for Arch Linux (commit: 6ce68b9) (details)
  64. set larger range to get probes evnet for test_usdt2.py (commit: 4354c9c) (details)
  65. Add install instructions for Debian (commit: 5f53dbe) (details)
  66. libbpf-tools: initialize global structs in runqlen and softirqs (commit: 8c2d67e) (details)
  67. libbpf-tools: add llcstat (commit: 6929626) (details)
  68. Fix python2.7 support for dirtop tool (commit: 1efba05) (details)
  69. fix python3 compatible issue for netqtop and tcprtt tools (commit: 6ba4dc1) (details)
  70. fix netqtop python3 compatible (#3140) (commit: ec3747e) (details)
  71. uprobe: Add ref_cnt_offset arg to bpf_attach_uprobe (commit: 50f2009) (details)
  72. usdt: Calculate and suppply semaphore_offset values in APIs (commit: 3f0c5f0) (details)
  73. usdt: Use uprobe refcnt if available in usdt C++ API (commit: 28a5cef) (details)
  74. folly: Update tracing headers (commit: 8287f17) (details)
  75. usdt: Add test for uprobe refcnt support (commit: 50ad6fa) (details)
  76. Refactor docker image publishing (commit: d4aecc6) (details)
  77. Add ubuntu 20.04 build support (commit: 20b098a) (details)
  78. Guard artifact upload with environment variable (commit: d35a2dc) (details)
  79. Prefer newer llvm/clang versions in debian packaging (commit: 9269e48) (details)
  80. Do not permit errors in docker build (commit: 4967a61) (details)
  81. python: import ABCs from collections.abc (commit: 48946d2) (details)
  82. add DNS correlation to connect tracking (commit: 33817e6) (details)
  83. Update INSTALL.md (commit: 1591469) (details)
  84. docs(INSTALL): add libfl-dev to ubuntu dependencies (commit: 5ab0183) (details)
  85. sync with latest libbpf repo (commit: 15efd46) (details)
  86. update debian changelog for release v0.17.0 (commit: ad5b82a) (details)
  87. use correct arch register for the 4th param of x86_64 syscalls (commit: 12107c6) (details)
  88. fix compilation issues with latest llvm12 trunk (commit: 11c93f6) (details)
Commit c31e9d6c80f70ff39dff14a7ab3ebec07bec0c7f by yonghong-song
Adjust the order of linux kernel header include paths

The current order of include paths could cause the following error:

In file included from /virtual/main.c:3:
In file included from include/linux/sched.h:13:
In file included from include/linux/pid.h:4:
In file included from include/linux/rculist.h:10:
In file included from include/linux/rcupdate.h:38:
In file included from include/linux/spinlock.h:50:
In file included from include/linux/preempt.h:80:
In file included from /lib/modules/4.12.14-197.45-default/build/arch/s390/include/generated/asm/preempt.h:1:
include/asm-generic/preempt.h:10:42: error: no member named 'preempt_count' in 'struct thread_info'
        return READ_ONCE(current_thread_info()->preempt_count);
               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~
include/linux/compiler.h:349:34: note: expanded from macro 'READ_ONCE'
                     ~~~~~~~~~~~~^~~~~
include/linux/compiler.h:342:17: note: expanded from macro '__READ_ONCE'
        union { typeof(x) __val; char __c[1]; } __u;
\
...
7 errors generated.

It's supposed to load "asm/preempt.h" from "source/"(*) but accidentally
loaded the one from "build/", so the error showed.
(x86_64 didn't suffer this error because it didn't install the extra
"asm/preempt.h" to "build/".)

For the distros, e.g. SUSE/openSUSE and debian,  with separate "build/"
and "source/", all those "generated/" paths only exist in "build/". To
avoid the potential compilation issue, this commit adjusts the include
order for those with split headers to align the include order from
kernel top Makefile.

(*) /lib/modules/4.12.14-197.45-default/source/arch/s390/include/

Signed-off-by: Gary Lin <glin@suse.com>
(commit: c31e9d6)
The file was modifiedsrc/cc/frontends/clang/kbuild_helper.cc (diff)
Commit a02663be278012a4d0aea357023ea145c1b1c0d9 by yonghong-song
libbpf-tools: update bpftool and fix .rodata hack

Update bpftool to the latest version, handing const volatile arrays properly
when generating BPF skeletons. Fix tcpconnect tool hack to work around that
issue.

Signed-off-by: Andrii Nakryiko <andriin@fb.com>
(commit: a02663b)
The file was modifiedlibbpf-tools/bin/bpftool (diff)
The file was modifiedlibbpf-tools/tcpconnect.bpf.c (diff)
Commit ba0bacf1714c37e4e99dbdef5559039c28aa7aef by yonghong-song
Add return value check and handling for xattr loading

libbpf_find_vmlinux_btf_id may return error code for different reasons. We
should check and report the error we have just got, rather than let it slip
down the path and give an ambiguous error later.

Signed-off-by: He Zhe <zhe.he@windriver.com>
(commit: ba0bacf)
The file was modifiedsrc/cc/libbpf.c (diff)
Commit 6889afe0858b38b93f2a2da3ca538343d05f5930 by yonghong-song
tools/opensnoop: Snoop all open related syscall stubs

kernel v5.6 introduces fddb5d430ad9 ("open: introduce openat2(2) syscall").
Even though do_sys_open still exists, it might be optimized off final binary
depending on compilers. So we can't catch do_sys_open in some cases.

This patch uses ksymname to try to get entries of open, openat and openat2,
and changes the definitions of the trace functions to snoop them all. This
works for both kprobe and kfunc.

Credit to Yonghong Song for better code organization.

Signed-off-by: He Zhe <zhe.he@windriver.com>
(commit: 6889afe)
The file was modifiedtools/opensnoop.py (diff)
Commit 7ce6f646ec6002c0f9a2f2742dc63ed2613b13c3 by yonghong-song
man: fix tcpconnect man page

Add -u and -U options to the synopsis.
Move their description frome the example to the description section.
Add a description to --mntnsmap option.
(commit: 7ce6f64)
The file was modifiedman/man8/tcpconnect.8 (diff)
Commit 7928ea0cd71aa8e794ed5ffdf0a6ff1004ab2849 by yonghong-song
Add example for new helper to documentation.
(commit: 7928ea0)
The file was addedexamples/tracing/hello_perf_output_using_ns.py
The file was modifieddocs/reference_guide.md (diff)
Commit ca5bcd21468709f0fb0e6c8122a48f859d80769b by yonghong-song
libbpf-tools: add CO-RE biopattern

Signed-off-by: Wenbo Zhang <ethercflow@gmail.com>
(commit: ca5bcd2)
The file was addedlibbpf-tools/biopattern.c
The file was addedlibbpf-tools/biopattern.h
The file was modifiedlibbpf-tools/Makefile (diff)
The file was modifiedlibbpf-tools/.gitignore (diff)
The file was addedlibbpf-tools/biopattern.bpf.c
Commit b6ffa245cc4cd1ba41600f10062f820b6452a69d by yonghong-song
libbpf-tools: add CO-RE tcpconnlat

Signed-off-by: Wenbo Zhang <ethercflow@gmail.com>
(commit: b6ffa24)
The file was modifiedlibbpf-tools/Makefile (diff)
The file was addedlibbpf-tools/tcpconnlat.bpf.c
The file was addedlibbpf-tools/tcpconnlat.c
The file was addedlibbpf-tools/tcpconnlat.h
The file was modifiedlibbpf-tools/.gitignore (diff)
Commit 8a164f95ee708495a89a43a243fdb5c8b7eee290 by yonghong-song
sync with latest libbpf repo

sync with latest libbpf repo

Signed-off-by: Yonghong Song <yhs@fb.com>
(commit: 8a164f9)
The file was modifiedintrospection/bps.c (diff)
The file was modifiedsrc/cc/libbpf (diff)
The file was modifiedsrc/cc/compat/linux/virtual_bpf.h (diff)
The file was modifiedsrc/cc/export/helpers.h (diff)
Commit e0e2215833999998b9d654a0a5056d889457b005 by yonghong-song
libbpf-tools: add CO-RE biosnoop

Signed-off-by: Wenbo Zhang <ethercflow@gmail.com>
(commit: e0e2215)
The file was modifiedlibbpf-tools/.gitignore (diff)
The file was addedlibbpf-tools/biosnoop.c
The file was addedlibbpf-tools/biosnoop.bpf.c
The file was modifiedlibbpf-tools/Makefile (diff)
The file was addedlibbpf-tools/biosnoop.h
Commit f8ac3c6c14519d9d35c88260473585861060d058 by yonghong-song
 libbpf-tools: fix tcpconnect compile errors

Signed-off-by: Wenbo Zhang <ethercflow@gmail.com>
(commit: f8ac3c6)
The file was modifiedlibbpf-tools/maps.bpf.h (diff)
The file was modifiedlibbpf-tools/tcpconnect.c (diff)
The file was modifiedlibbpf-tools/tcpconnect.bpf.c (diff)
Commit d7b427ebc35b4b3e77c7f8dae6a83fcdf7d32e6d by yonghong-song
Offset support for uprobe and kprobe
(commit: d7b427e)
The file was modifiedtools/trace.py (diff)
Commit 8105317c3bbe531801eb03324371462d627cf0ad by yonghong-song
Update the documentation of the k/uprobe offset support
(commit: 8105317)
The file was modifiedtools/trace_example.txt (diff)
The file was modifiedman/man8/trace.8 (diff)
The file was modifiedtools/trace_example.txt (diff)
Commit 9ef20e7aa61f6a4d7576f906fdaf32329bec34bc by yonghong-song
sync with latest libbpf repo

Signed-off-by: Yonghong Song <yhs@fb.com>
(commit: 9ef20e7)
The file was modifiedsrc/cc/libbpf (diff)
The file was modifiedsrc/cc/compat/linux/virtual_bpf.h (diff)
Commit 3fbb6648e9d843c5e835f0b26713b0656cb684a7 by yonghong-song
Fixes a problem when LLVM_DEFINITIONS contains a definition with an `=` in it.
add_definitions doesn't seem to parse this type of argument correctly.
(commit: 3fbb664)
The file was modifiedsrc/cc/CMakeLists.txt (diff)
Commit b61e65ffe1cd41fb9fe01118540158f98737996e by yonghong-song
bcc/tools/fileslower: Attach to vfs_read after failing to attach __vfs_read

__vfs_read has been removed since kernel v5.8-rc5
775802c0571f ("fs: remove __vfs_read"). Then try vfs_read instead.

Signed-off-by: He Zhe <zhe.he@windriver.com>
(commit: b61e65f)
The file was modifiedtools/fileslower.py (diff)
Commit 5c272220f1cf8a3bb8fd6814c963b3f9b271fe3a by yonghong-song
libbpibbpf-tools: fix tcpconnect types usage

The __int128 is not defined for 32-bit platforms, see [1], so replace it by
a portable array of __u8.

The usage of this type came from the original tcpconnect.py, and __int128 is
still used in most (if not all) original BCC tools to store IPv6 addresses.

[1] https://github.com/iovisor/bcc/issues/3044

Signed-off-by: Anton Protopopov <a.s.protopopov@gmail.com>
(commit: 5c27222)
The file was modifiedlibbpf-tools/tcpconnect.c (diff)
The file was modifiedlibbpf-tools/tcpconnect.h (diff)
Commit fb54a822d54ab80e6e36755e7de5285e6f06f410 by yonghong-song
libbpf-tools: add CO-RE readahead

Signed-off-by: Wenbo Zhang <ethercflow@gmail.com>
(commit: fb54a82)
The file was addedlibbpf-tools/readahead.bpf.c
The file was modifiedlibbpf-tools/.gitignore (diff)
The file was addedlibbpf-tools/readahead.c
The file was addedlibbpf-tools/readahead.h
The file was modifiedlibbpf-tools/Makefile (diff)
Commit 7d081eb03d8a3412cfcdcf2a5cfc99047eb08bc1 by yonghong-song
libbpf-tools: fix tcpconnlat types usage

Signed-off-by: Wenbo Zhang <ethercflow@gmail.com>
(commit: 7d081eb)
The file was modifiedlibbpf-tools/tcpconnlat.h (diff)
The file was modifiedlibbpf-tools/tcpconnlat.c (diff)
The file was modifieddocs/reference_guide.md (diff)
Commit 49beed88ee27c8f86e50ac29064664671757d930 by yonghong-song
Forbid trampolines for archs other than x86_64

The trampoline support check in bcc does not work properly,
so the feature is detected even on architectures that do not
support it - all archs other than x86_64.

We are checking for bpf_trampoline_link_prog to exist in
kernel, which works fine on x86_64 to check if the feature
is supported, but it's global function, so it exists also
in other archs even when the feature is not supported
so it returns True also on other archs.

Adding explicit x86_64 check to support_kfunc function.

Signed-off-by: Jiri Olsa <jolsa@kernel.org>
(commit: 49beed8)
The file was modifiedsrc/python/bcc/__init__.py (diff)
Commit e73e1f67b0167edbbe2e261997e3ae9e72e23757 by noreply
kernel-versions.md: document map UAPI features (#3058)

Document kernel versions for userspace API features regarding map manipulation.
(commit: e73e1f6)
The file was modifieddocs/kernel-versions.md (diff)
Commit f4e65ac41bec1613c7cb54270f09d16411aaf89c by noreply
tools/funccount: support funccount on specified CPU (#3059)

A typical case of this feature: count timer setting on a x86 server
for each CPU:
for i in `seq 0 39`;
   do ./funccount.py -i 1 lapic_next_deadline -d 5 -c $i;
done

Then we can know the timer setting is balanced of not and do some
futher work.

Signed-off-by: zhenwei pi <pizhenwei@bytedance.com>
(commit: f4e65ac)
The file was modifiedtools/funccount.py (diff)
The file was modifiedtools/funccount_example.txt (diff)
The file was modifiedman/man8/funccount.8 (diff)
Commit 785924b337f27c6e09b5a83ae4afac3d3c3fec7a by yonghong-song
Extend PerfType members

You can use

    b.attach_perf_event(ev_type=PerfType.RAW, ...)

to attach perf raw event for profiling.

Signed-off-by: Edward Wu <edwardwu@realtek.com>
(commit: 785924b)
The file was modifiedsrc/python/bcc/__init__.py (diff)
Commit 71c22fcaa688a1aea92a9588b1a60a7e2329f38b by yonghong-song
libbpf-tools: add CO-RE biostacks

Signed-off-by: Wenbo Zhang <ethercflow@gmail.com>
(commit: 71c22fc)
The file was addedlibbpf-tools/biostacks.bpf.c
The file was addedlibbpf-tools/biostacks.h
The file was modifiedlibbpf-tools/trace_helpers.h (diff)
The file was modifiedlibbpf-tools/trace_helpers.c (diff)
The file was modifiedlibbpf-tools/.gitignore (diff)
The file was modifiedlibbpf-tools/Makefile (diff)
The file was addedlibbpf-tools/biostacks.c
Commit a79ec23adac0b267f1547b938392121da7403eea by yonghong-song
sync libbpf repo release 0.1.0

Signed-off-by: Yonghong Song <yhs@fb.com>
(commit: a79ec23)
The file was modifiedsrc/cc/libbpf (diff)
Commit fecd934a9c0ff581890d218ff6c5101694e9b326 by yonghong-song
prepare for release v0.16.0

add changelog for release v0.16.0

Signed-off-by: Yonghong Song <yhs@fb.com>
(commit: fecd934)
The file was modifieddebian/changelog (diff)
Commit 43910c44121999592833cf20e8334997f2b6c470 by yonghong-song
sync with libbpf repo

sync with latest libbpf repo.

Strut definition for btf_ext_header is defined in libbpf/src/btf.h
previously and used by bcc. Now, the struct is moved to
libbpf/src/libbpf_internal.h and not available to bcc.
We do not want to include libbpf/src/libbpf_internal.h as
it is really libbpf internal. Let us define bcc version
of btf_ext_header with struct name bcc_btf_ext_header.
The new name is to avoid conflict when compiling with
old libbpf package.

Signed-off-by: Yonghong Song <yhs@fb.com>
(commit: 43910c4)
The file was modifiedsrc/cc/bcc_btf.cc (diff)
The file was modifiedsrc/cc/libbpf (diff)
The file was modifiedsrc/cc/bcc_btf.h (diff)
The file was modifiedsrc/cc/compat/linux/virtual_bpf.h (diff)
Commit 60de17161fe7f44b534a8da343edbad2427220e3 by yonghong-song
fix the exits abnormal due to trace buffer

Some data may be left in the trace buffer, and the format cannot be
parsed by trace_fields(), which whill cause an abnormality in the
system.

Re-running the program cannot solved, only restart kernel.

Call trace:
      File "/usr/lib/python2.7/site-packages/kwaibcc/__init__.py", line 1273, in trace_fields
        pid, cpu, flags, ts = line[:ts_end].split()
    ValueError: need more than 2 values to unpack

Prevent problems with exception handling.

Signed-off-by: Chen Guanqiao <chen.chenchacha@foxmail.com>
(commit: 60de171)
The file was modifiedsrc/python/bcc/__init__.py (diff)
Commit fc92caa08f52533dd18cff6bf9e3438c75ca5cb3 by yonghong-song
doc: fix mismatched link

Signed-off-by: zhuangqh <zhuangqhc@gmail.com>
(commit: fc92caa)
The file was modifieddocs/tutorial_bcc_python_developer.md (diff)
Commit 0e7304eab277320bf0b0014a3940541aadea03e0 by yonghong-song
tools/capable: support new capabilities

This commit adds the support of below capabilities.
* CAP_PERFMON
* CAP_BPF
* CAP_CHECKPOINT_RESTORE

Signed-off-by: Kenta Tada <Kenta.Tada@sony.com>
(commit: 0e7304e)
The file was modifiedtools/capable.py (diff)
The file was modifiedexamples/networking/vlan_filter/data-plane-tracing.c (diff)
The file was modifiedexamples/networking/http_filter/http-parse-complete.c (diff)
The file was modifiedexamples/networking/http_filter/http-parse-simple.c (diff)
Commit 43440348edc4e4687e370427f66a16fca0f34e91 by yonghong-song
tests: only run arg parser test on supported arches

Fixes #3077

Signed-off-by: Rafael Fonseca <r4f4rfs@gmail.com>
(commit: 4344034)
The file was modifiedtests/cc/test_usdt_args.cc (diff)
Commit 7ac370b97bc9284105598460160875b2e5235018 by yonghong-song
Add instructions on how to install amazon linux 2 from source
(commit: 7ac370b)
The file was modifiedINSTALL.md (diff)
Commit b8e661fb8238cdf3b2cfa6575e843dc3a2f7f3ec by yonghong-song
memleak: fix false positive on failed allocations

memleak tool reports a failed allocation as a leak,
because the NULL address is never freed.

Signed-off-by: Amir Goldstein <amir73il@gmail.com>
(commit: b8e661f)
The file was modifiedtools/memleak.py (diff)
Commit e42ac4176998a6dcf0dbf3b6befeaad0a69cb98a by yonghong-song
tools/tcprtt: add tcprtt to trace the RTT of TCP

This program traces TCP RTT(round-trip time) to analyze the quality of
network, then help us to distinguish the network latency trouble is
from user process or physical network.

Currently, support source address/port and destination address/port as
tcp filter.

Suggested-by: Edward Wu <edwardwu@realtek.com>
Suggested-by: Martin KaFai Lau <kafai@fb.com>
Signed-off-by: zhenwei pi <pizhenwei@bytedance.com>
(commit: e42ac41)
The file was addedtools/tcprtt.py
The file was addedtools/tcprtt_example.txt
The file was addedman/man8/tcprtt.8
Commit ba73657cb8c4dab83dfb89eed4a8b3866255569a by noreply
Netqtop 3037 (#3048)

The tool netqtop uses tracepoints NET_DEV_START_XMIT and NETIF_RECEIVE_SKB to intercept every transmitted and received packet, as a result, considerable performance descent is expected.
Details for some performance evaluation can be found at
   https://github.com/iovisor/bcc/pull/3048
(commit: ba73657)
The file was addedtools/netqtop.c
The file was modifiedREADME.md (diff)
The file was addedman/man8/netqtop.8
The file was addedtools/netqtop_example.txt
The file was addedtools/netqtop.py
The file was addedtools/threadsnoop.py
The file was modifiedREADME.md (diff)
The file was addedman/man8/threadsnoop.8
The file was addedtools/threadsnoop_example.txt
The file was modifiedREADME.md (diff)
The file was addedtools/tcpsynbl_example.txt
The file was addedman/man8/tcpsynbl.8
The file was addedtools/tcpsynbl.py
The file was addedman/man8/swapin.8
The file was modifiedREADME.md (diff)
The file was addedtools/swapin.py
The file was addedtools/swapin_example.py
Commit 3953c6001e8ee67b9c01abeb0405ffd973f38642 by yonghong-song
libbpf-tools: add hardirqs

Signed-off-by: Wenbo Zhang <ethercflow@gmail.com>
(commit: 3953c60)
The file was modifiedlibbpf-tools/Makefile (diff)
The file was modifiedlibbpf-tools/.gitignore (diff)
The file was addedlibbpf-tools/hardirqs.h
The file was addedlibbpf-tools/hardirqs.c
The file was addedlibbpf-tools/hardirqs.bpf.c
Commit bf4668d4a0c0144f1b5e3ed89696e5493daf3af4 by yonghong-song
libbpf-tools: add softirqs

Signed-off-by: Wenbo Zhang <ethercflow@gmail.com>
(commit: bf4668d)
The file was addedlibbpf-tools/softirqs.h
The file was modifiedlibbpf-tools/Makefile (diff)
The file was addedlibbpf-tools/softirqs.bpf.c
The file was modifiedlibbpf-tools/.gitignore (diff)
The file was addedlibbpf-tools/softirqs.c
Commit 48b7d61681ac6d4a32050d696d2eb9b2dd837c5f by yonghong-song
libbpf-tools: add runqlat

Signed-off-by: Wenbo Zhang <ethercflow@gmail.com>
(commit: 48b7d61)
The file was modifiedlibbpf-tools/trace_helpers.h (diff)
The file was addedlibbpf-tools/runqlat.c
The file was modifiedlibbpf-tools/Makefile (diff)
The file was addedlibbpf-tools/runqlat.bpf.c
The file was addedlibbpf-tools/runqlat.h
The file was modifiedlibbpf-tools/trace_helpers.c (diff)
The file was modifiedlibbpf-tools/.gitignore (diff)
Commit 911ce07ddf156d23e8aabd30040e94f99ce4e518 by yonghong-song
libbpf-tools: add runqlen

Signed-off-by: Wenbo Zhang <ethercflow@gmail.com>
(commit: 911ce07)
The file was addedlibbpf-tools/runqlen.bpf.c
The file was modifiedlibbpf-tools/Makefile (diff)
The file was addedlibbpf-tools/runqlen.c
The file was modifiedlibbpf-tools/.gitignore (diff)
The file was addedlibbpf-tools/runqlen.h
The file was modifiedlibbpf-tools/trace_helpers.h (diff)
The file was modifiedlibbpf-tools/trace_helpers.c (diff)
Commit caaeb0a87c95f0dd1ac1f1b0c260ec2f6c8a3c94 by yonghong-song
libbpf-tools: add numamove

Signed-off-by: Wenbo Zhang <ethercflow@gmail.com>
(commit: caaeb0a)
The file was addedlibbpf-tools/numamove.c
The file was modifiedlibbpf-tools/.gitignore (diff)
The file was addedlibbpf-tools/numamove.bpf.c
The file was modifiedlibbpf-tools/Makefile (diff)
Commit 39a2a8f02cc3871ab375b005a00e296aa668d9ec by yonghong-song
Add uretprobe example for indirect function

Already there is strlen_hist.py as a nice example of uretprobe. But it can
not work correctly if strlen is indirect function(IFUNC). So
strlen_hist_ifunc.py is introduced to show how to use uprobe/uretprobe for
indirect functions.
(commit: 39a2a8f)
The file was addedexamples/tracing/strlen_hist_ifunc.py
Commit e548dd5728332da4bee048cc1b6775af8183f040 by yonghong-song
tools/tcpstates: remove unnecessary checking of TCP
(commit: e548dd5)
The file was modifiedtools/tcpstates.py (diff)
Commit 561a71e105985ad04f5eb070b3487f5317f063b3 by yonghong-song
tool: port readahead tool to bcc
(commit: 561a71e)
The file was addedtools/readahead.py
The file was addedtools/readahead_example.txt
The file was addedman/man8/readahead.8
The file was modifiedREADME.md (diff)
Commit 4cbcd9afa83226405abd773212ed423c5d06fd26 by noreply
tcprtt: add --byladdr/--byraddr (#3106)

On a server side, a server listens a local port and accepts lots of
connections. To seperate histogram into views by each remote address,
so add --byraddr to support this.

Suggested-by: Brendan Gregg <brendan.d.gregg@gmail.com>
Signed-off-by: zhenwei pi <pizhenwei@bytedance.com>
(commit: 4cbcd9a)
The file was modifiedtools/tcprtt.py (diff)
The file was modifiedREADME.md (diff)
The file was modifiedman/man8/tcprtt.8 (diff)
The file was modifiedtools/tcprtt_example.txt (diff)
Commit af90bd470a649e1276a7626edb1e5484f0ece8b3 by noreply
add average function latency (#3061)

* add average function latency
* update example.txt
(commit: af90bd4)
The file was modifiedtools/funclatency_example.txt (diff)
The file was modifiedtools/funclatency.py (diff)
Commit 788303ead582d5fc70066443b2a94f5c482b53d9 by yonghong-song
slabratetop: Add memcg_cache_params struct def

struct memcg_cache_params moved from include/linux/slab.h to
mm/slab.h in kernel v5.4, causing a compiler error when including
slub_def.h or slab_def.h in slabratetop's bpf program.

It has been removed completely from kernel version 5.9.

Add an empty memcg_cache_params struct in slabratetop's bpf
program so it will compile with kernel versions 5.4 to 5.8.
(commit: 788303e)
The file was modifiedtools/slabratetop.py (diff)
Commit 7e3f0c08c7c28757711c0a173b5bd7d9a31cf7ee by yonghong-song
Fix v6 source (remote) and dest (local) address

For v6, tcpdrop.py would report the source and destination addresses incorrectly - tcp_drop() covers the input path, where the source of the received packet is the daddr stored in the socket, while the destination of the received packet is the local address.   This commit swaps them to be correct and leaves a comment since it is not obvious.
(commit: 7e3f0c0)
The file was modifiedtools/tcpdrop.py (diff)
Commit 21b810a3b297411452a41336d239002687e5607f by yonghong-song
tools: tcptracer: fix alignement in tcp_ipv6_event_t

On IPv6, tcptracer ports always appears as zeros:

Tracing TCP established connections. Ctrl-C to end.
T  PID    COMM             IP SADDR            DADDR            SPORT  DPORT
X  7055   nc               4  127.0.0.1        127.0.0.1        49476  9999
C  7074   nc               4  127.0.0.1        127.0.0.1        49478  9999
X  7074   nc               4  127.0.0.1        127.0.0.1        49478  9999
C  7085   nc               6  [::]             [0:0:0:1::]      0      0
X  7085   nc               6  [::]             [0:0:0:1::]      0      0
C  7086   nc               6  [::]             [0:0:0:1::]      0      0

This seems related to alignment issue wrt to the __int128 type in
tcp_ipv6_event_t structure. Moving the u8 field ip to the end of the
structure fixes the issue.

Fixes #2781
(commit: 21b810a)
The file was modifiedtools/tcptracer.py (diff)
Commit 87792ce6b783941ea1d8bcd29812a55520930c95 by yonghong-song
tools/biolatency: Handle signals from user
(commit: 87792ce)
The file was modifiedtools/biolatency.py (diff)
Commit 73cf23b84d47d437dbd3a9fc7d1f170a1f082a15 by yonghong-song
libbpf-tools: make some minor refactoring

Signed-off-by: Wenbo Zhang <ethercflow@gmail.com>
(commit: 73cf23b)
The file was modifiedlibbpf-tools/filelife.h (diff)
The file was modifiedlibbpf-tools/tcpconnect.bpf.c (diff)
The file was modifiedlibbpf-tools/opensnoop.bpf.c (diff)
The file was modifiedlibbpf-tools/tcpconnlat.h (diff)
The file was modifiedlibbpf-tools/filelife.c (diff)
The file was modifiedlibbpf-tools/readahead.h (diff)
The file was modifiedlibbpf-tools/biolatency.h (diff)
The file was modifiedlibbpf-tools/tcpconnlat.bpf.c (diff)
The file was modifiedlibbpf-tools/drsnoop.bpf.c (diff)
The file was modifiedlibbpf-tools/biostacks.h (diff)
The file was modifiedlibbpf-tools/bitesize.h (diff)
The file was modifiedlibbpf-tools/biolatency.bpf.c (diff)
The file was modifiedlibbpf-tools/biolatency.c (diff)
The file was modifiedlibbpf-tools/biostacks.bpf.c (diff)
The file was modifiedlibbpf-tools/biopattern.c (diff)
The file was modifiedlibbpf-tools/runqslower.bpf.c (diff)
The file was modifiedlibbpf-tools/trace_helpers.c (diff)
The file was modifiedlibbpf-tools/xfsslower.h (diff)
The file was modifiedlibbpf-tools/biopattern.bpf.c (diff)
The file was modifiedlibbpf-tools/numamove.c (diff)
The file was modifiedlibbpf-tools/biosnoop.bpf.c (diff)
The file was modifiedlibbpf-tools/cpudist.bpf.c (diff)
The file was modifiedlibbpf-tools/filelife.bpf.c (diff)
The file was modifiedlibbpf-tools/drsnoop_example.txt (diff)
The file was modifiedlibbpf-tools/tcpconnlat.c (diff)
The file was modifiedlibbpf-tools/bitesize.bpf.c (diff)
The file was modifiedlibbpf-tools/biosnoop.h (diff)
The file was modifiedlibbpf-tools/biopattern.h (diff)
The file was modifiedlibbpf-tools/drsnoop.h (diff)
The file was modifiedlibbpf-tools/xfsslower.bpf.c (diff)
The file was modifiedlibbpf-tools/xfsslower.c (diff)
The file was modifiedlibbpf-tools/readahead.bpf.c (diff)
The file was modifiedlibbpf-tools/vfsstat.bpf.c (diff)
The file was modifiedlibbpf-tools/biostacks.c (diff)
The file was modifiedlibbpf-tools/cpudist.c (diff)
The file was modifiedlibbpf-tools/readahead.c (diff)
The file was modifiedlibbpf-tools/bitesize.c (diff)
The file was modifiedlibbpf-tools/drsnoop.c (diff)
The file was modifiedlibbpf-tools/biosnoop.c (diff)
The file was modifiedlibbpf-tools/execsnoop.bpf.c (diff)
Commit 17e14efccdd1324e39ad9413f2eeba5d93fc6b44 by yonghong-song
Revert "tools/biolatency: Handle signals from user"

This reverts commit 87792ce6b783941ea1d8bcd29812a55520930c95.

Let us have a consensus about how bcc tools should interact with
external signals etc. before applying such changes to this tool
and other tools.
(commit: 17e14ef)
The file was modifiedtools/biolatency.py (diff)
Commit d0e1c932ff97401640cdfe02317c7583da775f19 by yonghong-song
sync with latest libbpf repo

11 new helpers are added so far in 5.10, added helper function prototypes
and related documentation, etc.

Signed-off-by: Yonghong Song <yhs@fb.com>
(commit: d0e1c93)
The file was modifieddocs/kernel-versions.md (diff)
The file was modifiedsrc/cc/export/helpers.h (diff)
The file was modifiedintrospection/bps.c (diff)
The file was modifiedsrc/cc/compat/linux/virtual_bpf.h (diff)
The file was modifiedsrc/cc/libbpf (diff)
The file was modifiedsrc/cc/libbpf.c (diff)
Commit 5fe35766ac0e2860c7e6c1694a2338365e9497a6 by yonghong-song
add C++ bpf_iter support

bpf iterator is introduced in linux kernel 5.8.
  https://lore.kernel.org/bpf/20200509175859.2474608-1-yhs@fb.com/
In 5.8, iterator support for task, task_file, bpf_map, netlink_sock
and ipv6_route. In 5.9, tcp, udp and hash/array/sk_local_storage
map iterators are implemented.

This patch added necessary interface to support bpf_iter in bcc.
A few C++ APIs are added to bcc. Two bpf_iter examples,
task and sk_local_storage_map, are added to illustrate how
bpf iterator can be implemented. Python interface can be added
later if there is a need.

Signed-off-by: Yonghong Song <yhs@fb.com>
(commit: 5fe3576)
The file was modifiedexamples/cpp/CMakeLists.txt (diff)
The file was addedexamples/cpp/TaskIterator.cc
The file was modifiedsrc/cc/libbpf.h (diff)
The file was modifiedsrc/cc/export/helpers.h (diff)
The file was modifiedsrc/cc/libbpf.c (diff)
The file was modifieddocs/reference_guide.md (diff)
The file was addedexamples/cpp/SkLocalStorageIterator.cc
Commit 5e55c22cc76687881e32ee997d79c056558b3479 by yonghong-song
docs: Add missing code block closure

Signed-off-by: Mauricio Vásquez <mauricio@kinvolk.io>
(commit: 5e55c22)
The file was modifieddocs/reference_guide.md (diff)
Commit 884799f06d7e398f5cf3e1ad28e3feca16b1eac5 by yonghong-song
tools: Use correct key key when deleting item from map

The correct key to use is "tig" instead of "pid".

Signed-off-by: Mauricio Vásquez <mauricio@kinvolk.io>
(commit: 884799f)
The file was modifiedtools/bindsnoop.py (diff)
The file was modifiedtools/tcpconnect.py (diff)
Commit 49fdec6a53b524bde53e39d24b2f06ba44531eed by yonghong-song
sslsniff: fix comparing bytes to string

Signed-off-by: keyolk <chanhun.jeong@navercorp.com>
(commit: 49fdec6)
The file was modifiedtools/sslsniff.py (diff)
Commit 6ce68b940bd520ee827b1ff089f3baa2bb30f93b by yonghong-song
Update installation instructions for Arch Linux

The bcc packages were recently moved from the AUR to the standard Arch
repos, so the installation instructions for Arch should be updated to
reflect that.

Additionally, the Arch "linux-lts" package was upgraded to 4.4.7 in
April 2016, so it is safe to assume that any Arch installations that are
still in use have been upgraded by this point. Therefore, the note about
upgrading to kernel 4.3.1 is removed.
(commit: 6ce68b9)
The file was modifiedINSTALL.md (diff)
Commit 4354c9ce33496df82c8ffd30497141daae28afaa by yonghong-song
set larger range to get probes evnet for test_usdt2.py

I test test_usdt2.py on aarch64 with kernel-5.9-rc5,
gcc-9.2.1 and glibc2.32.
with the current range of 3, always get failure:
======================================================================
FAIL: test_attach1 (__main__.TestUDST)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test_usdt2.py", line 170, in test_attach1
    self.assertTrue(self.evt_st_6 == 1)
AssertionError: False is not true

----------------------------------------------------------------------
Ran 1 test in 1.068s

FAILED (failures=1)

Signed-off-by: Chunmei Xu <xuchunmei@linux.alibaba.com>
(commit: 4354c9c)
The file was modifiedtests/python/test_usdt2.py (diff)
Commit 5f53dbe182da54d6a05931d69c289ed0a4ebc339 by yonghong-song
Add install instructions for Debian
(commit: 5f53dbe)
The file was modifiedINSTALL.md (diff)
Commit 8c2d67e861e07f4125dc2b448f2dc5833b524a17 by yonghong-song
libbpf-tools: initialize global structs in runqlen and softirqs

Signed-off-by: Juraj Vijtiuk <juraj.vijtiuk@sartura.hr>
(commit: 8c2d67e)
The file was modifiedlibbpf-tools/runqlen.bpf.c (diff)
The file was modifiedlibbpf-tools/softirqs.bpf.c (diff)
Commit 6929626b4c4ef610ea7dfa0568d5e2267c006313 by yonghong-song
libbpf-tools: add llcstat

Signed-off-by: Wenbo Zhang <ethercflow@gmail.com>
(commit: 6929626)
The file was addedlibbpf-tools/llcstat.h
The file was modifiedlibbpf-tools/Makefile (diff)
The file was addedlibbpf-tools/llcstat.c
The file was addedlibbpf-tools/llcstat.bpf.c
The file was modifiedlibbpf-tools/.gitignore (diff)
Commit 1efba05d3296907bf12558445ed698a459e081c4 by yonghong-song
Fix python2.7 support for dirtop tool

* Catch TypeError raised by Python3 glob and fall back to Python2 interface
(commit: 1efba05)
The file was modifiedtools/dirtop.py (diff)
Commit 6ba4dc1fb110b1db4a3ba187fa60a152f64c413f by yonghong-song
fix python3 compatible issue for netqtop and tcprtt tools

Otherwise, we have:
  ...
    File "bcc/tools/netqtop.py", line 54
      print(hd.center(COL_WIDTH)),
                                 ^
  TabError: inconsistent use of tabs and spaces in indentation
  ...

    File "bcc/tools/tcprtt.py", line 117, in <module>
    bpf_text = bpf_text.replace(b'LPORTFILTER', b'')
  TypeError: replace() argument 1 must be str, not bytes
  ...

Signed-off-by: Yonghong Song <yhs@fb.com>
(commit: 6ba4dc1)
The file was modifiedtools/tcprtt.py (diff)
The file was modifiedtools/netqtop.py (diff)
Commit ec3747ed6b16f9eec36a204dfbe3506d3778dcb4 by noreply
fix netqtop python3 compatible (#3140)

* fix netqtop python3 compatible
* delete import types
(commit: ec3747e)
The file was modifiedtools/netqtop.py (diff)
Commit 50f2009c7521e7d245372839cdb6b9cd6924202b by Daniel Xu
uprobe: Add ref_cnt_offset arg to bpf_attach_uprobe

This argument allows callers to tell the kernel to manage USDT semaphore
counts. It's better than fiddling with the counts in userspace b/c if
the userspace program crashes then the semaphore count does not get
decremented.

It's also better b/c the kernel can activate the semaphore for all
processes that have the target mapped into memory. Currently with bcc,
you have to provide the pid of each process you want to activate a
semaphore for and then bcc will go poke /proc/pid/mem at the right
offset.
(commit: 50f2009)
The file was modifiedsrc/cc/libbpf.h (diff)
The file was modifiedsrc/cc/api/BPF.cc (diff)
The file was modifiedsrc/cc/api/BPF.h (diff)
The file was modifiedsrc/cc/libbpf.c (diff)
Commit 3f0c5f08a57d554640147ad526e0656def0ee251 by Daniel Xu
usdt: Calculate and suppply semaphore_offset values in APIs

`semaphore_offset` is the offset from the start of the file the
usdt semaphore can be found. This is different than the already exiting
`semaphore` value which is the virtual address the usdt semaphore can be
found at (after load).

The reason we need to calculate and export this `semaphore_offset` value
is b/c the kernel's uprobe refcount API requires the offset and not the
vaddr.
(commit: 3f0c5f0)
The file was modifiedsrc/cc/bcc_elf.c (diff)
The file was modifiedsrc/cc/bcc_elf.h (diff)
The file was modifiedsrc/cc/usdt/usdt.cc (diff)
The file was modifiedsrc/cc/bcc_usdt.h (diff)
The file was modifiedsrc/cc/usdt.h (diff)
Commit 28a5cef94294a0f91d2c783fe912f0eb951e71dd by Daniel Xu
usdt: Use uprobe refcnt if available in usdt C++ API
(commit: 28a5cef)
The file was modifiedsrc/cc/api/BPF.cc (diff)
Commit 8287f172ddfc488d76b9af8645638da605ac516f by Daniel Xu
folly: Update tracing headers

Sync to upstream folly.

Also turn all users of the headers to be C++ programs instead of C b/c
folly now #includes <cstddef>.
(commit: 8287f17)
The file was addedtests/python/include/folly/tracing/StaticTracepoint-ELFx86.h
The file was modifiedtests/cc/CMakeLists.txt (diff)
The file was removedtests/cc/usdt_test_lib.c
The file was removedtests/python/include/folly/tracing/StaticTracepoint-ELF.h
The file was addedtests/cc/usdt_test_lib.cc
The file was modifiedtests/python/test_usdt2.py (diff)
The file was modifiedtests/python/include/folly/tracing/StaticTracepoint.h (diff)
The file was modifiedtests/python/test_usdt3.py (diff)
The file was modifiedtests/python/test_usdt.py (diff)
Commit 50ad6faba240cbb0e8c9d445feb84f2499472a6d by Daniel Xu
usdt: Add test for uprobe refcnt support
(commit: 50ad6fa)
The file was modifiedtests/cc/test_usdt_probes.cc (diff)
Commit d4aecc6555688911a8b950d99c430e96ef369576 by yonghong-song
Refactor docker image publishing

This adds support to push docker images to quay.io, like other projects in
the iovisor org.

It separates docker image builds into a separate github workflow, and
refactors the package building process slightly, to be generic, in order to
create builds for both ubuntu 16.04 and ubuntu 18.04.

This provides a means to distribute intermediate apt packages between releases,
and also enables uploading these as CI artifacts.

As recent releases have not annotated their tags, it drops the requirement for
tags to be annotated in selecting the version to use.
(commit: d4aecc6)
The file was modified.github/workflows/bcc-test.yml (diff)
The file was modifiedDockerfile.ubuntu (diff)
The file was modifiedscripts/build-deb.sh (diff)
The file was addedscripts/docker/auth.sh
The file was addedscripts/docker/build.sh
The file was modifiedscripts/git-tag.sh (diff)
The file was addedscripts/docker/push.sh
The file was added.github/workflows/publish.yml
The file was modified.gitignore (diff)
The file was modified.github/workflows/publish.yml (diff)
The file was modifieddebian/control (diff)
Commit d35a2dc38514f4a0235f957606ab825c97d651eb by yonghong-song
Guard artifact upload with environment variable
(commit: d35a2dc)
The file was modified.github/workflows/publish.yml (diff)
Commit 9269e48712d754b1e0ea91dc2fc21b6e9127c4e6 by yonghong-song
Prefer newer llvm/clang versions in debian packaging
(commit: 9269e48)
The file was modifieddebian/control (diff)
Commit 4967a61ddaf032f4d0bd5ee73360bff400f447e5 by yonghong-song
Do not permit errors in docker build
(commit: 4967a61)
The file was modifiedscripts/docker/build.sh (diff)
Commit 48946d2f31afbfb7b4bc7c62a9d3d6f1d2ffc330 by yonghong-song
python: import ABCs from collections.abc

Importing Abstract Base Classes (ABCs) from the collections module
is deprecated since Python 3.3, it emits a warning since Python 3.8,
and it will stop working in Python 3.10.

Try importing MutableMapping from collections.abc (the preferred way since
Python 3.3) and, in case of error (Python < 3.3) fall back to importing it
from collections.
(commit: 48946d2)
The file was modifiedsrc/python/bcc/table.py (diff)
Commit 33817e6c4e61ed36bff81ef83b2f5cceeb7fa87c by yonghong-song
add DNS correlation to connect tracking
(commit: 33817e6)
The file was modifiedDockerfile.ubuntu (diff)
The file was modifiedscripts/build-rpm.sh (diff)
The file was modifiedscripts/bpf_demo.ks.erb (diff)
The file was modifiedtools/tcpconnect_example.txt (diff)
The file was modifiedINSTALL.md (diff)
The file was modifiedDockerfile.tests (diff)
The file was modifiedman/man8/tcpconnect.8 (diff)
The file was modifiedtools/tcpconnect.py (diff)
Commit 1591469305280a9a66635f8af8f0fcb47a839ef7 by yonghong-song
Update INSTALL.md

For ubuntu focal fossa only instructions given for Eoan worked for me. If we don't add Focal fossa to list people will go to "For other versions" section. which refers to libllvm3.7 which could not be installed on ubuntu focal. Hence this proposed change
(commit: 1591469)
The file was modifiedINSTALL.md (diff)
Commit 5ab0183dcb94eb27d9a180b5abff6ada23a795db by yonghong-song
docs(INSTALL): add libfl-dev to ubuntu dependencies

To compile the software on Ubuntu 20.04 I had trouble compiling the source because my OS is missing the `FlexLexer.h` library. This package is supplied by `libfl-dev`.
(commit: 5ab0183)
The file was modifiedINSTALL.md (diff)
Commit 15efd46a199522e17efa7abadb73f81c767bc3ba by yonghong-song
sync with latest libbpf repo

sync with libbpf v0.2.0

Signed-off-by: Yonghong Song <yhs@fb.com>
(commit: 15efd46)
The file was modifiedsrc/cc/libbpf.c (diff)
The file was modifieddocs/kernel-versions.md (diff)
The file was modifiedsrc/cc/libbpf (diff)
The file was modifiedsrc/cc/compat/linux/virtual_bpf.h (diff)
The file was modifiedsrc/cc/export/helpers.h (diff)
Commit ad5b82a5196b222ed2cdc738d8444e8c9546a77f by yonghong-song
update debian changelog for release v0.17.0

* Support for kernel up to 5.9
* usdt: add uprobe refcnt support
* use newer llvm/clang versions in debian packaging if possible
* add bpf iterator C++ support
* new bcc tools: tcprtt, netqtop, swapin, tcpsynbl, threadsnoop
* tcpconnect: add DNS correlation to connect tracking
* new libbpf-tools: llcstat, numamove, runqlen, runqlat, softirgs, hardirqs
* doc update, bug fixes and some additional arguments for tools

Signed-off-by: Yonghong Song <yhs@fb.com>
(commit: ad5b82a)
The file was modifieddebian/changelog (diff)
Commit 12107c6936c6f5d64dd305c8a7d068c07086fd17 by yonghong-song
use correct arch register for the 4th param of x86_64 syscalls

Fix #3150

On x86_64, for syscalls, the calling convension is to use
r10 instead of rcx for the 4th parameter. I have verified this
with disassembling vmlinux codes.
  https://www.systutorials.com/x86-64-calling-convention-by-gcc/

bcc previously used rcx for the 4th parameter for all cases.
This patch fixed the issue by using r10 for syscalls.
A macro PT_REGS_PARM4_SYSCALL() is also introduced in helpers.h
to access the 4th parameter for r10.

Signed-off-by: Yonghong Song <yhs@fb.com>
(commit: 12107c6)
The file was modifiedsrc/cc/frontends/clang/arch_helper.h (diff)
The file was modifiedsrc/cc/frontends/clang/loader.cc (diff)
The file was modifiedsrc/cc/export/helpers.h (diff)
The file was modifiedsrc/cc/frontends/clang/b_frontend_action.cc (diff)
Commit 11c93f613b43e296f949a231684d544016fd0bcb by yhs
fix compilation issues with latest llvm12 trunk

With latest llvm12 trunk, we got two compilation bugs.

Bug #1:
  /home/yhs/work/bcc/src/cc/frontends/clang/b_frontend_action.cc:
     In member function ‘void ebpf::BFrontendAction::DoMiscWorkAround()’:
  /home/yhs/work/bcc/src/cc/frontends/clang/b_frontend_action.cc:1706:31:
     error: ‘class clang::SourceManage’ has no member named ‘getBuffer’; did you mean ‘getBufferData’?
     rewriter_->getSourceMgr().getBuffer(rewriter_->getSourceMgr().getMainFileID())->getBufferSize(),
                               ^~~~~~~~~
                               getBufferData

  This is due to upstream change https://reviews.llvm.org/D89394.
  To fix, follow upstream examples in https://reviews.llvm.org/D89394.

Bug #2:
  /home/yhs/work/bcc/src/cc/bpf_module.cc: In member function ‘int ebpf::BPFModule::finalize()’:
  /home/yhs/work/bcc/src/cc/bpf_module.cc:470:11:
    error: ‘class llvm::EngineBuilder’ has no member named ‘setUseOrcMCJITReplacement’
   builder.setUseOrcMCJITReplacement(false);
           ^~~~~~~~~~~~~~~~~~~~~~~~~

  This is due to upstream
    https://github.com/llvm/llvm-project/commit/6154c4115cd4b78d0171892aac21e340e72e32bd

  It seems builder.setUseOrcMCJITReplacement() is not needed any more. So just remove it
  from bcc.

Signed-off-by: Yonghong Song <yhs@fb.com>
(commit: 11c93f6)
The file was modifiedsrc/cc/frontends/clang/b_frontend_action.cc (diff)
The file was modifiedsrc/cc/bpf_module.cc (diff)
The file was modifiedsrc/cc/bpf_module_rw_engine.cc (diff)