diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2018-12-14 15:08:40 -0300 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2018-12-18 16:07:42 -0300 |
commit | 2e3d7fac9db5e80d1cc26bb1453b85245c26d657 (patch) | |
tree | 8dcae752eae3df3f51d81a2b0af78679cbbbc23a /tools/perf/trace/beauty/prctl.c | |
parent | 721f5326fb35dcba18ee4d9ef2b32394f86d403e (diff) | |
download | lwn-2e3d7fac9db5e80d1cc26bb1453b85245c26d657.tar.gz lwn-2e3d7fac9db5e80d1cc26bb1453b85245c26d657.zip |
perf trace: Add a prefix member to the strarray class
So that the user, in an upcoming patch, can select printing it to get
the full string as used in the source code, not one with a common prefix
chopped off so as to make the output more compact.
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Luis Cláudio Gonçalves <lclaudio@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Wang Nan <wangnan0@huawei.com>
Link: https://lkml.kernel.org/n/tip-zypczc88gzbmeqx7b372s138@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/trace/beauty/prctl.c')
-rw-r--r-- | tools/perf/trace/beauty/prctl.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/perf/trace/beauty/prctl.c b/tools/perf/trace/beauty/prctl.c index be7a5d395975..7b6466b0856d 100644 --- a/tools/perf/trace/beauty/prctl.c +++ b/tools/perf/trace/beauty/prctl.c @@ -13,13 +13,13 @@ static size_t prctl__scnprintf_option(int option, char *bf, size_t size) { - static DEFINE_STRARRAY(prctl_options); + static DEFINE_STRARRAY(prctl_options, "PR_"); return strarray__scnprintf(&strarray__prctl_options, bf, size, "%d", option); } static size_t prctl__scnprintf_set_mm(int option, char *bf, size_t size) { - static DEFINE_STRARRAY(prctl_set_mm_options); + static DEFINE_STRARRAY(prctl_set_mm_options, "PR_SET_MM_"); return strarray__scnprintf(&strarray__prctl_set_mm_options, bf, size, "%d", option); } |