diff options
author | Frederic Weisbecker <fweisbec@gmail.com> | 2008-12-03 17:45:11 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-12-04 04:18:39 -0500 |
commit | 1fd8f2a3f9a91b287a876cef830b21baafc8a799 (patch) | |
tree | 2baf0dfb14e3765efa370edafa2ab7f78d654308 /kernel/trace/trace.h | |
parent | b29144c317fb748dae6d72c0f88eda9d43165b8d (diff) |
tracing/function-graph-tracer: handle ftrace_printk entries
Handle the TRACE_PRINT entries from the function grapg tracer
and output them as a C comment just below the function that called
it, as if it was a comment inside this function.
Example with an ftrace_printk inside might_sleep() function:
void __might_sleep(char *file, int line)
{
static unsigned long prev_jiffy; /* ratelimiting */
ftrace_printk("Hi I'm a comment in might_sleep() :-)");
A chunk of a resulting trace:
0) | _reiserfs_free_block() {
0) | reiserfs_read_bitmap_block() {
0) | __bread() {
0) | __getblk() {
0) | __find_get_block() {
0) 0.698 us | mark_page_accessed();
0) 2.267 us | }
0) | __might_sleep() {
0) | /* Hi I'm a comment in might_sleep() :-) */
0) 1.321 us | }
0) 5.872 us | }
0) 7.313 us | }
0) 8.718 us | }
And this patch brings two minor fixes:
- The newline after a switch-out task has disappeared
- The "|" sign just before the cpu number on task-switch has been deleted.
0) 0.616 us | pick_next_task_rt();
0) 1.457 us | _spin_trylock();
0) 0.653 us | _spin_unlock();
0) 0.728 us | _spin_trylock();
0) 0.631 us | _spin_unlock();
0) 0.729 us | native_load_sp0();
0) 0.593 us | native_load_tls();
------------------------------------------
0) cat-2834 => migrati-3
------------------------------------------
0) | finish_task_switch() {
0) 0.841 us | _spin_unlock_irq();
0) 0.616 us | post_schedule_rt();
0) 3.882 us | }
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Acked-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel/trace/trace.h')
-rw-r--r-- | kernel/trace/trace.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/kernel/trace/trace.h b/kernel/trace/trace.h index 0565ae9a2210..fce98898205a 100644 --- a/kernel/trace/trace.h +++ b/kernel/trace/trace.h | |||
@@ -117,6 +117,7 @@ struct userstack_entry { | |||
117 | struct print_entry { | 117 | struct print_entry { |
118 | struct trace_entry ent; | 118 | struct trace_entry ent; |
119 | unsigned long ip; | 119 | unsigned long ip; |
120 | int depth; | ||
120 | char buf[]; | 121 | char buf[]; |
121 | }; | 122 | }; |
122 | 123 | ||
@@ -498,7 +499,8 @@ seq_print_ip_sym(struct trace_seq *s, unsigned long ip, | |||
498 | extern ssize_t trace_seq_to_user(struct trace_seq *s, char __user *ubuf, | 499 | extern ssize_t trace_seq_to_user(struct trace_seq *s, char __user *ubuf, |
499 | size_t cnt); | 500 | size_t cnt); |
500 | extern long ns2usecs(cycle_t nsec); | 501 | extern long ns2usecs(cycle_t nsec); |
501 | extern int trace_vprintk(unsigned long ip, const char *fmt, va_list args); | 502 | extern int |
503 | trace_vprintk(unsigned long ip, int depth, const char *fmt, va_list args); | ||
502 | 504 | ||
503 | extern unsigned long trace_flags; | 505 | extern unsigned long trace_flags; |
504 | 506 | ||