From 0e3a8638560d0c58af0bdaa9e198b73c45403dfd Mon Sep 17 00:00:00 2001 From: Hui Li Date: Tue, 1 Aug 2023 17:44:23 +0800 Subject: [PATCH] bpftrace: Add support for loongarch Signed-off-by: Hui Li --- ...ace-0.16.0-Add-support-for-loongarch.patch | 205 +++++++++++ ...0.16.0-aotrt-is-generated-by-default.patch | 33 ++ ...VE_LIBBPF_BTF_DUMP-and-EMIT_TYPE_DEC.patch | 341 ++++++++++++++++++ bpftrace.spec | 23 +- 4 files changed, 600 insertions(+), 2 deletions(-) create mode 100644 bpftrace-0.16.0-Add-support-for-loongarch.patch create mode 100644 bpftrace-0.16.0-aotrt-is-generated-by-default.patch create mode 100644 bpftrace-0.16.0-libbpf-assume-HAVE_LIBBPF_BTF_DUMP-and-EMIT_TYPE_DEC.patch diff --git a/bpftrace-0.16.0-Add-support-for-loongarch.patch b/bpftrace-0.16.0-Add-support-for-loongarch.patch new file mode 100644 index 0000000..d73e44f --- /dev/null +++ b/bpftrace-0.16.0-Add-support-for-loongarch.patch @@ -0,0 +1,205 @@ +From 0edf68fb4479b3ea2ebe68ab54be8eef2dadb7b4 Mon Sep 17 00:00:00 2001 +From: Hui Li +Date: Mon, 17 Jul 2023 19:53:42 +0800 +Subject: [PATCH 2/2] bpftrace: Add support for loongarch + +Signed-off-by: Hui Li +--- + src/arch/CMakeLists.txt | 2 + + src/arch/loongarch64.cpp | 157 +++++++++++++++++++++++++++++++++++++++ + src/utils.cpp | 2 + + 3 files changed, 161 insertions(+) + create mode 100644 src/arch/loongarch64.cpp + +diff --git a/src/arch/CMakeLists.txt b/src/arch/CMakeLists.txt +index 127c352..f90de9b 100644 +--- a/src/arch/CMakeLists.txt ++++ b/src/arch/CMakeLists.txt +@@ -12,6 +12,8 @@ elseif(CMAKE_SYSTEM_PROCESSOR STREQUAL "mips64") + add_library(arch mips64.cpp) + elseif(CMAKE_SYSTEM_PROCESSOR STREQUAL "riscv64") + add_library(arch riscv64.cpp) ++elseif(CMAKE_SYSTEM_PROCESSOR STREQUAL "loongarch64") ++ add_library(arch loongarch64.cpp) + else() + message(FATAL_ERROR "Unsupported architecture: ${CMAKE_SYSTEM_PROCESSOR}") + endif() +diff --git a/src/arch/loongarch64.cpp b/src/arch/loongarch64.cpp +new file mode 100644 +index 0000000..84033ee +--- /dev/null ++++ b/src/arch/loongarch64.cpp +@@ -0,0 +1,157 @@ ++#include "arch.h" ++ ++#include ++#include ++ ++// SP points to the first argument that is passed on the stack ++#define ARG0_STACK 0 ++ ++namespace bpftrace { ++namespace arch { ++ ++// clang-format off ++static std::array registers = { ++ "r0", ++ "r1", ++ "r2", ++ "r3", ++ "r4", ++ "r5", ++ "r6", ++ "r7", ++ "r8", ++ "r9", ++ "r10", ++ "r11", ++ "r12", ++ "r13", ++ "r14", ++ "r15", ++ "r16", ++ "r17", ++ "r18", ++ "r19", ++ "r20", ++ "r21", ++ "r22", ++ "r23", ++ "r24", ++ "r25", ++ "r26", ++ "r27", ++ "r28", ++ "r29", ++ "r30", ++ "r31", ++ "pc", ++}; ++ ++// Alternative register names that match struct pt_regs ++static std::array ptrace_registers = { ++ "regs[0]", ++ "regs[1]", ++ "regs[2]", ++ "regs[3]", ++ "regs[4]", ++ "regs[5]", ++ "regs[6]", ++ "regs[7]", ++ "regs[8]", ++ "regs[9]", ++ "regs[10]", ++ "regs[11]", ++ "regs[12]", ++ "regs[13]", ++ "regs[14]", ++ "regs[15]", ++ "regs[16]", ++ "regs[17]", ++ "regs[18]", ++ "regs[19]", ++ "regs[20]", ++ "regs[21]", ++ "regs[22]", ++ "regs[23]", ++ "regs[24]", ++ "regs[25]", ++ "regs[26]", ++ "regs[27]", ++ "regs[28]", ++ "regs[29]", ++ "regs[30]", ++ "regs[31]", ++ "csr_era", ++}; ++ ++static std::array arg_registers = { ++ "r4", ++ "r5", ++ "r6", ++ "r7", ++ "r8", ++ "r9", ++ "r10", ++ "r11", ++}; ++// clang-format on ++ ++int offset(std::string reg_name) ++{ ++ auto it = find(registers.begin(), registers.end(), reg_name); ++ if (it == registers.end()) ++ { ++ // Also allow register names that match the fields in struct pt_regs. ++ // These appear in USDT probe arguments. ++ it = find(ptrace_registers.begin(), ptrace_registers.end(), reg_name); ++ if (it == ptrace_registers.end()) ++ { ++ return -1; ++ } ++ return distance(ptrace_registers.begin(), it); ++ } ++ return distance(registers.begin(), it); ++} ++ ++int max_arg() ++{ ++ return arg_registers.size() - 1; ++} ++ ++int arg_offset(int arg_num) ++{ ++ return offset(arg_registers.at(arg_num)); ++} ++ ++int pc_offset() ++{ ++ return offset("pc"); ++} ++ ++int ret_offset() ++{ ++ return offset("r4"); ++} ++ ++int sp_offset() ++{ ++ return offset("r3"); ++} ++ ++int arg_stack_offset() ++{ ++ return ARG0_STACK / 8; ++} ++ ++std::string name() ++{ ++ return std::string("loongarch64"); ++} ++ ++std::vector invalid_watchpoint_modes() ++{ ++ throw std::runtime_error( ++ "Watchpoints are not supported on this architecture"); ++} ++ ++} // namespace arch ++} // namespace bpftrace +diff --git a/src/utils.cpp b/src/utils.cpp +index 426644e..48d18d4 100644 +--- a/src/utils.cpp ++++ b/src/utils.cpp +@@ -342,6 +342,8 @@ std::vector get_kernel_cflags( + arch = "sh"; + } else if (!strncmp(uname_machine, "aarch64", 7)) { + arch = "arm64"; ++ } else if (!strncmp(uname_machine, "loongarch", 9)) { ++ arch = "loongarch"; + } + + // If ARCH env is defined, use it over uname +-- +2.20.1 + diff --git a/bpftrace-0.16.0-aotrt-is-generated-by-default.patch b/bpftrace-0.16.0-aotrt-is-generated-by-default.patch new file mode 100644 index 0000000..d61b0c6 --- /dev/null +++ b/bpftrace-0.16.0-aotrt-is-generated-by-default.patch @@ -0,0 +1,33 @@ +From e249e6f30e61b4413a2f79c2f859aac58903878e Mon Sep 17 00:00:00 2001 +From: Hui Li +Date: Fri, 21 Jul 2023 16:52:40 +0800 +Subject: [PATCH] bpftrace-aotrt is generated by default + +Signed-off-by: Hui Li +--- + src/aot/CMakeLists.txt | 9 ++++----- + 1 file changed, 4 insertions(+), 5 deletions(-) + +diff --git a/src/aot/CMakeLists.txt b/src/aot/CMakeLists.txt +index c776d20..af8d48b 100644 +--- a/src/aot/CMakeLists.txt ++++ b/src/aot/CMakeLists.txt +@@ -4,11 +4,10 @@ target_include_directories(aot PUBLIC ${CMAKE_SOURCE_DIR}/src) + target_include_directories(aot PUBLIC ${CMAKE_BINARY_DIR}) + target_compile_definitions(aot PRIVATE ${BPFTRACE_FLAGS}) + +-# Only build aotrt if supported bcc is used +-# (https://github.com/iovisor/bcc/commit/719191867a25ce07dc96f7faf9b8ccedadc7ec44) +-if(NOT LIBBCC_BPF_CONTAINS_RUNTIME) +- return() +-endif() ++# The corresponding version of bcc is used, There is no need for judgment. ++#if(NOT LIBBCC_BPF_CONTAINS_RUNTIME) ++# return() ++#endif() + + add_executable(bpftrace-aotrt aot_main.cpp) + target_link_libraries(bpftrace-aotrt aot runtime arch ast_defs cxxdemangler_stdlib) +-- +2.39.3 + diff --git a/bpftrace-0.16.0-libbpf-assume-HAVE_LIBBPF_BTF_DUMP-and-EMIT_TYPE_DEC.patch b/bpftrace-0.16.0-libbpf-assume-HAVE_LIBBPF_BTF_DUMP-and-EMIT_TYPE_DEC.patch new file mode 100644 index 0000000..a58fb6b --- /dev/null +++ b/bpftrace-0.16.0-libbpf-assume-HAVE_LIBBPF_BTF_DUMP-and-EMIT_TYPE_DEC.patch @@ -0,0 +1,341 @@ +From c19b6a55ce9907cda27ab90c8cd36b530678dc77 Mon Sep 17 00:00:00 2001 +From: Hui Li +Date: Fri, 21 Jul 2023 09:02:19 +0800 +Subject: [PATCH 1/2] libbpf: assume HAVE_LIBBPF_BTF_DUMP and EMIT_TYPE_DECL + +Reference Upstream commit d516b2aa8269b4433391e + +Signed-off-by: Hui Li +--- + CMakeLists.txt | 7 ----- + cmake/FindLibBpf.cmake | 7 ----- + src/CMakeLists.txt | 6 +--- + src/btf.cpp | 52 ---------------------------------- + src/build_info.cpp | 12 -------- + tests/bpftrace.cpp | 6 ---- + tests/clang_parser.cpp | 7 ++--- + tests/portability_analyser.cpp | 4 +-- + tests/probe.cpp | 8 ++---- + tests/semantic_analyser.cpp | 8 ++---- + 10 files changed, 8 insertions(+), 109 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index e63bc83..2894169 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -254,13 +254,6 @@ if(HAVE_BFD_DISASM) + endif(LIBBFD_INIT_DISASM_INFO_FOUR_ARGS_SIGNATURE) + endif(HAVE_BFD_DISASM) + +-if (LIBBPF_BTF_DUMP_FOUND) +- set(BPFTRACE_FLAGS "${BPFTRACE_FLAGS}" HAVE_LIBBPF_BTF_DUMP) +- if (HAVE_LIBBPF_BTF_DUMP_EMIT_TYPE_DECL) +- set(BPFTRACE_FLAGS "${BPFTRACE_FLAGS}" HAVE_LIBBPF_BTF_DUMP_EMIT_TYPE_DECL) +- endif() +-endif(LIBBPF_BTF_DUMP_FOUND) +- + if (HAVE_LIBBPF_BPF_PROG_LOAD) + set(BPFTRACE_FLAGS "${BPFTRACE_FLAGS}" HAVE_LIBBPF_BPF_PROG_LOAD) + endif(HAVE_LIBBPF_BPF_PROG_LOAD) +diff --git a/cmake/FindLibBpf.cmake b/cmake/FindLibBpf.cmake +index dd0eeea..4e110c7 100644 +--- a/cmake/FindLibBpf.cmake ++++ b/cmake/FindLibBpf.cmake +@@ -34,8 +34,6 @@ FIND_PACKAGE_HANDLE_STANDARD_ARGS(LibBpf "Please install the libbpf development + + mark_as_advanced(LIBBPF_INCLUDE_DIRS LIBBPF_LIBRARIES) + +-# We need btf_dump support, set LIBBPF_BTF_DUMP_FOUND +-# when it's found. + if (KERNEL_INCLUDE_DIRS) + set(INCLUDE_KERNEL -isystem ${KERNEL_INCLUDE_DIRS}) + endif () +@@ -44,11 +42,6 @@ include(CheckSymbolExists) + SET(CMAKE_REQUIRED_LIBRARIES ${LIBBPF_LIBRARIES} elf z) + # libbpf quirk, needs upstream fix + SET(CMAKE_REQUIRED_DEFINITIONS -include stdbool.h ${INCLUDE_KERNEL}) +-check_symbol_exists(btf_dump__new "${LIBBPF_INCLUDE_DIRS}/bpf/btf.h" HAVE_BTF_DUMP) +-if (HAVE_BTF_DUMP) +- set(LIBBPF_BTF_DUMP_FOUND TRUE) +-endif () +-check_symbol_exists(btf_dump__emit_type_decl "${LIBBPF_INCLUDE_DIRS}/bpf/btf.h" HAVE_LIBBPF_BTF_DUMP_EMIT_TYPE_DECL) + + check_symbol_exists(bpf_prog_load "${LIBBPF_INCLUDE_DIRS}/bpf/bpf.h" HAVE_LIBBPF_BPF_PROG_LOAD) + check_symbol_exists(bpf_map_create "${LIBBPF_INCLUDE_DIRS}/bpf/bpf.h" HAVE_LIBBPF_BPF_MAP_CREATE) +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index 09b8c1e..1ad2e78 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -122,13 +122,9 @@ if(STATIC_LINKING) + endif(STATIC_LIBC) + endif(STATIC_LINKING) + +- ++target_link_libraries(runtime ${LIBBPF_LIBRARIES}) + target_link_libraries(libbpftrace parser resources runtime aot ast arch cxxdemangler_llvm) + +-if (LIBBPF_BTF_DUMP_FOUND) +- target_link_libraries(runtime ${LIBBPF_LIBRARIES}) +-endif(LIBBPF_BTF_DUMP_FOUND) +- + if(LIBPCAP_FOUND) + target_link_libraries(libbpftrace ${LIBPCAP_LIBRARIES}) + endif(LIBPCAP_FOUND) +diff --git a/src/btf.cpp b/src/btf.cpp +index b8c6bd6..5bf3ec1 100644 +--- a/src/btf.cpp ++++ b/src/btf.cpp +@@ -15,7 +15,6 @@ + #include + #include + +-#ifdef HAVE_LIBBPF_BTF_DUMP + #include + #include + #pragma GCC diagnostic push +@@ -582,7 +581,6 @@ std::unique_ptr BTF::get_all_funcs() const + std::map> BTF::get_params( + const std::set &funcs) const + { +-#ifdef HAVE_LIBBPF_BTF_DUMP_EMIT_TYPE_DECL + __s32 id, max = (__s32)type_cnt(btf); + std::string type = std::string(""); + struct btf_dump *dump; +@@ -669,11 +667,6 @@ std::map> BTF::get_params( + btf_dump__free(dump); + + return params; +-#else +- LOG(ERROR) << "Could not get kfunc arguments " +- "(HAVE_LIBBPF_BTF_DUMP_EMIT_TYPE_DECL is not set)"; +- return {}; +-#endif + } + + std::set BTF::get_all_structs() const +@@ -755,48 +748,3 @@ int BTF::get_btf_id(const std::string &name) const + } + + } // namespace bpftrace +-#else // HAVE_LIBBPF_BTF_DUMP +- +-namespace bpftrace { +- +-BTF::BTF() { } +- +-BTF::~BTF() { } +- +-std::string BTF::c_def(const std::unordered_set& set +- __attribute__((__unused__))) const +-{ +- return std::string(""); +-} +- +-std::string BTF::type_of(const std::string& name __attribute__((__unused__)), +- const std::string& field __attribute__((__unused__))) { +- return std::string(""); +-} +- +-int BTF::resolve_args(const std::string &func __attribute__((__unused__)), +- std::map& args +- __attribute__((__unused__)), +- bool ret __attribute__((__unused__))) +-{ +- return -1; +-} +- +-std::set BTF::get_all_structs() const +-{ +- return {}; +-} +- +-std::unique_ptr BTF::get_all_funcs() const +-{ +- return nullptr; +-} +- +-std::map> BTF::get_params( +- const std::set& funcs __attribute__((__unused__))) const +-{ +- return {}; +-} +-} // namespace bpftrace +- +-#endif // HAVE_LIBBPF_BTF_DUMP +diff --git a/src/build_info.cpp b/src/build_info.cpp +index 24fa830..bf86857 100644 +--- a/src/build_info.cpp ++++ b/src/build_info.cpp +@@ -50,18 +50,6 @@ std::string BuildInfo::report() + << "yes" << std::endl; + #else + << "no" << std::endl; +-#endif +- buf << " libbpf btf dump: " +-#ifdef HAVE_LIBBPF_BTF_DUMP +- << "yes" << std::endl; +-#else +- << "no" << std::endl; +-#endif +- buf << " libbpf btf dump type decl: " +-#ifdef HAVE_LIBBPF_BTF_DUMP_EMIT_TYPE_DECL +- << "yes" << std::endl; +-#else +- << "no" << std::endl; + #endif + buf << " libbpf bpf_prog_load: " + #ifdef HAVE_LIBBPF_BPF_PROG_LOAD +diff --git a/tests/bpftrace.cpp b/tests/bpftrace.cpp +index 3368d3d..c8d58fd 100644 +--- a/tests/bpftrace.cpp ++++ b/tests/bpftrace.cpp +@@ -965,10 +965,6 @@ TEST(bpftrace, sort_by_key_int_str) + EXPECT_THAT(values_by_key, ContainerEq(expected_values)); + } + +-#ifdef HAVE_LIBBPF_BTF_DUMP +- +-#include "btf_common.h" +- + class bpftrace_btf : public test_btf + { + }; +@@ -1021,8 +1017,6 @@ TEST_F(bpftrace_btf, add_probes_iter_task_file) + check_probe(bpftrace.get_probes().at(0), ProbeType::iter, "iter:task_file"); + } + +-#endif // HAVE_LIBBPF_BTF_DUMP +- + } // namespace bpftrace + } // namespace test + } // namespace bpftrace +diff --git a/tests/clang_parser.cpp b/tests/clang_parser.cpp +index 6336905..c44fc56 100644 +--- a/tests/clang_parser.cpp ++++ b/tests/clang_parser.cpp +@@ -10,6 +10,8 @@ namespace bpftrace { + namespace test { + namespace clang_parser { + ++#include "btf_common.h" ++ + static void parse(const std::string &input, BPFtrace &bpftrace, bool result = true, + const std::string& probe = "kprobe:sys_read { 1 }") + { +@@ -516,10 +518,6 @@ TEST(clang_parser, parse_fail) + parse("struct a { int a; struct b b; };", bpftrace, false); + } + +-#ifdef HAVE_LIBBPF_BTF_DUMP +- +-#include "btf_common.h" +- + class clang_parser_btf : public test_btf + { + }; +@@ -691,7 +689,6 @@ TEST_F(clang_parser_btf, btf_type_override) + false, + "kprobe:sys_read { @x1 = ((struct Foo3 *)curtask); }"); + } +-#endif // HAVE_LIBBPF_BTF_DUMP + + TEST(clang_parser, struct_typedef) + { +diff --git a/tests/portability_analyser.cpp b/tests/portability_analyser.cpp +index 2e31c2e..fcb961c 100644 +--- a/tests/portability_analyser.cpp ++++ b/tests/portability_analyser.cpp +@@ -4,6 +4,7 @@ + #include "ast/passes/field_analyser.h" + #include "ast/passes/portability_analyser.h" + #include "ast/passes/semantic_analyser.h" ++#include "btf_common.h" + #include "clang_parser.h" + #include "driver.h" + #include "mocks.h" +@@ -57,8 +58,6 @@ TEST(portability_analyser, tracepoint_field_access) + test("tracepoint:sched:sched_* { args->common_field }", 0); + } + +-#if defined(HAVE_LIBBPF_BTF_DUMP) +-#include "btf_common.h" + class portability_analyser_btf : public test_btf + { + }; +@@ -70,7 +69,6 @@ TEST_F(portability_analyser_btf, kfunc_field_access) + test("kfunc:func_2 { args->foo1 }", 0); + test("kfunc:func_2, kfunc:func_3 { $x = args->foo1; }", 0); + } +-#endif + + TEST(portability_analyser, positional_params_disabled) + { +diff --git a/tests/probe.cpp b/tests/probe.cpp +index 5fa1b63..3273b55 100644 +--- a/tests/probe.cpp ++++ b/tests/probe.cpp +@@ -17,6 +17,8 @@ namespace bpftrace { + namespace test { + namespace probe { + ++#include "btf_common.h" ++ + using bpftrace::ast::AttachPoint; + using bpftrace::ast::AttachPointList; + using bpftrace::ast::Probe; +@@ -74,10 +76,6 @@ TEST(probe, short_name) + compare_bytecode("interval:s:1 { 1 }", "i:s:1 { 1 }"); + } + +-#ifdef HAVE_LIBBPF_BTF_DUMP +- +-#include "btf_common.h" +- + class probe_btf : public test_btf + { + }; +@@ -90,8 +88,6 @@ TEST_F(probe_btf, short_name) + compare_bytecode("iter:task_file { 1 }", "it:task_file { 1 }"); + } + +-#endif // HAVE_LIBBPF_BTF_DUMP +- + } // namespace probe + } // namespace test + } // namespace bpftrace +diff --git a/tests/semantic_analyser.cpp b/tests/semantic_analyser.cpp +index d7e1806..3a0e420 100644 +--- a/tests/semantic_analyser.cpp ++++ b/tests/semantic_analyser.cpp +@@ -12,6 +12,8 @@ namespace bpftrace { + namespace test { + namespace semantic_analyser { + ++#include "btf_common.h" ++ + using ::testing::_; + using ::testing::HasSubstr; + +@@ -2578,10 +2580,6 @@ TEST(semantic_analyser, string_size) + ASSERT_EQ(var_assign->var->type.GetField(0).type.GetSize(), 6UL); + } + +-#ifdef HAVE_LIBBPF_BTF_DUMP +- +-#include "btf_common.h" +- + class semantic_analyser_btf : public test_btf + { + }; +@@ -2662,8 +2660,6 @@ TEST_F(semantic_analyser_btf, iter) + test("iter:task,f:func_1 { 1 }", 1); + } + +-#endif // HAVE_LIBBPF_BTF_DUMP +- + #ifdef HAVE_LIBDW + + #include "dwarf_common.h" +-- +2.20.1 + diff --git a/bpftrace.spec b/bpftrace.spec index 23e4d66..12d8205 100644 --- a/bpftrace.spec +++ b/bpftrace.spec @@ -2,7 +2,7 @@ Name: bpftrace Version: 0.16.0 -Release: 1%{?dist} +Release: 2%{?dist} Summary: High-level tracing language for Linux eBPF License: ASL 2.0 @@ -21,9 +21,19 @@ Patch2: %{name}-%{version}-tcpdrop-Fix-ERROR-Error-attaching-probe-kprob Patch3: %{name}-%{version}-RHEL8-remove-not-existing-attachpoints-from-tools.patch Patch10: %{name}-%{version}-RHEL-8-aarch64-fixes-statsnoop-and-opensnoop.patch +# Clean up unnecessary symbol existence checks #2370 +# https://github.com/iovisor/bpftrace/pull/2370/commits/14b73d93e2ed124771c25b2ebce79da2ebc4a113 +Patch11: %{name}-%{version}-libbpf-assume-HAVE_LIBBPF_BTF_DUMP-and-EMIT_TYPE_DEC.patch + +# generated bpftrace-aotrt +Patch12: %{name}-%{version}-aotrt-is-generated-by-default.patch + +# https://github.com/iovisor/bpftrace/commit/cf54d1682c19c0b2ebc7f81160282345c0aded79 +Patch13: %{name}-%{version}-Add-support-for-loongarch.patch + # Arches will be included as upstream support is added and dependencies are # satisfied in the respective arches -ExclusiveArch: x86_64 %{power64} aarch64 s390x +ExclusiveArch: x86_64 %{power64} aarch64 s390x loongarch64 BuildRequires: gcc-c++ BuildRequires: bison @@ -63,6 +73,10 @@ and predecessor tracers such as DTrace and SystemTap %patch10 -p1 %endif +%patch11 -p1 +%patch12 -p1 +%patch13 -p1 + %build # Set CPATH so that CMake finds the cereal headers CPATH=$PWD/cereal-%{cereal_version}/include:$CPATH @@ -70,6 +84,7 @@ export CPATH %cmake . \ -DCMAKE_BUILD_TYPE=RelWithDebInfo \ -DBUILD_TESTING:BOOL=OFF \ + -DCMAKE_CXX_FLAGS='-include /usr/include/bcc/compat/linux/bpf.h -D__LINUX_BPF_H__ -include /usr/include/bcc/compat/linux/btf.h -D__LINUX_BTF_H__' \ -DBUILD_SHARED_LIBS:BOOL=OFF %make_build @@ -110,6 +125,10 @@ cp %{buildroot}/%{_datadir}/%{name}/tools/old/mdflush.bt %{buildroot}/%{_datadir %exclude %{_datadir}/%{name}/tools/old %changelog +* Tue Aug 1 2023 Hui Li - 0.16.0-2 +- Sync some fixes to make bpftrace build correctly +- Add support for loongarch + * Wed Nov 30 2022 Viktor Malik - 0.16.0-1 - Rebase on bpftrace 0.16.0 - Rebuild for LLVM15 -- Gitee