summaryrefslogtreecommitdiffstats
path: root/tools/perf/Documentation
diff options
context:
space:
mode:
authorAdrian Hunter <adrian.hunter@intel.com>2021-08-11 13:10:31 +0300
committerArnaldo Carvalho de Melo <acme@redhat.com>2021-08-11 09:33:15 -0300
commit988db17932a78d201e826af3df7e89494ee0c037 (patch)
tree5c9e7351268dd52c06eae49dc29b06d1f28a0139 /tools/perf/Documentation
parentc4ad8fabd03f76ed3a2a4c8aef6baf6cd4f24542 (diff)
downloadlinux-988db17932a78d201e826af3df7e89494ee0c037.tar.bz2
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>
Diffstat (limited to 'tools/perf/Documentation')
-rw-r--r--tools/perf/Documentation/perf-dlfilter.txt4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/perf/Documentation/perf-dlfilter.txt b/tools/perf/Documentation/perf-dlfilter.txt
index 02842cb4cf90..ece07509d1f7 100644
--- a/tools/perf/Documentation/perf-dlfilter.txt
+++ b/tools/perf/Documentation/perf-dlfilter.txt
@@ -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)
{