perf trace: Ditch __syscall__arg_val() variant, not needed anymore
authorArnaldo Carvalho de Melo <acme@redhat.com>
Wed, 19 Jul 2017 18:02:43 +0000 (15:02 -0300)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Thu, 20 Jul 2017 12:55:52 +0000 (09:55 -0300)
All callers now can use syscall__arg_val(arg, idx), be it to iterate
thru the syscall arguments while taking into account alignment, or to
get values for other arguments that affect how the current argument
should be formatted (think of fcntl's 'cmd' and 'arg' arguments).

Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Wang Nan <wangnan0@huawei.com>
Link: http://lkml.kernel.org/n/tip-wm5b156d8kro1r4y3b33eyta@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/builtin-trace.c

index fc4d33a..f8b7bfd 100644 (file)
@@ -1336,20 +1336,15 @@ out:
  * variable to read it. Most notably this avoids extended load instructions
  * on unaligned addresses
  */
-static unsigned long __syscall_arg__val(unsigned char *args, u8 idx)
+unsigned long syscall_arg__val(struct syscall_arg *arg, u8 idx)
 {
        unsigned long val;
-       unsigned char *p = args + sizeof(unsigned long) * idx;
+       unsigned char *p = arg->args + sizeof(unsigned long) * idx;
 
        memcpy(&val, p, sizeof(val));
        return val;
 }
 
-unsigned long syscall_arg__val(struct syscall_arg *arg, u8 idx)
-{
-       return __syscall_arg__val(arg->args, idx);
-}
-
 static size_t syscall__scnprintf_val(struct syscall *sc, char *bf, size_t size,
                                     struct syscall_arg *arg, unsigned long val)
 {