Hello community, here is the log from the commit of package bcc for openSUSE:Factory checked in at 2018-03-16 10:43:28 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/bcc (Old) and /work/SRC/openSUSE:Factory/.bcc.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "bcc" Fri Mar 16 10:43:28 2018 rev:19 rq:587423 version:0.5.0 Changes: -------- --- /work/SRC/openSUSE:Factory/bcc/bcc.changes 2018-02-23 15:29:28.807211822 +0100 +++ /work/SRC/openSUSE:Factory/.bcc.new/bcc.changes 2018-03-16 10:44:57.277004547 +0100 @@ -1,0 +2,11 @@ +Thu Mar 15 04:34:20 UTC 2018 - [email protected] + +- Add bcc-bsc1080085-import-readline-from-lib.patch to read the + symbol "readline" from libreadline. (bsc#1080085) +- Add bcc-bsc1080085-detect-slab-for-slabratetop.patch to detect + the current memory allocator and include the correct header. + (bsc#1080085) +- Make bcc-tools require audit since syscount.py needs ausyscall + to get the syscall list. (bsc#1080085) + +------------------------------------------------------------------- New: ---- bcc-bsc1080085-detect-slab-for-slabratetop.patch bcc-bsc1080085-import-readline-from-lib.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ bcc.spec ++++++ --- /var/tmp/diff_new_pack.ZWcAWe/_old 2018-03-16 10:44:58.148973149 +0100 +++ /var/tmp/diff_new_pack.ZWcAWe/_new 2018-03-16 10:44:58.152973005 +0100 @@ -37,6 +37,8 @@ Patch4: %{name}-fix-build-for-llvm-5.0.1.patch Patch5: %{name}-bsc1080085-backport-bytes-strings.patch Patch6: %{name}-bsc1080085-fix-cachetop-py3-str.patch +Patch7: %{name}-bsc1080085-import-readline-from-lib.patch +Patch8: %{name}-bsc1080085-detect-slab-for-slabratetop.patch ExcludeArch: ppc s390 BuildRequires: bison BuildRequires: cmake >= 2.8.7 @@ -140,7 +142,9 @@ %package tools Summary: Tracing tools of BPF Compiler Collection (BCC) +# ausyscall from audit is required by syscount.py Group: System/Monitoring +Requires: audit Requires: python3-bcc = %{version} Requires: python3-future @@ -165,6 +169,8 @@ %patch4 -p1 %patch5 -p1 %patch6 -p1 +%patch7 -p1 +%patch8 -p1 %build # Prevent the cpp examples from compilation and installation ++++++ bcc-bsc1080085-detect-slab-for-slabratetop.patch ++++++ diff --git a/tools/slabratetop.py b/tools/slabratetop.py index 956508b..3aee05a 100755 --- a/tools/slabratetop.py +++ b/tools/slabratetop.py @@ -61,7 +61,11 @@ bpf_text = """ #include <uapi/linux/ptrace.h> #include <linux/mm.h> #include <linux/slab.h> +#ifdef CONFIG_SLUB #include <linux/slub_def.h> +#else +#include <linux/slab_def.h> +#endif #define CACHE_NAME_SIZE 32 ++++++ bcc-bsc1080085-import-readline-from-lib.patch ++++++ diff --git a/tools/bashreadline.py b/tools/bashreadline.py index 1aaaa11..8abbbdd 100755 --- a/tools/bashreadline.py +++ b/tools/bashreadline.py @@ -19,6 +19,7 @@ import ctypes as ct # load BPF program bpf_text = """ #include <uapi/linux/ptrace.h> +#include <linux/sched.h> struct str_t { u64 pid; @@ -28,10 +29,14 @@ struct str_t { BPF_PERF_OUTPUT(events); int printret(struct pt_regs *ctx) { + char comm[TASK_COMM_LEN]; struct str_t data = {}; u32 pid; if (!PT_REGS_RC(ctx)) return 0; + bpf_get_current_comm(&comm, sizeof(comm)); + if (comm[0] != 'b' || comm[1] != 'a' || comm[2] != 's' || comm[3] != 'h') + return 0; pid = bpf_get_current_pid_tgid(); data.pid = pid; bpf_probe_read(&data.str, sizeof(data.str), (void *)PT_REGS_RC(ctx)); @@ -49,7 +54,7 @@ class Data(ct.Structure): ] b = BPF(text=bpf_text) -b.attach_uretprobe(name="/bin/bash", sym="readline", fn_name="printret") +b.attach_uretprobe(name="readline", sym="readline", fn_name="printret") # header print("%-9s %-6s %s" % ("TIME", "PID", "COMMAND"))
