Rebase to pcp-6.0.1-1 with a PowerPC patch for vendor libbpf builds

Resolves: rhbz#1941873
Resolves: rhbz#2117074
Resolves: rhbz#2127037
This commit is contained in:
Nathan Scott 2022-10-28 16:17:51 +11:00
parent e669491265
commit 34b549878b
2 changed files with 111 additions and 0 deletions

View File

@ -12,6 +12,7 @@ Source1: %{pcp_git_url}/main/debian/pcp-testsuite.sysusers
Source2: %{pcp_git_url}/main/debian/pcp.sysusers Source2: %{pcp_git_url}/main/debian/pcp.sysusers
Patch0: redhat-bugzilla-2117074-vendored_vmlinux.h.patch Patch0: redhat-bugzilla-2117074-vendored_vmlinux.h.patch
Patch1: redhat-bugzilla-2117074-powerpc_vmlinux.h.patch
# The additional linker flags break out-of-tree PMDAs. # The additional linker flags break out-of-tree PMDAs.
# https://bugzilla.redhat.com/show_bug.cgi?id=2043092 # https://bugzilla.redhat.com/show_bug.cgi?id=2043092
@ -2293,6 +2294,7 @@ updated policy package.
%prep %prep
%setup -q %setup -q
%patch0 -p1 %patch0 -p1
%patch1 -p1
%build %build
# the buildsubdir macro gets defined in %%setup and is apparently only available in the next step (i.e. the %%build step) # the buildsubdir macro gets defined in %%setup and is apparently only available in the next step (i.e. the %%build step)

View File

@ -0,0 +1,109 @@
diff --git a/vendor/github.com/iovisor/bcc/libbpf-tools/powerpc/vmlinux_510.h b/vendor/github.com/iovisor/bcc/libbpf-tools/powerpc/vmlinux_510.h
index 3b1b0127d1..dd14bcc41f 100644
--- a/vendor/github.com/iovisor/bcc/libbpf-tools/powerpc/vmlinux_510.h
+++ b/vendor/github.com/iovisor/bcc/libbpf-tools/powerpc/vmlinux_510.h
@@ -7806,6 +7806,80 @@ struct perf_cgroup_info {
u64 timestamp;
};
+struct perf_event {
+ struct list_head event_entry;
+ struct list_head sibling_list;
+ struct list_head active_list;
+ struct rb_node group_node;
+ u64 group_index;
+ struct list_head migrate_entry;
+ struct hlist_node hlist_entry;
+ struct list_head active_entry;
+ int nr_siblings;
+ int event_caps;
+ int group_caps;
+ struct perf_event *group_leader;
+ struct pmu *pmu;
+ void *pmu_private;
+ enum perf_event_state state;
+ unsigned int attach_state;
+ local64_t count;
+ atomic64_t child_count;
+ u64 total_time_enabled;
+ u64 total_time_running;
+ u64 tstamp;
+ struct perf_event_attr attr;
+ u16 header_size;
+ u16 id_header_size;
+ u16 read_size;
+ struct hw_perf_event hw;
+ struct perf_event_context *ctx;
+ atomic_long_t refcount;
+ atomic64_t child_total_time_enabled;
+ atomic64_t child_total_time_running;
+ struct mutex child_mutex;
+ struct list_head child_list;
+ struct perf_event *parent;
+ int oncpu;
+ int cpu;
+ struct list_head owner_entry;
+ struct task_struct *owner;
+ struct mutex mmap_mutex;
+ atomic_t mmap_count;
+ struct perf_buffer *rb;
+ struct list_head rb_entry;
+ long unsigned int rcu_batches;
+ int rcu_pending;
+ wait_queue_head_t waitq;
+ struct fasync_struct *fasync;
+ int pending_wakeup;
+ int pending_kill;
+ int pending_disable;
+ long unsigned int pending_addr;
+ struct irq_work pending;
+ atomic_t event_limit;
+ struct perf_addr_filters_head addr_filters;
+ struct perf_addr_filter_range *addr_filter_ranges;
+ long unsigned int addr_filters_gen;
+ struct perf_event *aux_event;
+ void (*destroy)(struct perf_event *);
+ struct callback_head callback_head;
+ struct pid_namespace *ns;
+ u64 id;
+ u64 (*clock)();
+ perf_overflow_handler_t overflow_handler;
+ void *overflow_handler_context;
+ perf_overflow_handler_t orig_overflow_handler;
+ struct bpf_prog *prog;
+ u64 bpf_cookie;
+ struct trace_event_call *tp_event;
+ struct event_filter *filter;
+ struct ftrace_ops ftrace_ops;
+ struct perf_cgroup *cgrp;
+ void *security;
+ struct list_head sb_list;
+};
+
struct trace_entry {
short unsigned int type;
unsigned char flags;
@@ -36449,7 +36523,10 @@ enum bpf_link_type {
BPF_LINK_TYPE_ITER = 4,
BPF_LINK_TYPE_NETNS = 5,
BPF_LINK_TYPE_XDP = 6,
- MAX_BPF_LINK_TYPE = 7,
+ BPF_LINK_TYPE_PERF_EVENT = 7,
+ BPF_LINK_TYPE_KPROBE_MULTI = 8,
+ BPF_LINK_TYPE_STRUCT_OPS = 9,
+ MAX_BPF_LINK_TYPE = 10,
};
struct bpf_link_info {
@@ -40756,6 +40833,11 @@ struct bpf_raw_tp_link {
struct bpf_raw_event_map *btp;
};
+struct bpf_perf_link {
+ struct bpf_link link;
+ struct file *perf_file;
+};
+
struct btf_member {
__u32 name_off;
__u32 type;