Skip to content

Commit c0134b3

Browse files
committed
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 <[email protected]> Cc: Christian Brauner <[email protected]> Cc: Jiri Olsa <[email protected]> Cc: Mike Christie <[email protected]> Cc: Namhyung Kim <[email protected]> Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
1 parent fc9199d commit c0134b3

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

tools/perf/trace/beauty/beauty.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,8 @@ size_t syscall_arg__scnprintf_x86_arch_prctl_code(char *bf, size_t size, struct
213213
size_t syscall_arg__scnprintf_prctl_option(char *bf, size_t size, struct syscall_arg *arg);
214214
#define SCA_PRCTL_OPTION syscall_arg__scnprintf_prctl_option
215215

216+
extern struct strarray strarray__prctl_options;
217+
216218
size_t syscall_arg__scnprintf_prctl_arg2(char *bf, size_t size, struct syscall_arg *arg);
217219
#define SCA_PRCTL_ARG2 syscall_arg__scnprintf_prctl_arg2
218220

tools/perf/trace/beauty/prctl.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,10 @@
1111

1212
#include "trace/beauty/generated/prctl_option_array.c"
1313

14+
DEFINE_STRARRAY(prctl_options, "PR_");
15+
1416
static size_t prctl__scnprintf_option(int option, char *bf, size_t size, bool show_prefix)
1517
{
16-
static DEFINE_STRARRAY(prctl_options, "PR_");
1718
return strarray__scnprintf(&strarray__prctl_options, bf, size, "%d", show_prefix, option);
1819
}
1920

0 commit comments

Comments
 (0)