Yonghong Song [Wed, 10 Aug 2022 04:36:57 +0000 (21:36 -0700)]
fix llvm15 compilation error
With llvm15, bcc failed the compilation with the following errors:
[100%] Building CXX object tests/cc/CMakeFiles/test_libbcc.dir/test_shared_table.cc.o
/home/yhs/work/llvm-project/llvm/build/install/lib/libclangSema.a(SemaRISCVVectorLookup.cpp.o):
In function `(anonymous namespace)::RISCVIntrinsicManagerImpl::InitIntrinsicList()':
SemaRISCVVectorLookup.cpp:
(.text._ZN12_GLOBAL__N_125RISCVIntrinsicManagerImpl17InitIntrinsicListEv+0x14b):
undefined reference to `clang::RISCV::RVVIntrinsic::computeBuiltinTypes(
llvm::ArrayRef<clang::RISCV::PrototypeDescriptor>, bool, bool, bool, unsigned int)'
SemaRISCVVectorLookup.cpp:(.text._ZN12_GLOBAL__N_125RISCVIntrinsicManagerImpl17InitIntrinsicListEv+0x182):
undefined reference to `clang::RISCV::RVVIntrinsic::computeBuiltinTypes(
llvm::ArrayRef<clang::RISCV::PrototypeDescriptor>, bool, bool, bool, unsigned int)'
...
make[1]: *** [CMakeFiles/Makefile2:1110: examples/cpp/CMakeFiles/CGroupTest.dir/all] Error 2
...
The failure is due to llvm upstream patch https://reviews.llvm.org/
D111617
which introduced another dependency on libclangSupport.a for bcc.
To fix the issue, I added libclangSupport in cmake file.
Change-Id: Ib22adc6ed4cea639a42660ce362e22b32bdd4b85
Origin: upstream, https://github.com/iovisor/bcc/commit/
c65e6c5ec5b629ef302259731df33b41b0d705ca
Signed-off-by: Yonghong Song <yhs@fb.com>
Signed-off-by: Łukasz Stelmach <l.stelmach@samsung.com>
Hengqi Chen [Thu, 28 Apr 2022 11:02:47 +0000 (11:02 +0000)]
bcc: Introduce new pass manager
There are two pass managers in LLVM. Currently BCC uses the legacy one.
Switch to the new pass manager because the legacy one will be removed
in upcoming releases of LLVM.
Running the following script:
```
from bcc import BPF
bpf_text = '''
static int foobar()
{
bpf_trace_printk("enter vfs_read");
return 0;
}
KFUNC_PROBE(vfs_read)
{
return foobar();
}
'''
BPF(text=bpf_text, debug=1)
```
The IR output is the same with or without this change using LLVM 15:
; ModuleID = 'sscanf'
source_filename = "sscanf"
; ModuleID = '/virtual/main.c'
source_filename = "/virtual/main.c"
target datalayout = "e-m:e-p:64:64-i64:64-i128:128-n32:64-S128"
target triple = "bpf-pc-linux"
@_version = dso_local global i32 332032, section "version", align 4, !dbg !0
@_license = dso_local global [4 x i8] c"GPL\00", section "license", align 1, !dbg !5
@__const.foobar._fmt = private unnamed_addr constant [15 x i8] c"enter vfs_read\00", align 1
@llvm.compiler.used = appending global [2 x ptr] [ptr @_license, ptr @_version], section "llvm.metadata"
; Function Attrs: alwaysinline nounwind
define dso_local i32 @kfunc__vfs_read(ptr nocapture noundef readnone %0) local_unnamed_addr #0 section ".bpf.fn.kfunc__vfs_read" !dbg !33 {
%2 = alloca [15 x i8], align 1
call void @llvm.dbg.value(metadata ptr %0, metadata !39, metadata !DIExpression()), !dbg !41
call void @llvm.dbg.value(metadata ptr undef, metadata !42, metadata !DIExpression()) #4, !dbg !45
call void @llvm.lifetime.start.p0(i64 15, ptr nonnull %2) #4, !dbg !47
call void @llvm.dbg.declare(metadata ptr %2, metadata !53, metadata !DIExpression()) #4, !dbg !58
call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 1 dereferenceable(15) %2, ptr noundef nonnull align 1 dereferenceable(15) @__const.foobar._fmt, i64 15, i1 false) #4, !dbg !58
%3 = call i32 (ptr, i64, ...) inttoptr (i64 6 to ptr)(ptr noundef nonnull %2, i64 noundef 15) #4, !dbg !59
call void @llvm.lifetime.end.p0(i64 15, ptr nonnull %2) #4, !dbg !60
call void @llvm.dbg.value(metadata i32 0, metadata !40, metadata !DIExpression()), !dbg !41
ret i32 0, !dbg !61
}
; Function Attrs: alwaysinline mustprogress nocallback nofree nosync nounwind readnone speculatable willreturn
declare void @llvm.dbg.declare(metadata, metadata, metadata) #1
; Function Attrs: alwaysinline argmemonly mustprogress nocallback nofree nosync nounwind willreturn
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #2
; Function Attrs: alwaysinline argmemonly mustprogress nocallback nofree nosync nounwind willreturn
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #2
; Function Attrs: alwaysinline argmemonly mustprogress nofree nounwind willreturn
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #3
; Function Attrs: alwaysinline mustprogress nocallback nofree nosync nounwind readnone speculatable willreturn
declare void @llvm.dbg.value(metadata, metadata, metadata) #1
attributes #0 = { alwaysinline nounwind "frame-pointer"="none" "min-legal-vector-width"="0" "no-jump-tables"="true" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { alwaysinline mustprogress nocallback nofree nosync nounwind readnone speculatable willreturn }
attributes #2 = { alwaysinline argmemonly mustprogress nocallback nofree nosync nounwind willreturn }
attributes #3 = { alwaysinline argmemonly mustprogress nofree nounwind willreturn }
attributes #4 = { nounwind }
!llvm.dbg.cu = !{!2}
!llvm.module.flags = !{!27, !28, !29, !30, !31}
!llvm.ident = !{!32}
!0 = !DIGlobalVariableExpression(var: !1, expr: !DIExpression())
!1 = distinct !DIGlobalVariable(name: "_version", scope: !2, file: !14, line: 526, type: !26, isLocal: false, isDefinition: true)
!2 = distinct !DICompileUnit(language: DW_LANG_C99, file: !3, producer: "Ubuntu clang version 15.0.0-++
20220426083628+
d738d4717f6d-1~exp1~
20220426203725.435", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, globals: !4, splitDebugInlining: false, nameTableKind: None)
!3 = !DIFile(filename: "/virtual/main.c", directory: "/home/ubuntu/sources/bpf-next")
!4 = !{!0, !5, !12}
!5 = !DIGlobalVariableExpression(var: !6, expr: !DIExpression())
!6 = distinct !DIGlobalVariable(name: "_license", scope: !2, file: !7, line: 26, type: !8, isLocal: false, isDefinition: true)
!7 = !DIFile(filename: "/virtual/include/bcc/footer.h", directory: "")
!8 = !DICompositeType(tag: DW_TAG_array_type, baseType: !9, size: 32, elements: !10)
!9 = !DIBasicType(name: "char", size: 8, encoding: DW_ATE_signed_char)
!10 = !{!11}
!11 = !DISubrange(count: 4)
!12 = !DIGlobalVariableExpression(var: !13, expr: !DIExpression())
!13 = distinct !DIGlobalVariable(name: "bpf_trace_printk_", scope: !2, file: !14, line: 542, type: !15, isLocal: true, isDefinition: true)
!14 = !DIFile(filename: "/virtual/include/bcc/helpers.h", directory: "")
!15 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !16, size: 64)
!16 = !DISubroutineType(types: !17)
!17 = !{!18, !19, !21, null}
!18 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed)
!19 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !20, size: 64)
!20 = !DIDerivedType(tag: DW_TAG_const_type, baseType: !9)
!21 = !DIDerivedType(tag: DW_TAG_typedef, name: "u64", file: !22, line: 23, baseType: !23)
!22 = !DIFile(filename: "include/asm-generic/int-ll64.h", directory: "/home/ubuntu/sources/bpf-next")
!23 = !DIDerivedType(tag: DW_TAG_typedef, name: "__u64", file: !24, line: 31, baseType: !25)
!24 = !DIFile(filename: "include/uapi/asm-generic/int-ll64.h", directory: "/home/ubuntu/sources/bpf-next")
!25 = !DIBasicType(name: "unsigned long long", size: 64, encoding: DW_ATE_unsigned)
!26 = !DIBasicType(name: "unsigned int", size: 32, encoding: DW_ATE_unsigned)
!27 = !{i32 7, !"Dwarf Version", i32 4}
!28 = !{i32 2, !"Debug Info Version", i32 3}
!29 = !{i32 1, !"wchar_size", i32 4}
!30 = !{i32 7, !"PIC Level", i32 2}
!31 = !{i32 7, !"PIE Level", i32 2}
!32 = !{!"Ubuntu clang version 15.0.0-++
20220426083628+
d738d4717f6d-1~exp1~
20220426203725.435"}
!33 = distinct !DISubprogram(name: "kfunc__vfs_read", scope: !34, file: !34, line: 23, type: !35, scopeLine: 23, flags: DIFlagPrototyped | DIFlagAllCallsDescribed, spFlags: DISPFlagDefinition | DISPFlagOptimized, unit: !2, retainedNodes: !38)
!34 = !DIFile(filename: "/virtual/main.c", directory: "")
!35 = !DISubroutineType(types: !36)
!36 = !{!18, !37}
!37 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !25, size: 64)
!38 = !{!39, !40}
!39 = !DILocalVariable(name: "ctx", arg: 1, scope: !33, file: !34, line: 23, type: !37)
!40 = !DILocalVariable(name: "__ret", scope: !33, file: !34, line: 23, type: !18)
!41 = !DILocation(line: 0, scope: !33)
!42 = !DILocalVariable(name: "ctx", arg: 1, scope: !43, file: !34, line: 23, type: !37)
!43 = distinct !DISubprogram(name: "____kfunc__vfs_read", scope: !34, file: !34, line: 23, type: !35, scopeLine: 24, flags: DIFlagPrototyped | DIFlagAllCallsDescribed, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition | DISPFlagOptimized, unit: !2, retainedNodes: !44)
!44 = !{!42}
!45 = !DILocation(line: 0, scope: !43, inlinedAt: !46)
!46 = distinct !DILocation(line: 23, column: 1, scope: !33)
!47 = !DILocation(line: 15, column: 5, scope: !48, inlinedAt: !57)
!48 = distinct !DILexicalBlock(scope: !49, file: !34, line: 15, column: 3)
!49 = distinct !DISubprogram(name: "foobar", scope: !34, file: !34, line: 13, type: !50, scopeLine: 14, flags: DIFlagAllCallsDescribed, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition | DISPFlagOptimized, unit: !2, retainedNodes: !52)
!50 = !DISubroutineType(types: !51)
!51 = !{!18}
!52 = !{!53}
!53 = !DILocalVariable(name: "_fmt", scope: !48, file: !34, line: 15, type: !54)
!54 = !DICompositeType(tag: DW_TAG_array_type, baseType: !9, size: 120, elements: !55)
!55 = !{!56}
!56 = !DISubrange(count: 15)
!57 = distinct !DILocation(line: 25, column: 9, scope: !43, inlinedAt: !46)
!58 = !DILocation(line: 15, column: 10, scope: !48, inlinedAt: !57)
!59 = !DILocation(line: 15, column: 37, scope: !48, inlinedAt: !57)
!60 = !DILocation(line: 15, column: 76, scope: !49, inlinedAt: !57)
!61 = !DILocation(line: 23, column: 1, scope: !33)
Closes #3947.
References:
[0]: https://llvm.org/docs/NewPassManager.html
[1]: https://blog.llvm.org/posts/2021-03-26-the-new-pass-manager/
Change-Id: I6477250b7e9952ea098113785a42c5b0f645b6f0
Origin: upstream, https://github.com/iovisor/bcc/commit/
c9635f8aa5e974bb30d5a7935054878a6eb5af53
Signed-off-by: Hengqi Chen <chenhengqi@outlook.com>
Signed-off-by: Łukasz Stelmach <l.stelmach@samsung.com>
Yonghong Song [Thu, 17 Feb 2022 16:38:28 +0000 (08:38 -0800)]
fix a llvm compilation error due to header file reshuffle
llvm upstream https://reviews.llvm.org/
D119723 removed
header file llvm/DebugInfo/DWARF/DWARFCompileUnit.h from
llvm/DebugInfo/DWARF/DWARFContext.h and this
caused bcc compilation failure:
...
.../src/cc/bcc_debug.cc: In member function ‘void ebpf::SourceDebugger::dump()’:
.../src/cc/bcc_debug.cc:186:69: error: no matching function for call to
‘llvm::DWARFContext::getLineTableForUnit(llvm::DWARFCompileUnit*&)’
const DWARFLineTable *LineTable = DwarfCtx->getLineTableForUnit(CU);
^
In file included from /home/yhs/work/bcc/src/cc/bcc_debug.cc:22:
...
Similar to fix in https://reviews.llvm.org/
D119723, let us explicitly
add llvm/DebugInfo/DWARF/DWARFCompileUnit.h in the .cc file.
Change-Id: I528537d1cccfbeffb95ff7bccf926bed8eb41a78
Origin: upstream, https://github.com/iovisor/bcc/commit/
e4d899ce335e263999c2664c9770c53018fc6c51
Signed-off-by: Yonghong Song <yhs@fb.com>
Signed-off-by: Łukasz Stelmach <l.stelmach@samsung.com>
Yonghong Song [Thu, 17 Feb 2022 17:22:40 +0000 (09:22 -0800)]
add WindowsDriver to llvm_raw_libs
Upstream https://reviews.llvm.org/
D118070 added a new
llvm raw lib LLVMWindowsDriver and this caused bcc
compilation error like below:
...
/home/yhs/work/bcc/build/src/cc/libbcc.so: undefined reference to
`llvm::getUniversalCRTSdkDir(llvm::vfs::FileSystem&,
llvm::Optional<llvm::StringRef>, llvm::Optional<llvm::StringRef>,
llvm::Optional<llvm::StringRef>,
std::__cxx11::basic_string<char, std::char_traits<char>,
std::allocator<char> >&,
std::__cxx11::basic_string<char, std::char_traits<char>,
std::allocator<char> >&)'
/home/yhs/work/bcc/build/src/cc/libbcc.so: undefined reference to
`llvm::useUniversalCRT(llvm::ToolsetLayout,
std::__cxx11::basic_string<char, std::char_traits<char>,
std::allocator<char> > const&, llvm::Triple::ArchType,
llvm::vfs::FileSystem&)'
...
Add this library explicitly for llvm >= 15 and
Compilation succeeded.
Change-Id: If3f65f14ea316ace356ff15c1160ef61ccfd4171
Origin: upstream, https://github.com/iovisor/bcc/commit/
a9fc750f95de89bba70d9637e787c966897d7523
Signed-off-by: Yonghong Song <yhs@fb.com>
Signed-off-by: Łukasz Stelmach <l.stelmach@samsung.com>
Yonghong Song [Tue, 15 Feb 2022 05:20:06 +0000 (21:20 -0800)]
fix llvm15 compilation error
With latest upstream llvm15, we have the following compilation
error:
<...>/src/cc/bpf_module_rw_engine.cc: In member function ‘int ebpf::BPFModule::annotate()’:
<...>/src/cc/bpf_module_rw_engine.cc:404:53: error: ‘class llvm::PointerType’ has no member named
‘getElementType’; did you mean ‘getArrayElementType’?
if (StructType *st = dyn_cast<StructType>(pt->getElementType())) {
^~~~~~~~~~~~~~
getArrayElementType
In file included from /usr/include/c++/8/memory:80,
from /<...>/llvm-project/llvm/build/install/include/llvm/ADT/SmallVector.h:28,
from /<...>/llvm-project/llvm/build/install/include/llvm/ADT/MapVector.h:21,
from /<...>/llvm-project/llvm/build/install/include/llvm/DebugInfo/DWARF/DWARFContext.h:12,
from /<...>/src/cc/bcc_debug.cc:22:
/usr/include/c++/8/bits/unique_ptr.h: In instantiation of ‘void std::default_delete<_Tp>::operator()(_Tp*) const [with _Tp = llvm::MCSubtargetInfo]’:
/usr/include/c++/8/bits/unique_ptr.h:277:17: required from ‘std::unique_ptr<_Tp, _Dp>::~unique_ptr() [with _Tp = llvm::MCSubtargetInfo; _Dp = std::default_delete<llvm::MCSubtargetInfo>]’
/<...>/src/cc/bcc_debug.cc:136:50: required from here
/usr/include/c++/8/bits/unique_ptr.h:79:16: error: invalid application of ‘sizeof’ to incomplete type ‘llvm::MCSubtargetInfo’
static_assert(sizeof(_Tp)>0,
^~~~~~~~~~~
There are two problems here. The first compilation error is due to
https://github.com/llvm/llvm-project/commit/
d593cf79458a59d37e75c886a4fc3ac6a02b484d
where PointerType->getElementType() is removed.
The second error is due to https://reviews.llvm.org/
D119244 which reshuffles
header files which removes MCSubtargetInfo.h from some header files used in bcc_debug.cc.
Change-Id: If655d4743765130504c73fea804b967468ed7d3e
Origin: upstream, https://github.com/iovisor/bcc/commit/
d7ff054cdabd881c247079c046531a5913217624
Signed-off-by: Yonghong Song <yhs@fb.com>
Signed-off-by: Łukasz Stelmach <l.stelmach@samsung.com>
Hubert Kowalski [Mon, 7 Feb 2022 15:39:25 +0000 (16:39 +0100)]
dbus-glib-receiving: new options: --raw and --output
Change-Id: Ie63bcea512ff33565b7be2fb87adb063b9244da7
Adrian Szyndela [Fri, 28 Jan 2022 13:59:10 +0000 (14:59 +0100)]
dbus tools: print averages
This adds collecting and printing of average timings for
the dbus tools. Unfortunately, it is in a copy & paste style
as I didn't find a way to share BPF maps code between the tools.
I've even tried static implementation in an included header. Doesn't work.
Apparently bcc needs it in one file, analysed by bcc, before
it is passed to libllvm's preprocessor.
Change-Id: Id1c259b47ee7cfb0b05ac36d4800ea041af11e9c
Adrian Szyndela [Wed, 26 Jan 2022 10:36:05 +0000 (11:36 +0100)]
dbus-latency: rework command line options
Remove '--histogram', it is now default.
Make 'count' option work.
Add '--no-gio' and '--no-libdbus' for flexibility.
Change-Id: If1cdc3e9b9d0f99fc636517894b25ae7bea6fa64
Adrian Szyndela [Tue, 18 Jan 2022 14:43:29 +0000 (15:43 +0100)]
dbus-tools: new tools for message path in glib
Add new tools for measurements:
dbus-glib-client-sending - for gio API usage
dbus-glib-sending - for threads gap while sending
dbus-glib-receiving - for threads gap while receiving
Change-Id: I3d26346df5a3f7273794d4e240acdc350fda2d67
Adrian Szyndela [Mon, 21 Feb 2022 09:50:12 +0000 (10:50 +0100)]
dbus tools: switch tools to python3
New version of bcc is built for python3.
This is a convenience change for our tools, to run them
smoothly when both python3 and python2 are installed on the system,
and /usr/bin/python points to python2.
Change-Id: I782972cee553af9a27f2b013b48eef70b94a7591
Adrian Szyndela [Mon, 21 Feb 2022 08:58:21 +0000 (09:58 +0100)]
fix running eBPF programs on 64-bit architectures
32-bit architectures are not supported by the original bcc.
Our changes, which were supposed to support bcc on armv7l,
appeared to be working also with 64-bit architectures
before the bcc upgrade. Now, they break running the programs
on aarch64. So, let's step back, bring back aarch64, and hack it once again,
if ever needed.
Change-Id: I9b30b8f4267d36008ea4b753e3832514ab1682b6
Adrian Szyndela [Fri, 18 Feb 2022 13:02:53 +0000 (14:02 +0100)]
packaging: enable building for aarch64
Change-Id: Id8c602cb897c3223ee863d4d81d6f402f73ae188
Adrian Szyndela [Thu, 17 Feb 2022 12:08:43 +0000 (13:08 +0100)]
packaging: bump version to v0.24.0
Change-Id: Ifc55899f22eb3ae9e0b5b76e8eb41d15d19110e7
Adrian Szyndela [Thu, 17 Feb 2022 12:08:00 +0000 (13:08 +0100)]
Merge 'v0.24.0' into tizen
Change-Id: I7826c3d82ddea6b3918020acd53c85f8995335be
Adrian Szyndela [Thu, 17 Feb 2022 08:15:42 +0000 (09:15 +0100)]
add BPF syscall number for x86 arch
Change-Id: Ic47df8ca4ab848dbec8a934c105680f43c34fc29
Adrian Szyndela [Wed, 16 Feb 2022 22:02:34 +0000 (23:02 +0100)]
packaging: bump version to 0.21.0
Change-Id: I40efa640a63c6ff91d56ac5f2e6ce42879ae4a55
Adrian Szyndela [Wed, 16 Feb 2022 16:46:52 +0000 (17:46 +0100)]
Merge branch 'upstream' into tizen
Change-Id: Ia7bec8aef691640dd8f586752307e2d4cb908810
Hubert Kowalski [Tue, 18 Jan 2022 12:41:25 +0000 (13:41 +0100)]
Removed erroneous 'if' statement in get_delay()
That 'if' statement will break average val calculation after 1000 hits.
Change-Id: I77689b6dd1e8fb12925eae47c3cee2cfeacdd05c
Yonghong Song [Fri, 14 Jan 2022 17:26:33 +0000 (09:26 -0800)]
update debian changelog for release v0.24.0
* Support for kernel up to 5.16
* bcc tools: update for trace.py, sslsniff.py, tcptop.py, hardirqs.py, etc.
* new libbpf tools: bashreadline
* allow specify wakeup_events for perf buffer
* support BPF_MAP_TYPE_{INODE, TASK}_STORAGE maps
* remove all deprecated libbpf function usage
* remove P4/B language support
* major test infra change, using github actions now
* doc update, bug fixes and other tools improvement
Signed-off-by: Yonghong Song <yhs@fb.com>
Mauricio Vásquez [Thu, 13 Jan 2022 19:39:33 +0000 (14:39 -0500)]
libbpf: Fix kernel BTF detection logic
bpf_has_kernel_btf() is used to check whether the kernel has BTF or not.
It's part of the logic that checks if kfunc and lsm programs are supported.
Before this commit it used libbpf_find_vmlinux_btf_id(), this function
calls btf__load_vmlinux_btf() that tries to load the BTF from different
places, the canonical vmlinux in sysfs and other locations.
This is not accurate as kfunc and lsm programs require to have the BTF
file exposed directly by the kernel (CONFIG_DEBUG_INFO_BTF should be set).
This commit updates that function to check if BTF is exposed directly
by the kernel.
This was causing opensnoop to try to use kfunc programs (instead of
kprobes) in systems where they are not supported:
$ ls /usr/lib/debug/boot/vmlinux-$(uname -r)
/usr/lib/debug/boot/vmlinux-5.11.0-38-generic
$ cat /boot/config-$(uname -r) | grep -i CONFIG_DEBUG_INFO_BTF
$ sudo stat /sys/kernel/btf/vmlinux
stat: cannot stat '/sys/kernel/btf/vmlinux': No such file or directory
$ sudo python3 /usr/share/bcc/tools/opensnoop
bpf: Failed to load program: Invalid argument
Traceback (most recent call last):
File "/usr/share/bcc/tools/opensnoop", line 321, in <module>
b = BPF(text=bpf_text)
File "/usr/lib/python3/dist-packages/bcc/__init__.py", line 483, in __init__
self._trace_autoload()
File "/usr/lib/python3/dist-packages/bcc/__init__.py", line 1466, in _trace_autoload
self.attach_kretfunc(fn_name=func_name)
File "/usr/lib/python3/dist-packages/bcc/__init__.py", line 1140, in attach_kretfunc
fn = self.load_func(fn_name, BPF.TRACING)
File "/usr/lib/python3/dist-packages/bcc/__init__.py", line 522, in load_func
raise Exception("Failed to load BPF program %s: %s" %
Exception: Failed to load BPF program b'kretfunc____x64_sys_open': Invalid argument
Fixes: 1ad2656a1d9c ("Add support_kfunc function to BPF object")
Signed-off-by: Mauricio Vásquez <mauricio@kinvolk.io>
Yonghong Song [Fri, 14 Jan 2022 06:35:44 +0000 (22:35 -0800)]
Sync with latest libbpf repo
Sync up to the following commit:
22411acc4b2c ci: Add userfaultfd kernel config
Signed-off-by: Yonghong Song <yhs@fb.com>
zhenwei pi [Thu, 13 Jan 2022 11:56:32 +0000 (19:56 +0800)]
tools/trace.py: aggregate trace events by '-A' option
Orignally we can save the backtrace of a specified function into a
text file, then try to analyze the messy trace to guess why the
function is called.
To make the work easier, aggregate amount of trace by -A with -M EVENTS.
A typical example:
1, if we find that the sys CPU utilization is higher by 'top' command
2, then find that the timer interrupt is more normal by 'irqtop' command
3, to confirm kernel timer setting frequence by 'funccount -i 1 clockevents_program_event'
4, to trace timer setting by 'trace clockevents_program_event -K -A -M 1000'
1294576 1294584 CPU 0/KVM clockevents_program_event
clockevents_program_event+0x1 [kernel]
hrtimer_start_range_ns+0x209 [kernel]
start_sw_timer+0x173 [kvm]
restart_apic_timer+0x6c [kvm]
kvm_set_msr_common+0x442 [kvm]
__kvm_set_msr+0xa2 [kvm]
kvm_emulate_wrmsr+0x36 [kvm]
vcpu_enter_guest+0x326 [kvm]
kvm_arch_vcpu_ioctl_run+0xcc [kvm]
kvm_vcpu_ioctl+0x22f [kvm]
do_vfs_ioctl+0xa1 [kernel]
ksys_ioctl+0x60 [kernel]
__x64_sys_ioctl+0x16 [kernel]
do_syscall_64+0x59 [kernel]
entry_SYSCALL_64_after_hwframe+0x44 [kernel]
-->COUNT 271
...
Then we can know that 271 timer setting in recent 1000(~27%) occurs in
KVM code path.
To avoid too large size of a dictionary in python, -A works always with
-M.
Also fix several minor changes to keep 'trace -h' aligned with trace_example.txt.
Signed-off-by: zhenwei pi <pizhenwei@bytedance.com>
Dave Marchevsky [Wed, 12 Jan 2022 02:04:15 +0000 (21:04 -0500)]
Merge pull request #3806 from davemarchevsky/davemarchevsky_rw_engine_tests
Add rwengine=OFF test run, disable tests we expect to fail during it
Dave Marchevsky [Wed, 12 Jan 2022 00:08:13 +0000 (19:08 -0500)]
Add RW_ENGINE_ENABLED=OFF test run for ubuntu Debug build
Dave Marchevsky [Tue, 11 Jan 2022 23:42:20 +0000 (18:42 -0500)]
Disable tests that will fail when rwengine=off
When ENABLE_LLVM_NATIVECODEGEN is OFF, the bpf module rw_engine code
will not be used. This is the code that generates custom sscanf and
printf functions for BPF map defs. These generated functions are used
to serialize arguments to update_value (and similar calls which take
string as input) to the correct key / value types.
It's still possible to use update_value and its ilk without rw_engine
enabled, just need to use the variants that take raw bytes and do
serialization manually. In the future we can add some simple
sscanf/printfs for common types that can be used without LLVM
generation.
For now, when rw_engine is disabled, it's fine to skip tests that
require these autogenerated functions.
Dave Marchevsky [Tue, 11 Jan 2022 06:30:13 +0000 (01:30 -0500)]
Add perf_reader_consume
In order to read 'remainder' events from perf buffers w/ 'wakeup_events
> 1', an API to force reading from a program's perf buffers regardless
of whether their fds are in "ready to read" state is necessary. This
commit introduces such an API, perf_reader_consume, modeled after
libbpf's perf_buffer__consume.
Future work will refactor bcc to use libbpf's perf buffer
support as much as possible instead of duplicating functionality. For
now, since #3801 was commited let's add this piece of missing
functionality.
Dave Marchevsky [Mon, 10 Jan 2022 20:30:15 +0000 (15:30 -0500)]
Merge pull request #3802 from thcipriani/patch-1
Typo "flgas" -> "flags"
Rong Tao [Mon, 10 Jan 2022 16:01:50 +0000 (00:01 +0800)]
remove extra spaces (#3804)
remove extra spaces
Dave Marchevsky [Sun, 9 Jan 2022 22:55:45 +0000 (17:55 -0500)]
Merge pull request #3803 from iovisor/davemarchevsky-patch-5
Add davemarchevsky to CODEOWNERS for everything
Dave Marchevsky [Sun, 9 Jan 2022 22:14:26 +0000 (17:14 -0500)]
Add davemarchevsky to CODEOWNERS for everything
I can't figure out how to get emailed for all PRs, and I'm doing reviews for the whole repo, so add self to codeowners everywhere.
Tyler Cipriani [Sun, 9 Jan 2022 21:38:26 +0000 (14:38 -0700)]
Typo "flgas" -> "flags"
Dave Marchevsky [Sun, 9 Jan 2022 09:52:47 +0000 (04:52 -0500)]
Merge pull request #3801 from chenhengqi/issue-3793
bcc: Allow specify wakeup_events for perf buffer
Liz Rice [Fri, 7 Jan 2022 14:51:36 +0000 (14:51 +0000)]
libbpf-tools: README how to update libbpf submodule
An outdated libbpf submodule can cause the libbpf-tools `make` to fail. Adding note to the README on how to update it.
Rong Tao [Sat, 8 Jan 2022 19:36:00 +0000 (03:36 +0800)]
reallocarray: eliminate compilation warnings (#3798)
there are compile warnings below for klockstat.
```bash
CC klockstat.o
klockstat.c: In function ‘print_stats’:
klockstat.c:396:12: warning: implicit declaration of function ‘reallocarray’; did you mean ‘realloc’? [-Wimplicit-function-declaration]
stats = reallocarray(stats, stats_sz, sizeof(void *));
^~~~~~~~~~~~
realloc
klockstat.c:396:10: warning: assignment to ‘struct stack_stat **’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
stats = reallocarray(stats, stats_sz, sizeof(void *));
^
BINARY klockstat
```
Defining _GNU_SOURCE fixed the problem.
Hengqi Chen [Sat, 8 Jan 2022 14:47:54 +0000 (22:47 +0800)]
bcc: Allow specify wakeup_events for perf buffer
This commit adds a new option `wakeup_events` to the open_perf_buffer API.
This provides an alternative to solve #3793.
Signed-off-by: Hengqi Chen <chenhengqi@outlook.com>
Dave Marchevsky [Fri, 7 Jan 2022 20:36:43 +0000 (15:36 -0500)]
Merge pull request #3794 from etep/vdso-detection-fix
bcc_syms.cc: bug fix; identify VDSO using 'name' vs. 'path'
Pete Stevenson [Thu, 6 Jan 2022 23:09:54 +0000 (15:09 -0800)]
bcc_syms.cc: bug fix; identify VDSO using 'name' vs. 'path' (use of path incorrectly compares /proc/<pid>/root[vdso] with [vdso]).
Signed-off-by: Pete Stevenson <jps@pixielabs.ai>
Dave Marchevsky [Fri, 7 Jan 2022 03:50:32 +0000 (22:50 -0500)]
Merge pull request #3796 from davemarchevsky/davemarchevsky_klockstat_fixups
libbpf-tools/klockstat: no more rlimit bumping + add comment
Dave Marchevsky [Fri, 7 Jan 2022 03:19:36 +0000 (22:19 -0500)]
libbpf-tools/klockstat: no more rlimit bumping + add comment
The PR adding the libbpf-tools port of klockstat was sitting in a
mergeable state for some time. Meanwhile, libbpf stopped exposing
rlimit_memlock bumping API and now does the rlimit bump automatically if
necessary. So remove the bump_rlimit_memlock call and set libbpf strict
mode for this tool.
Also, add a comment (from @brho's PR summary in #3688) detailing the
differences in default behavior between the libbpf-tools and bcc-python
versions.
Signed-off-by: Dave Marchevsky <davemarchevsky@fb.com>
Dave Marchevsky [Fri, 7 Jan 2022 02:36:12 +0000 (21:36 -0500)]
Merge pull request #3795 from Rtoax/patch-7
`-4` is better
Rong Tao [Fri, 7 Jan 2022 02:34:40 +0000 (10:34 +0800)]
`-4` is better
Dave Marchevsky [Thu, 6 Jan 2022 20:27:02 +0000 (15:27 -0500)]
Merge pull request #3688 from brho/master
libbpf-tools: add klockstat
Wei Fu [Tue, 28 Dec 2021 15:21:20 +0000 (23:21 +0800)]
libbpf-tools: fix dev_t type issue
The vmlinux.h uses u32 to define dev_t. But the user-space process uses
<sys/types.h> which uses 8 bytes for dev_t. When the libbpf uses mapped
memory to update .rodata, it might override other variable's value. We
should use u32 to fix it.
And also fix `biosnoop -d $dev-name` issue.
Signed-off-by: Wei Fu <fuweid89@gmail.com>
Hengqi Chen [Wed, 5 Jan 2022 15:30:40 +0000 (23:30 +0800)]
bcc: Replace deprecated libbpf APIs
Several libbpf APIs used by BCC are deprecated, which causes
annoying compilation warnings. Update BCC to use the replacement
APIs. The code is mainly borrowed from libbpf itself.
Signed-off-by: Hengqi Chen <chenhengqi@outlook.com>
Hengqi Chen [Wed, 5 Jan 2022 16:13:51 +0000 (00:13 +0800)]
bcc/docs: fix broken links in reference guide (#3789)
fix broken links in reference guide
Signed-off-by: Hengqi Chen <chenhengqi@outlook.com>
Hengqi Chen [Tue, 4 Jan 2022 16:02:49 +0000 (00:02 +0800)]
examples: Add local storage examples
Add examples to demostrate BPF_{INODE, TASK}_STORAGE usage.
$ sudo ./task_storage.py
b' nc-668442 [000] d..21
1221279.139354: bpf_trace_printk: inet_listen entry: store timestamp
1221271907116757'
b' nc-668442 [000] d..21
1221279.139375: bpf_trace_printk: inet_listen exit: cost 26us'
Signed-off-by: Hengqi Chen <chenhengqi@outlook.com>
Hengqi Chen [Tue, 4 Jan 2022 16:00:39 +0000 (00:00 +0800)]
bcc: support BPF_MAP_TYPE_{INODE, TASK}_STORAGE maps
Add support for BPF_MAP_TYPE_{INODE, TASK}_STORAGE in BCC.
Like sk local storage, this commit allows creating inode/task
local storage using BPF_{INODE, TASK}_STORAGE macros, and
manipulating maps using map.{inode, task}_storage_get() and
map.{inode, task}_storage_delete() helpers.
Signed-off-by: Hengqi Chen <chenhengqi@outlook.com>
Dave Marchevsky [Wed, 29 Dec 2021 23:48:39 +0000 (18:48 -0500)]
Vendor deprecated btf_ext APIs and structs
Some btf_ext-related APIs in libbpf are being deprecated because they
make incorrect assumptions. They're being used only by bcc currently, so
vendor them before they get deleted.
After / as part of #3660, may need to revisit the incorrect assumptions
being made here.
The functions and structs were ripped directly from libbpf with minimal
changes:
* Change void* arithmetic to uint8_t
* __u32 -> uint32_t and similar
* Add a wrapping namespace
* `rec_size` functions were not needed - just grab the rec_size
directly since type is no longer opaque to bcc
Hengqi Chen [Mon, 3 Jan 2022 13:36:48 +0000 (21:36 +0800)]
bcc: Fix array type handling due to llvm changes
The llvm commit
aee49255074f ([0]) changes array type
from `int [4]` to `int[4]` (with space removed), which
breaks the assumption in BCC. This commit fixes this
issue and adds a comment to the related code. While at
it, also remove execution permission of file `table.py`.
[0]: https://github.com/llvm/llvm-project/commit/
aee49255074fd4ef38d97e6e70cbfbf2f9fd0fa7
Signed-off-by: Hengqi Chen <chenhengqi@outlook.com>
chendotjs [Tue, 4 Jan 2022 19:26:15 +0000 (03:26 +0800)]
libbpf-tools: fix fentry prog in tcprtt (#3757)
This commit fixes judgement if tcp_rcv_established fentry exists and
fentry prog by introducing BPF_CORE_READ.
Signed-off-by: chendotjs <chendotjs@gmail.com>
Dave Marchevsky [Sat, 1 Jan 2022 21:37:40 +0000 (16:37 -0500)]
Merge pull request #3779 from davemarchevsky/davemarchevsky_build_libbpf_tools
Build libbpf tools as part of fedora test run
Dave Marchevsky [Thu, 30 Dec 2021 21:08:44 +0000 (16:08 -0500)]
Build libbpf-tools as part of test workflow on fedora
Dave Marchevsky [Wed, 29 Dec 2021 19:37:07 +0000 (14:37 -0500)]
Merge pull request #3778 from davemarchevsky/davemarchevsky_fedora_tests
add fedora docker tests + move dockerfiles to a new dir
Dave Marchevsky [Wed, 29 Dec 2021 03:45:22 +0000 (22:45 -0500)]
add fedora docker tests + move dockerfiles to a new dir
Dockerfiles are cluttering up the main repo dir, so move them to a
newly-created 'docker' dir.
Add a fedora dockerfile and use it in bcc-test workflow.
Dave Marchevsky [Wed, 29 Dec 2021 07:10:21 +0000 (02:10 -0500)]
Merge pull request #3773 from chenhengqi/support-verbose-mode
libbpf-tools: Support verbose mode and set custom libbpf print callback
Dave Marchevsky [Wed, 29 Dec 2021 04:33:29 +0000 (23:33 -0500)]
Merge pull request #3765 from bveldhoen/usdt_sample_update
Updated usdt_sample for ubuntu 21.10 (and python3)
Dave Marchevsky [Wed, 29 Dec 2021 04:32:08 +0000 (23:32 -0500)]
Merge pull request #3774 from MdSalih/docs-fixup-cpudist-example-by-pid
docs: Fixup cpudist pid example in man page
Mohammad Noor [Mon, 27 Dec 2021 19:27:20 +0000 (19:27 +0000)]
docs: Fixup cpudist pid example in man page
-P prints all by process id
-p prints specific process id
also fixed port num in example
Hengqi Chen [Sat, 25 Dec 2021 04:29:07 +0000 (12:29 +0800)]
libbpf-tools: Make custom libbpf callback function static
Update all tools to make libbpf_print_fn function static. While
at it, also keep the function signature in a single line since
they fit in a 100-character line.
Signed-off-by: Hengqi Chen <chenhengqi@outlook.com>
Hengqi Chen [Sat, 25 Dec 2021 04:11:23 +0000 (12:11 +0800)]
libbpf-tools: Add verbose option to statsnoop
Support verbose mode and set custom libbpf print callback
in statsnoop.
Signed-off-by: Hengqi Chen <chenhengqi@outlook.com>
Hengqi Chen [Sat, 25 Dec 2021 04:10:55 +0000 (12:10 +0800)]
libbpf-tools: Add verbose option to solisten
Support verbose mode and set custom libbpf print callback
in solisten.
Signed-off-by: Hengqi Chen <chenhengqi@outlook.com>
Hengqi Chen [Sat, 25 Dec 2021 04:10:22 +0000 (12:10 +0800)]
libbpf-tools: Add verbose option to mountsnoop
Support verbose mode and set custom libbpf print callback
in mountsnoop.
Signed-off-by: Hengqi Chen <chenhengqi@outlook.com>
Hengqi Chen [Sat, 25 Dec 2021 04:09:54 +0000 (12:09 +0800)]
libbpf-tools: Add verbose option to ksnoop
Support verbose mode and set custom libbpf print callback
in ksnoop.
Signed-off-by: Hengqi Chen <chenhengqi@outlook.com>
Hengqi Chen [Sat, 25 Dec 2021 04:09:27 +0000 (12:09 +0800)]
libbpf-tools: Add verbose option to gethostlatency
Support verbose mode and set custom libbpf print callback
in gethostlatency.
Signed-off-by: Hengqi Chen <chenhengqi@outlook.com>
Hengqi Chen [Sat, 25 Dec 2021 04:08:41 +0000 (12:08 +0800)]
libbpf-tools: Add verbose option to funclatency
Support verbose mode and set custom libbpf print callback
in funclatency.
Signed-off-by: Hengqi Chen <chenhengqi@outlook.com>
Hengqi Chen [Sat, 25 Dec 2021 04:07:56 +0000 (12:07 +0800)]
libbpf-tools: Add verbose option to filetop
Support verbose mode and set custom libbpf print callback
in filetop.
Signed-off-by: Hengqi Chen <chenhengqi@outlook.com>
Hengqi Chen [Sat, 25 Dec 2021 04:07:16 +0000 (12:07 +0800)]
libbpf-tools: Add verbose option to exitsnoop
Support verbose mode and set custom libbpf print callback
in exitsnoop.
Signed-off-by: Hengqi Chen <chenhengqi@outlook.com>
Hengqi Chen [Sat, 25 Dec 2021 04:06:39 +0000 (12:06 +0800)]
libbpf-tools: Add verbose option to bindsnoop
Support verbose mode and set custom libbpf print callback
in bindsnoop.
Signed-off-by: Hengqi Chen <chenhengqi@outlook.com>
Hengqi Chen [Sat, 25 Dec 2021 04:05:54 +0000 (12:05 +0800)]
libbpf-tools: Add verbose option to bashreadline
Support verbose mode and set custom libbpf print callback
in bashreadline.
Signed-off-by: Hengqi Chen <chenhengqi@outlook.com>
Achilles [Thu, 23 Dec 2021 18:59:59 +0000 (00:29 +0530)]
exclude static functions with prefix __SCT__ (#3772)
The kernel functions with prefix __SCT__ are for static calls. These static call functions are not in
/sys/kernel/debug/tracing/available_filter_functions and not in /sys/kernel/debug/kprobes/blacklist
either. Let us do filtering in get_kprobe_functions() to filter them out.
Co-authored-by: prameet.p <prameet.p@inba-prameet.p-210508>
Bram Veldhoen [Tue, 14 Dec 2021 07:39:45 +0000 (08:39 +0100)]
Updated usdt_sample for ubuntu 21.10 (and python3)
* Updated readme for Ubuntu 21.10 and python3.
* Readability improvements.
* Using atomic_increment (thus requires bcc 0.21+).
* Using/tested probes created using systemtap (dtrace), next to the
probes created with macros in the folly header.
* Also tested while building usdt_sample with clang.
* Some (modern) cmake changes.
* Added script to execute build and sample python scripts.
Dave Marchevsky [Tue, 21 Dec 2021 04:05:16 +0000 (23:05 -0500)]
docker: Run tests on ubuntu-20.04 as well
Move bcc-test github action's `matrix.os` to indicate the OS to run in
the container, not the test runner itself (just pin the latter to
ubuntu-20.04).
Also, fixup some tests that were failing when trying to run on 20.04
manually.
Dave Marchevsky [Mon, 20 Dec 2021 22:47:11 +0000 (17:47 -0500)]
docker: Bump default LLVM used for tests to 11
This is another prep commit for running docker tests on both 18.04 and
20.04 versions of ubuntu. 20.04 doesn't have some LLVM 8 libs that the
docker build expects, so bump to 11.
Bumping to 11 causes test_disassembler to fail because it expects a map
w/ a certain format with FD 3, and the LLVM bump causes the map to be
FD 4. The purpose of the test is to ensure that the format of the
diassembled map is correct, not that it has a specific FD, so make some
small changes to the test so that it doesn't care what the FD number is.
Dave Marchevsky [Mon, 20 Dec 2021 20:23:37 +0000 (15:23 -0500)]
docker + tests: Run tests using python3, refactor Dockerfile
In #3707, I added ubuntu-20.04 to the list of OS's bcc-test uses to run
tests. I expected that this would result in the tests running on both
18.04 and 20.04. Unfortunately this change was effectively a no-op as
the tests are run in a Docker container and the os field in bcc-test.yml
dictates the type/version of the _host_ OS, not the container's OS.
So it's not necessary to run on both, just run on 20.04. It will be
necessary to modify Dockerfile.test to use both 18.04 and 20.04. To
prepare for this, move all python tests to use python3 interpreter, as
20.04 doesn't have python2 pip readily available.
Also, refactor Dockerfile.tests a bit so that it's possible to provide
ubuntu version and shortname as build input.
This commit does not result in the docker test container working/running
both 18.04 and 20.04, rather lays groundwork for future commits to do
so.
Signed-off-by: Dave Marchevsky <davemarchevsky@fb.com>
Dave Marchevsky [Mon, 20 Dec 2021 21:53:55 +0000 (16:53 -0500)]
Merge pull request #3761 from anakryiko/libbpf-tools-modernize
libbpf-tools: modernize all tools to libbpf 1.0 mode
Andrii Nakryiko [Fri, 17 Dec 2021 22:24:37 +0000 (14:24 -0800)]
libbpf-tools: remove now unnecessary bump_memlock_rlimit()
libbpf will now automatically decide whether it's necessary, and if yes,
will do it on behalf of the application.
All the subsequet tools should make sure to set:
```
libbpf_set_strict_mode(LIBBPF_STRICT_ALL);
```
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Andrii Nakryiko [Fri, 17 Dec 2021 22:32:30 +0000 (14:32 -0800)]
libbpf-tools: update vfsstat for libbpf 1.0
Switch to libbpf 1.0 mode and adapt libbpf API usage accordingly.
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Andrii Nakryiko [Fri, 17 Dec 2021 22:32:30 +0000 (14:32 -0800)]
libbpf-tools: update tcprtt for libbpf 1.0
Switch to libbpf 1.0 mode and adapt libbpf API usage accordingly.
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Andrii Nakryiko [Fri, 17 Dec 2021 22:32:30 +0000 (14:32 -0800)]
libbpf-tools: update tcpconnlat for libbpf 1.0
Switch to libbpf 1.0 mode and adapt libbpf API usage accordingly.
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Andrii Nakryiko [Fri, 17 Dec 2021 22:32:30 +0000 (14:32 -0800)]
libbpf-tools: update tcpconnect for libbpf 1.0
Switch to libbpf 1.0 mode and adapt libbpf API usage accordingly.
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Andrii Nakryiko [Fri, 17 Dec 2021 22:32:30 +0000 (14:32 -0800)]
libbpf-tools: update syscount for libbpf 1.0
Switch to libbpf 1.0 mode and adapt libbpf API usage accordingly.
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Andrii Nakryiko [Fri, 17 Dec 2021 22:32:30 +0000 (14:32 -0800)]
libbpf-tools: update statsnoop for libbpf 1.0
Switch to libbpf 1.0 mode and adapt libbpf API usage accordingly.
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Andrii Nakryiko [Fri, 17 Dec 2021 22:32:30 +0000 (14:32 -0800)]
libbpf-tools: update solisten for libbpf 1.0
Switch to libbpf 1.0 mode and adapt libbpf API usage accordingly.
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Andrii Nakryiko [Fri, 17 Dec 2021 22:32:30 +0000 (14:32 -0800)]
libbpf-tools: update softirqs for libbpf 1.0
Switch to libbpf 1.0 mode and adapt libbpf API usage accordingly.
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Andrii Nakryiko [Fri, 17 Dec 2021 22:32:30 +0000 (14:32 -0800)]
libbpf-tools: update runqslower for libbpf 1.0
Switch to libbpf 1.0 mode and adapt libbpf API usage accordingly.
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Andrii Nakryiko [Fri, 17 Dec 2021 22:32:30 +0000 (14:32 -0800)]
libbpf-tools: update runqlen for libbpf 1.0
Switch to libbpf 1.0 mode and adapt libbpf API usage accordingly.
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Andrii Nakryiko [Fri, 17 Dec 2021 22:32:30 +0000 (14:32 -0800)]
libbpf-tools: update runqlat for libbpf 1.0
Switch to libbpf 1.0 mode and adapt libbpf API usage accordingly.
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Andrii Nakryiko [Fri, 17 Dec 2021 22:32:30 +0000 (14:32 -0800)]
libbpf-tools: update readahead for libbpf 1.0
Switch to libbpf 1.0 mode and adapt libbpf API usage accordingly.
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Andrii Nakryiko [Fri, 17 Dec 2021 22:32:30 +0000 (14:32 -0800)]
libbpf-tools: update opensnoop for libbpf 1.0
Switch to libbpf 1.0 mode and adapt libbpf API usage accordingly.
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Andrii Nakryiko [Fri, 17 Dec 2021 22:32:29 +0000 (14:32 -0800)]
libbpf-tools: update offcputime for libbpf 1.0
Switch to libbpf 1.0 mode and adapt libbpf API usage accordingly.
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Andrii Nakryiko [Fri, 17 Dec 2021 22:32:29 +0000 (14:32 -0800)]
libbpf-tools: update numamove for libbpf 1.0
Switch to libbpf 1.0 mode and adapt libbpf API usage accordingly.
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Andrii Nakryiko [Fri, 17 Dec 2021 22:32:29 +0000 (14:32 -0800)]
libbpf-tools: update mountsnoop for libbpf 1.0
Switch to libbpf 1.0 mode and adapt libbpf API usage accordingly.
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Andrii Nakryiko [Fri, 17 Dec 2021 22:32:29 +0000 (14:32 -0800)]
libbpf-tools: update llcstat for libbpf 1.0
Switch to libbpf 1.0 mode and adapt libbpf API usage accordingly.
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Andrii Nakryiko [Fri, 17 Dec 2021 22:32:29 +0000 (14:32 -0800)]
libbpf-tools: update ksnoop for libbpf 1.0
Switch to libbpf 1.0 mode and adapt libbpf API usage accordingly.
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Andrii Nakryiko [Fri, 17 Dec 2021 22:32:29 +0000 (14:32 -0800)]
libbpf-tools: update hardirqs for libbpf 1.0
Switch to libbpf 1.0 mode and adapt libbpf API usage accordingly.
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Andrii Nakryiko [Fri, 17 Dec 2021 22:32:29 +0000 (14:32 -0800)]
libbpf-tools: update gethostlatency for libbpf 1.0
Switch to libbpf 1.0 mode and adapt libbpf API usage accordingly.
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Andrii Nakryiko [Fri, 17 Dec 2021 22:23:49 +0000 (14:23 -0800)]
libbpf-tools: update funclatency for libbpf 1.0
Switch to libbpf 1.0 mode and adapt libbpf API usage accordingly.
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Andrii Nakryiko [Fri, 17 Dec 2021 22:23:29 +0000 (14:23 -0800)]
libbpf-tools: update fsslower for libbpf 1.0
Switch to libbpf 1.0 mode and adapt libbpf API usage accordingly.
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Andrii Nakryiko [Fri, 17 Dec 2021 22:23:14 +0000 (14:23 -0800)]
libbpf-tools: update fsdist for libbpf 1.0
Switch to libbpf 1.0 mode and adapt libbpf API usage accordingly.
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Andrii Nakryiko [Fri, 17 Dec 2021 22:23:01 +0000 (14:23 -0800)]
libbpf-tools: update filetop for libbpf 1.0
Switch to libbpf 1.0 mode and adapt libbpf API usage accordingly.
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>