diff options
author | Wolfgang Mauerer <wolfgang.mauerer@siemens.com> | 2012-03-22 06:18:20 -0400 |
---|---|---|
committer | Luis Henriques <luis.henriques@canonical.com> | 2012-05-01 05:59:56 -0400 |
commit | d1095fe388f4747fe8ceba661e5bacdb45bcfb01 (patch) | |
tree | f287831a06e22cab56fea67c1bfdb956aed600d6 /kernel | |
parent | 3bac96af02f27353882a3410b0ba6f721c365875 (diff) |
tracing: Fix ftrace stack trace entries
BugLink: http://bugs.launchpad.net/bugs/983326
commit 01de982abf8c9e10fc3089e10585cd2cc914bdab upstream.
8 hex characters tell only half the tale for 64 bit CPUs,
so use the appropriate length.
Link: http://lkml.kernel.org/r/1332411501-8059-2-git-send-email-wolfgang.mauerer@siemens.com
Signed-off-by: Wolfgang Mauerer <wolfgang.mauerer@siemens.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/trace/trace_entries.h | 16 | ||||
-rw-r--r-- | kernel/trace/trace_export.c | 2 |
2 files changed, 13 insertions, 5 deletions
diff --git a/kernel/trace/trace_entries.h b/kernel/trace/trace_entries.h index e32744c84d9..1fe81eef1ce 100644 --- a/kernel/trace/trace_entries.h +++ b/kernel/trace/trace_entries.h | |||
@@ -156,6 +156,12 @@ FTRACE_ENTRY_DUP(wakeup, ctx_switch_entry, | |||
156 | 156 | ||
157 | #define FTRACE_STACK_ENTRIES 8 | 157 | #define FTRACE_STACK_ENTRIES 8 |
158 | 158 | ||
159 | #ifndef CONFIG_64BIT | ||
160 | # define IP_FMT "%08lx" | ||
161 | #else | ||
162 | # define IP_FMT "%016lx" | ||
163 | #endif | ||
164 | |||
159 | FTRACE_ENTRY(kernel_stack, stack_entry, | 165 | FTRACE_ENTRY(kernel_stack, stack_entry, |
160 | 166 | ||
161 | TRACE_STACK, | 167 | TRACE_STACK, |
@@ -164,8 +170,9 @@ FTRACE_ENTRY(kernel_stack, stack_entry, | |||
164 | __array( unsigned long, caller, FTRACE_STACK_ENTRIES ) | 170 | __array( unsigned long, caller, FTRACE_STACK_ENTRIES ) |
165 | ), | 171 | ), |
166 | 172 | ||
167 | F_printk("\t=> (%08lx)\n\t=> (%08lx)\n\t=> (%08lx)\n\t=> (%08lx)\n" | 173 | F_printk("\t=> (" IP_FMT ")\n\t=> (" IP_FMT ")\n\t=> (" IP_FMT ")\n" |
168 | "\t=> (%08lx)\n\t=> (%08lx)\n\t=> (%08lx)\n\t=> (%08lx)\n", | 174 | "\t=> (" IP_FMT ")\n\t=> (" IP_FMT ")\n\t=> (" IP_FMT ")\n" |
175 | "\t=> (" IP_FMT ")\n\t=> (" IP_FMT ")\n", | ||
169 | __entry->caller[0], __entry->caller[1], __entry->caller[2], | 176 | __entry->caller[0], __entry->caller[1], __entry->caller[2], |
170 | __entry->caller[3], __entry->caller[4], __entry->caller[5], | 177 | __entry->caller[3], __entry->caller[4], __entry->caller[5], |
171 | __entry->caller[6], __entry->caller[7]) | 178 | __entry->caller[6], __entry->caller[7]) |
@@ -180,8 +187,9 @@ FTRACE_ENTRY(user_stack, userstack_entry, | |||
180 | __array( unsigned long, caller, FTRACE_STACK_ENTRIES ) | 187 | __array( unsigned long, caller, FTRACE_STACK_ENTRIES ) |
181 | ), | 188 | ), |
182 | 189 | ||
183 | F_printk("\t=> (%08lx)\n\t=> (%08lx)\n\t=> (%08lx)\n\t=> (%08lx)\n" | 190 | F_printk("\t=> (" IP_FMT ")\n\t=> (" IP_FMT ")\n\t=> (" IP_FMT ")\n" |
184 | "\t=> (%08lx)\n\t=> (%08lx)\n\t=> (%08lx)\n\t=> (%08lx)\n", | 191 | "\t=> (" IP_FMT ")\n\t=> (" IP_FMT ")\n\t=> (" IP_FMT ")\n" |
192 | "\t=> (" IP_FMT ")\n\t=> (" IP_FMT ")\n", | ||
185 | __entry->caller[0], __entry->caller[1], __entry->caller[2], | 193 | __entry->caller[0], __entry->caller[1], __entry->caller[2], |
186 | __entry->caller[3], __entry->caller[4], __entry->caller[5], | 194 | __entry->caller[3], __entry->caller[4], __entry->caller[5], |
187 | __entry->caller[6], __entry->caller[7]) | 195 | __entry->caller[6], __entry->caller[7]) |
diff --git a/kernel/trace/trace_export.c b/kernel/trace/trace_export.c index bbeec31e0ae..ad4000c71be 100644 --- a/kernel/trace/trace_export.c +++ b/kernel/trace/trace_export.c | |||
@@ -150,7 +150,7 @@ ftrace_define_fields_##name(struct ftrace_event_call *event_call) \ | |||
150 | #define __dynamic_array(type, item) | 150 | #define __dynamic_array(type, item) |
151 | 151 | ||
152 | #undef F_printk | 152 | #undef F_printk |
153 | #define F_printk(fmt, args...) #fmt ", " __stringify(args) | 153 | #define F_printk(fmt, args...) __stringify(fmt) ", " __stringify(args) |
154 | 154 | ||
155 | #undef FTRACE_ENTRY | 155 | #undef FTRACE_ENTRY |
156 | #define FTRACE_ENTRY(call, struct_name, etype, tstruct, print) \ | 156 | #define FTRACE_ENTRY(call, struct_name, etype, tstruct, print) \ |