diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2019-07-15 16:22:57 -0300 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2019-07-29 18:34:41 -0300 |
commit | af4a0991f40a1e50e5caff0317f152df2c82bdeb (patch) | |
tree | b04d1087a844ef4fb50d74119aa50f76f6085f23 /tools/perf/util/parse-events.c | |
parent | 2620b7e3696a9470c7cda0a08e55813fd5e57e5c (diff) | |
download | linux-af4a0991f40a1e50e5caff0317f152df2c82bdeb.tar.bz2 |
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>
Diffstat (limited to 'tools/perf/util/parse-events.c')
-rw-r--r-- | tools/perf/util/parse-events.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/perf/util/parse-events.c b/tools/perf/util/parse-events.c index fac6b32ef94a..0540303e5e97 100644 --- a/tools/perf/util/parse-events.c +++ b/tools/perf/util/parse-events.c @@ -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; |