]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
perf beauty prctl: Export the 'options' strarray
authorArnaldo Carvalho de Melo <acme@redhat.com>
Tue, 11 Feb 2020 18:46:10 +0000 (15:46 -0300)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Tue, 11 Feb 2020 19:41:50 +0000 (16:41 -0300)
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>
tools/perf/trace/beauty/beauty.h
tools/perf/trace/beauty/prctl.c

index 5a61043c2ff732e483ae57ad5ca40c5a86811b40..d6dfe68a7612552ab0eebb2022064c660737566a 100644 (file)
@@ -213,6 +213,8 @@ size_t syscall_arg__scnprintf_x86_arch_prctl_code(char *bf, size_t size, struct
 size_t syscall_arg__scnprintf_prctl_option(char *bf, size_t size, struct syscall_arg *arg);
 #define SCA_PRCTL_OPTION syscall_arg__scnprintf_prctl_option
 
+extern struct strarray strarray__prctl_options;
+
 size_t syscall_arg__scnprintf_prctl_arg2(char *bf, size_t size, struct syscall_arg *arg);
 #define SCA_PRCTL_ARG2 syscall_arg__scnprintf_prctl_arg2
 
index ba2179abed00982e0f3fce9a7c66bc9780a083b3..6fe5ad5f5d3a4e4b8c043518215075874fe09892 100644 (file)
 
 #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);
 }