diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2020-02-11 15:46:10 -0300 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2020-02-11 16:41:50 -0300 |
commit | c0134b3366ba5f0aba41d56006b574d3be7f5ed3 (patch) | |
tree | 30d6800724e4a499f55bd389877a7d8a93742d91 /tools/perf/trace/beauty/prctl.c | |
parent | tools headers UAPI: Sync prctl.h with the kernel sources (diff) | |
download | linux-dev-c0134b3366ba5f0aba41d56006b574d3be7f5ed3.tar.xz linux-dev-c0134b3366ba5f0aba41d56006b574d3be7f5ed3.zip |
perf beauty prctl: Export the 'options' strarray
So that we can use it with strtoul, allowing string to number
conversions in filter expressions.
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Christian Brauner <christian.brauner@ubuntu.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Mike Christie <mchristi@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to '')
-rw-r--r-- | tools/perf/trace/beauty/prctl.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/perf/trace/beauty/prctl.c b/tools/perf/trace/beauty/prctl.c index ba2179abed00..6fe5ad5f5d3a 100644 --- a/tools/perf/trace/beauty/prctl.c +++ b/tools/perf/trace/beauty/prctl.c @@ -11,9 +11,10 @@ #include "trace/beauty/generated/prctl_option_array.c" +DEFINE_STRARRAY(prctl_options, "PR_"); + static size_t prctl__scnprintf_option(int option, char *bf, size_t size, bool show_prefix) { - static DEFINE_STRARRAY(prctl_options, "PR_"); return strarray__scnprintf(&strarray__prctl_options, bf, size, "%d", show_prefix, option); } |