]> git.itanic.dy.fi Git - linux-stable/commit
perf dlfilter: Add al_cleanup()
authorAdrian Hunter <adrian.hunter@intel.com>
Mon, 31 Jul 2023 09:18:57 +0000 (12:18 +0300)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Tue, 15 Aug 2023 19:41:49 +0000 (16:41 -0300)
commit82b0a10390e5f198a4e23c9cc6a7307d2cf099f3
tree1af500da16e5328cd949850acfc23f2c7270b851
parent42c6dd9d23019ff339d0aca80a444eb71087050e
perf dlfilter: Add al_cleanup()

Add perf_dlfilter_fns.al_cleanup() to do addr_location__exit() on data
passed via perf_dlfilter_fns.resolve_address().

Add dlfilter-test-api-v2 to the "dlfilter C API" test to test it.

Update documentation, clarifying that data returned by APIs should not
be dereferenced after filter_event() and filter_event_early() return.

Fixes: 0dd5041c9a0eaf8c ("perf addr_location: Add init/exit/copy functions")
Reviewed-by: Ian Rogers <irogers@google.com>
Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Link: https://lore.kernel.org/r/20230731091857.10681-3-adrian.hunter@intel.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/Documentation/perf-dlfilter.txt
tools/perf/Makefile.perf
tools/perf/dlfilters/dlfilter-test-api-v2.c [new file with mode: 0644]
tools/perf/include/perf/perf_dlfilter.h
tools/perf/tests/dlfilter-test.c
tools/perf/util/dlfilter.c