From 4dbdfb65d28bde9776c675aacbe55a5e2bcbe92e Mon Sep 17 00:00:00 2001 From: Krister Johansen Date: Wed, 13 Nov 2019 17:55:22 -0800 Subject: [PATCH] Move up to the 0.11.0 bcc release. Allows us to drop some patches we were carrying, since the bugs were fixed upstream. Gives numerous tooling improvements too. Signed-off-by: Krister Johansen --- kernel/Dockerfile.bcc | 5 ++-- kernel/bcc.patches/bcc-gnuism.patch | 28 ------------------- kernel/bcc.patches/bcc-lua.patch | 43 ----------------------------- 3 files changed, 2 insertions(+), 74 deletions(-) delete mode 100644 kernel/bcc.patches/bcc-gnuism.patch delete mode 100644 kernel/bcc.patches/bcc-lua.patch diff --git a/kernel/Dockerfile.bcc b/kernel/Dockerfile.bcc index 337ace260..fbab562e6 100644 --- a/kernel/Dockerfile.bcc +++ b/kernel/Dockerfile.bcc @@ -50,11 +50,10 @@ RUN curl -sSL -O https://fedorahosted.org/releases/e/l/elfutils/0.165/elfutils-$ patch -p0 < ../decl.patch && \ patch -p0 < ../intl.patch -ENV BCC_COMMIT=6972806729da00ecda0235abac61d66c8fad7fad +ENV BCC_COMMIT=0fa419a64e71984d42f107c210d3d3f0cc82d59a RUN git clone https://github.com/iovisor/bcc.git && \ cd bcc && \ - git checkout $BCC_COMMIT && \ - patch -p0 < ../bcc-gnuism.patch && patch -p0 < ../bcc-lua.patch + git checkout $BCC_COMMIT ENV LJSYSCALL_COMMIT=e587f8c55aad3955dddab3a4fa6c1968037b5c6e RUN git clone https://github.com/justincormack/ljsyscall.git && \ diff --git a/kernel/bcc.patches/bcc-gnuism.patch b/kernel/bcc.patches/bcc-gnuism.patch deleted file mode 100644 index 3312fde0e..000000000 --- a/kernel/bcc.patches/bcc-gnuism.patch +++ /dev/null @@ -1,28 +0,0 @@ ---- src/cc/usdt.h-orig -+++ src/cc/usdt.h -@@ -125,6 +125,24 @@ public: - ArgumentParser_powerpc64(const char *arg) : ArgumentParser(arg) {} - }; - -+#undef REG_A -+#undef REG_B -+#undef REG_C -+#undef REG_D -+#undef REG_SI -+#undef REG_DI -+#undef REG_BP -+#undef REG_SP -+#undef REG_8 -+#undef REG_9 -+#undef REG_10 -+#undef REG_11 -+#undef REG_12 -+#undef REG_13 -+#undef REG_14 -+#undef REG_15 -+#undef REG_RIP -+ - class ArgumentParser_x64 : public ArgumentParser { - private: - enum Register { - diff --git a/kernel/bcc.patches/bcc-lua.patch b/kernel/bcc.patches/bcc-lua.patch deleted file mode 100644 index b10eb1b0c..000000000 --- a/kernel/bcc.patches/bcc-lua.patch +++ /dev/null @@ -1,43 +0,0 @@ ---- src/cc/CMakeLists.txt -+++ src/cc/CMakeLists.txt -@@ -52,7 +52,7 @@ target_link_libraries(bcc-loader-static elf) - add_library(bcc-static STATIC - ${bcc_common_sources} ${bcc_table_sources} ${bcc_util_sources}) - set_target_properties(bcc-static PROPERTIES OUTPUT_NAME bcc) --set(bcc-lua-static -+add_library(bcc-lua-static STATIC - ${bcc_common_sources} ${bcc_table_sources} ${bcc_sym_sources} ${bcc_util_sources}) - - include(clang_libs) -@@ -64,9 +64,9 @@ set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} ${llvm_lib_exclude_f - set(bcc_common_libs_for_a b_frontend clang_frontend bpf-static - -Wl,--whole-archive ${clang_libs} ${llvm_libs} -Wl,--no-whole-archive - ${LIBELF_LIBRARIES}) --set(bcc_common_libs_for_s ${bcc_common_libs_for_a}) --set(bcc_common_libs_for_lua b_frontend clang_frontend bpf-static -+set(bcc_common_libs_for_s b_frontend clang_frontend bpf-static - ${clang_libs} ${llvm_libs} ${LIBELF_LIBRARIES}) -+set(bcc_common_libs_for_lua ${bcc_common_libs_for_s}) - - if(ENABLE_CPP_API) - add_subdirectory(api) -@@ -87,7 +87,7 @@ add_subdirectory(frontends) - # Link against LLVM libraries - target_link_libraries(bcc-shared ${bcc_common_libs_for_s}) - target_link_libraries(bcc-static ${bcc_common_libs_for_a} bcc-loader-static) --set(bcc-lua-static ${bcc-lua-static} ${bcc_common_libs_for_lua}) -+target_link_libraries(bcc-lua-static ${bcc_common_libs_for_lua}) - - install(TARGETS bcc-shared LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) - install(FILES ${bcc_table_headers} DESTINATION include/bcc) ---- src/lua/CMakeLists.txt -+++ src/lua/CMakeLists.txt -@@ -23,7 +23,7 @@ if (LUAJIT_LIBRARIES AND LUAJIT) - add_executable(bcc-lua src/main.c bcc.o) - set_target_properties(bcc-lua PROPERTIES LINKER_LANGUAGE C) - target_link_libraries(bcc-lua ${LUAJIT_LIBRARIES}) -- target_link_libraries(bcc-lua ${bcc-lua-static}) -+ target_link_libraries(bcc-lua -Wl,--whole-archive bcc-lua-static -Wl,--no-whole-archive) - if (NOT COMPILER_NOPIE_FLAG EQUAL "") - target_link_libraries(bcc-lua ${COMPILER_NOPIE_FLAG}) - endif()