Skip to contentSkip to conversation

perf trace: Ditch __syscall__arg_val() variant, not needed anymore

tip:perf/core tip-bot for Arnaldo Carvalho de Melo 1 participant 1 message Jul 26, 2017 perf events

lore
Share & tools
lore
#0 lore raw
Commit-ID:  325f5091b0da5a7d8d190262661af17d75bee262
Gitweb:     http://git.kernel.org/tip/325f5091b0da5a7d8d190262661af17d75bee262
Author:     Arnaldo Carvalho de Melo <[email protected]>
AuthorDate: Wed, 19 Jul 2017 15:02:43 -0300
Committer:  Arnaldo Carvalho de Melo <[email protected]>
CommitDate: Thu, 20 Jul 2017 09:55:52 -0300

perf trace: Ditch __syscall__arg_val() variant, not needed anymore

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).

---
 tools/perf/builtin-trace.c | 9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)
tools/perf/builtin-trace.c +2 -7
index fc4d33a..f8b7bfd 100644
@@ -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)
 {