mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-23 07:12:09 +00:00
perf evsel: Store backpointer to attached bpf_object
We may want to get to this bpf_object, to search for other BPF programs, etc. Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Luis Cláudio Gonçalves <lclaudio@redhat.com> Cc: Namhyung Kim <namhyung@kernel.org> Link: https://lkml.kernel.org/n/tip-3y8hrb6lszjfi23vjlic3cib@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
This commit is contained in:
parent
2620b7e369
commit
af4a0991f4
5 changed files with 9 additions and 4 deletions
|
@ -630,7 +630,7 @@ struct __add_bpf_event_param {
|
|||
struct list_head *head_config;
|
||||
};
|
||||
|
||||
static int add_bpf_event(const char *group, const char *event, int fd,
|
||||
static int add_bpf_event(const char *group, const char *event, int fd, struct bpf_object *obj,
|
||||
void *_param)
|
||||
{
|
||||
LIST_HEAD(new_evsels);
|
||||
|
@ -672,6 +672,7 @@ static int add_bpf_event(const char *group, const char *event, int fd,
|
|||
pr_debug("adding %s:%s to %p\n",
|
||||
group, event, pos);
|
||||
pos->bpf_fd = fd;
|
||||
pos->bpf_obj = obj;
|
||||
}
|
||||
list_splice(&new_evsels, list);
|
||||
return 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue