mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-13 14:24:11 +08:00
perf trace: Introduce syscall_arg__scnprintf_strarray_flags
So that one can just define a strarray and process it as a set of flags, similar to syscall_arg__scnprintf_strarray() with plain arrays. Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Brendan Gregg <brendan.d.gregg@gmail.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Luis Cláudio Gonçalves <lclaudio@redhat.com> Cc: Namhyung Kim <namhyung@kernel.org> Link: https://lkml.kernel.org/n/tip-nnt25wkpkow2w0yefhi6sb7q@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
This commit is contained in:
parent
3637c64731
commit
f5b91dbba1
@ -403,6 +403,11 @@ static size_t syscall_arg__scnprintf_strarray(char *bf, size_t size,
|
||||
|
||||
#define SCA_STRARRAY syscall_arg__scnprintf_strarray
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
size_t strarrays__scnprintf(struct strarrays *sas, char *bf, size_t size, const char *intfmt, bool show_prefix, int val)
|
||||
{
|
||||
size_t printed;
|
||||
|
@ -108,6 +108,9 @@ struct syscall_arg {
|
||||
|
||||
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
|
||||
|
||||
size_t syscall_arg__scnprintf_strarrays(char *bf, size_t size, struct syscall_arg *arg);
|
||||
#define SCA_STRARRAYS syscall_arg__scnprintf_strarrays
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user