diff --git a/backport-fix-runqlat-error.patch b/backport-fix-runqlat-error.patch new file mode 100644 index 0000000000000000000000000000000000000000..645b34c15d6ed4a0106da20310d138a52fba4235 --- /dev/null +++ b/backport-fix-runqlat-error.patch @@ -0,0 +1,29 @@ +diff -Nuar bpftrace-0.19.1/tools/runqlat.bt bpftrace-0.19.1.new/tools/runqlat.bt +--- bpftrace-0.19.1/tools/runqlat.bt 2023-10-04 16:18:18.000000000 +0800 ++++ bpftrace-0.19.1.new/tools/runqlat.bt 2024-08-10 13:56:53.016113910 +0800 +@@ -1,4 +1,4 @@ +-#!/usr/bin/env bpftrace ++#!/usr/bin/bpftrace + /* + * runqlat.bt CPU scheduler run queue latency as a histogram. + * For Linux, uses bpftrace, eBPF. +@@ -11,7 +11,19 @@ + * 17-Sep-2018 Brendan Gregg Created this. + */ + ++//#include ++ ++#ifndef BPFTRACE_HAVE_BTF + #include ++#else ++/* ++ * With BTF providing types, full headers are not needed. ++ * We only need to supply the preprocessor defines used in this script. ++ * TASK_RUNNING is not arch-dependant and has not changed in the linux ++ * git history (it is not part of the stable API though) ++ */ ++#define TASK_RUNNING 0 ++#endif + + BEGIN + { diff --git a/bpftrace.spec b/bpftrace.spec index 6fac9bd08ddbb55438546ce7810114c81a767b70..29148da43119a2e1103f204de6ab833976ba7590 100644 --- a/bpftrace.spec +++ b/bpftrace.spec @@ -1,15 +1,15 @@ Name: bpftrace Version: 0.19.1 -Release: 1 +Release: 3 Summary: High-level tracing language for Linux eBPF License: ASL 2.0 URL: https://github.com/iovisor/bpftrace Source0: %{url}/archive/refs/tags/v%{version}.tar.gz - +Patch0001: backport-fix-runqlat-error.patch # Arches will be included as upstream support is added and dependencies are # satisfied in the respective arches -ExclusiveArch: x86_64 %{power64} aarch64 riscv64 +ExclusiveArch: x86_64 %{power64} aarch64 riscv64 loongarch64 BuildRequires: gcc-c++ bison flex cmake elfutils-libelf-devel BuildRequires: zlib-devel llvm-devel clang clang-tools-extra clang-devel llvm-test @@ -68,6 +68,13 @@ find %{buildroot}%{_datadir}/%{name}/tools -type f -exec \ %changelog +* Sat Aug 10 2024 changtao - 0.19.1-3 +- fix runqlat.bt run error for BPF +- for kernel 6.6.0 + +* Tue Feb 27 2024 Huang Yang - 0.19.1-2 +- add loongarch64 support + * Mon Jan 08 2024 Paul Thomas - 0.19.1-1 - update to version 0.19.1