mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-09-18 22:14:16 +00:00
perf script: Fix documented const'ness of perf_dlfilter_fns
perf_dlfilter_fns must not be const, because it is not. Declaring it const can result in it being mapped read-only, causing a segfaullt when it is written. Update documentation accordingly. Signed-off-by: Adrian Hunter <adrian.hunter@intel.com> Cc: Jiri Olsa <jolsa@redhat.com> Fixes: 8defa7147d5572 ("perf script Add API for filtering via dynamically loaded shared object") Link: https //lore.kernel.org/r/20210811101036.17986-2-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
This commit is contained in:
parent
c4ad8fabd0
commit
988db17932
1 changed files with 2 additions and 2 deletions
|
@ -32,7 +32,7 @@ The API for filtering consists of the following:
|
|||
----
|
||||
#include <perf/perf_dlfilter.h>
|
||||
|
||||
const struct perf_dlfilter_fns perf_dlfilter_fns;
|
||||
struct perf_dlfilter_fns perf_dlfilter_fns;
|
||||
|
||||
int start(void **data, void *ctx);
|
||||
int stop(void *data, void *ctx);
|
||||
|
@ -214,7 +214,7 @@ Filter out everything except branches from "foo" to "bar":
|
|||
#include <perf/perf_dlfilter.h>
|
||||
#include <string.h>
|
||||
|
||||
const struct perf_dlfilter_fns perf_dlfilter_fns;
|
||||
struct perf_dlfilter_fns perf_dlfilter_fns;
|
||||
|
||||
int filter_event(void *data, const struct perf_dlfilter_sample *sample, void *ctx)
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue