[<prev] [next>] [day] [month] [year] [list]
Message-ID: <157169993900.29376.5463460192237318860.tip-bot2@tip-bot2>
Date: Mon, 21 Oct 2019 23:18:58 -0000
From: "tip-bot2 for Arnaldo Carvalho de Melo" <tip-bot2@...utronix.de>
To: linux-tip-commits@...r.kernel.org
Cc: Adrian Hunter <adrian.hunter@...el.com>,
David Ahern <dsahern@...il.com>, Jiri Olsa <jolsa@...nel.org>,
Luis Cláudio Gonçalves
<lclaudio@...hat.com>, Namhyung Kim <namhyung@...nel.org>,
Arnaldo Carvalho de Melo <acme@...hat.com>,
Ingo Molnar <mingo@...nel.org>, Borislav Petkov <bp@...en8.de>,
linux-kernel@...r.kernel.org
Subject: [tip: perf/core] libbeauty: Introduce syscall_arg__strtoul_strarray()
The following commit has been merged into the perf/core branch of tip:
Commit-ID: d066da978f89ef035c823367a97650f0c4cfa464
Gitweb: https://git.kernel.org/tip/d066da978f89ef035c823367a97650f0c4cfa464
Author: Arnaldo Carvalho de Melo <acme@...hat.com>
AuthorDate: Thu, 17 Oct 2019 18:33:00 -03:00
Committer: Arnaldo Carvalho de Melo <acme@...hat.com>
CommitterDate: Fri, 18 Oct 2019 12:07:46 -03:00
libbeauty: Introduce syscall_arg__strtoul_strarray()
To go from strarrays strings to its indexes.
Cc: Adrian Hunter <adrian.hunter@...el.com>
Cc: David Ahern <dsahern@...il.com>
Cc: Jiri Olsa <jolsa@...nel.org>
Cc: Luis Cláudio Gonçalves <lclaudio@...hat.com>
Cc: Namhyung Kim <namhyung@...nel.org>
Link: https://lkml.kernel.org/n/tip-wta0qvo207z27huib2c4ijxq@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@...hat.com>
---
tools/perf/builtin-trace.c | 6 ++++++
tools/perf/trace/beauty/beauty.h | 3 +++
2 files changed, 9 insertions(+)
diff --git a/tools/perf/builtin-trace.c b/tools/perf/builtin-trace.c
index 3502417..0294b17 100644
--- a/tools/perf/builtin-trace.c
+++ b/tools/perf/builtin-trace.c
@@ -535,6 +535,11 @@ static size_t syscall_arg__scnprintf_strarray(char *bf, size_t size,
#define SCA_STRARRAY syscall_arg__scnprintf_strarray
+bool syscall_arg__strtoul_strarray(char *bf, size_t size, struct syscall_arg *arg, u64 *ret)
+{
+ return strarray__strtoul(arg->parm, bf, size, ret);
+}
+
size_t syscall_arg__scnprintf_strarray_flags(char *bf, size_t size, struct syscall_arg *arg)
{
return strarray__scnprintf_flags(arg->parm, bf, size, arg->show_string_prefix, arg->val);
@@ -824,6 +829,7 @@ static size_t syscall_arg__scnprintf_getrandom_flags(char *bf, size_t size,
#define STRARRAY(name, array) \
{ .scnprintf = SCA_STRARRAY, \
+ .strtoul = STUL_STRARRAY, \
.parm = &strarray__##array, }
#define STRARRAY_FLAGS(name, array) \
diff --git a/tools/perf/trace/beauty/beauty.h b/tools/perf/trace/beauty/beauty.h
index 232b64d..1b8a30e 100644
--- a/tools/perf/trace/beauty/beauty.h
+++ b/tools/perf/trace/beauty/beauty.h
@@ -122,6 +122,9 @@ unsigned long syscall_arg__val(struct syscall_arg *arg, u8 idx);
size_t syscall_arg__scnprintf_strarray_flags(char *bf, size_t size, struct syscall_arg *arg);
#define SCA_STRARRAY_FLAGS syscall_arg__scnprintf_strarray_flags
+bool syscall_arg__strtoul_strarray(char *bf, size_t size, struct syscall_arg *arg, u64 *ret);
+#define STUL_STRARRAY syscall_arg__strtoul_strarray
+
size_t syscall_arg__scnprintf_x86_irq_vectors(char *bf, size_t size, struct syscall_arg *arg);
#define SCA_X86_IRQ_VECTORS syscall_arg__scnprintf_x86_irq_vectors
Powered by blists - more mailing lists