diff --git a/tools/perf/builtin-trace.c b/tools/perf/builtin-trace.c index 2c1968061b4bc4cbabba1db3a3a8ef78247faae3..faa5bf4a5a3a7eca57e18658913c88373ef945ec 100644 --- a/tools/perf/builtin-trace.c +++ b/tools/perf/builtin-trace.c @@ -86,8 +86,12 @@ # define F_LINUX_SPECIFIC_BASE 1024 #endif +/* + * strtoul: Go from a string to a value, i.e. for msr: MSR_FS_BASE to 0xc0000100 + */ struct syscall_arg_fmt { size_t (*scnprintf)(char *bf, size_t size, struct syscall_arg *arg); + bool (*strtoul)(char *bf, size_t size, struct syscall_arg *arg, u64 *val); unsigned long (*mask_val)(struct syscall_arg *arg, unsigned long val); void *parm; const char *name; @@ -1543,8 +1547,10 @@ syscall_arg_fmt__init_array(struct syscall_arg_fmt *arg, struct tep_format_field } else { struct syscall_arg_fmt *fmt = syscall_arg_fmt__find_by_name(field->name); - if (fmt) + if (fmt) { arg->scnprintf = fmt->scnprintf; + arg->strtoul = fmt->strtoul; + } } }