aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/trace
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/trace')
-rw-r--r--kernel/trace/trace_syscalls.c25
1 files changed, 16 insertions, 9 deletions
diff --git a/kernel/trace/trace_syscalls.c b/kernel/trace/trace_syscalls.c
index 28e4dae4af21..46c1b977a2cb 100644
--- a/kernel/trace/trace_syscalls.c
+++ b/kernel/trace/trace_syscalls.c
@@ -46,15 +46,22 @@ print_syscall_enter(struct trace_iterator *iter, int flags)
46 return TRACE_TYPE_PARTIAL_LINE; 46 return TRACE_TYPE_PARTIAL_LINE;
47 } 47 }
48 /* parameter values */ 48 /* parameter values */
49 ret = trace_seq_printf(s, "%s: %lx%s ", entry->args[i], 49 ret = trace_seq_printf(s, "%s: %lx%s", entry->args[i],
50 trace->args[i], 50 trace->args[i],
51 i == entry->nb_args - 1 ? ")" : ","); 51 i == entry->nb_args - 1 ? "" : ", ");
52 if (!ret) 52 if (!ret)
53 return TRACE_TYPE_PARTIAL_LINE; 53 return TRACE_TYPE_PARTIAL_LINE;
54 } 54 }
55 55
56 ret = trace_seq_putc(s, ')');
57 if (!ret)
58 return TRACE_TYPE_PARTIAL_LINE;
59
56end: 60end:
57 trace_seq_printf(s, "\n"); 61 ret = trace_seq_putc(s, '\n');
62 if (!ret)
63 return TRACE_TYPE_PARTIAL_LINE;
64
58 return TRACE_TYPE_HANDLED; 65 return TRACE_TYPE_HANDLED;
59} 66}
60 67
@@ -129,24 +136,24 @@ int syscall_enter_format(struct ftrace_event_call *call, struct trace_seq *s)
129 offset += sizeof(unsigned long); 136 offset += sizeof(unsigned long);
130 } 137 }
131 138
132 trace_seq_printf(s, "\nprint fmt: \""); 139 trace_seq_puts(s, "\nprint fmt: \"");
133 for (i = 0; i < entry->nb_args; i++) { 140 for (i = 0; i < entry->nb_args; i++) {
134 ret = trace_seq_printf(s, "%s: 0x%%0%zulx%s", entry->args[i], 141 ret = trace_seq_printf(s, "%s: 0x%%0%zulx%s", entry->args[i],
135 sizeof(unsigned long), 142 sizeof(unsigned long),
136 i == entry->nb_args - 1 ? "\", " : ", "); 143 i == entry->nb_args - 1 ? "" : ", ");
137 if (!ret) 144 if (!ret)
138 return 0; 145 return 0;
139 } 146 }
147 trace_seq_putc(s, '"');
140 148
141 for (i = 0; i < entry->nb_args; i++) { 149 for (i = 0; i < entry->nb_args; i++) {
142 ret = trace_seq_printf(s, "((unsigned long)(REC->%s))%s", 150 ret = trace_seq_printf(s, ", ((unsigned long)(REC->%s))",
143 entry->args[i], 151 entry->args[i]);
144 i == entry->nb_args - 1 ? "\n" : ", ");
145 if (!ret) 152 if (!ret)
146 return 0; 153 return 0;
147 } 154 }
148 155
149 return ret; 156 return trace_seq_putc(s, '\n');
150} 157}
151 158
152int syscall_exit_format(struct ftrace_event_call *call, struct trace_seq *s) 159int syscall_exit_format(struct ftrace_event_call *call, struct trace_seq *s)