* How to write marker info in MMIO trace from kernel
@ 2010-05-04 18:36 Larry Finger
2010-05-04 18:42 ` Steven Rostedt
0 siblings, 1 reply; 5+ messages in thread
From: Larry Finger @ 2010-05-04 18:36 UTC (permalink / raw)
To: Steven Rostedt; +Cc: LKML
Stephen,
I hope you are the correct person for this question.
I would like to write information into the MMIO trace file similar to
what the user space write to /sys/.../trace_marker would accomplish,
however, I want to do it in place of printk statements in the driver I'm
tracing. Do you have any suggestions on how to do this? I have tools to
merge the trace dump with dmesg output, but the latter lags behind and I
do not get good correlation.
Thanks,
Larry
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: How to write marker info in MMIO trace from kernel
2010-05-04 18:36 How to write marker info in MMIO trace from kernel Larry Finger
@ 2010-05-04 18:42 ` Steven Rostedt
2010-05-04 22:27 ` Larry Finger
0 siblings, 1 reply; 5+ messages in thread
From: Steven Rostedt @ 2010-05-04 18:42 UTC (permalink / raw)
To: Larry Finger; +Cc: LKML
On Tue, 2010-05-04 at 13:36 -0500, Larry Finger wrote:
> Stephen,
>
> I hope you are the correct person for this question.
>
> I would like to write information into the MMIO trace file similar to
> what the user space write to /sys/.../trace_marker would accomplish,
> however, I want to do it in place of printk statements in the driver I'm
> tracing. Do you have any suggestions on how to do this? I have tools to
> merge the trace dump with dmesg output, but the latter lags behind and I
> do not get good correlation.
You can use "trace_printk()". I think that is what you are looking for.
-- Steve
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: How to write marker info in MMIO trace from kernel
2010-05-04 18:42 ` Steven Rostedt
@ 2010-05-04 22:27 ` Larry Finger
2010-05-04 22:58 ` Steven Rostedt
0 siblings, 1 reply; 5+ messages in thread
From: Larry Finger @ 2010-05-04 22:27 UTC (permalink / raw)
To: rostedt; +Cc: LKML
On 05/04/2010 01:42 PM, Steven Rostedt wrote:
> On Tue, 2010-05-04 at 13:36 -0500, Larry Finger wrote:
>> Stephen,
>>
>> I hope you are the correct person for this question.
>>
>> I would like to write information into the MMIO trace file similar to
>> what the user space write to /sys/.../trace_marker would accomplish,
>> however, I want to do it in place of printk statements in the driver I'm
>> tracing. Do you have any suggestions on how to do this? I have tools to
>> merge the trace dump with dmesg output, but the latter lags behind and I
>> do not get good correlation.
>
> You can use "trace_printk()". I think that is what you are looking for.
Thanks for the info. One other question - when I write only mmiotrace to
the current_tracer, the trace_printk() stuff does not end up in the
buffer. I can get it by using the "sysprof" tracer, but that has a lot
of stuff I do not want. Did I miss some configuration? My list of
available tracers is "blk kmemtrace mmiotrace wakeup_rt wakeup function
sysprof sched_switch nop".
Thanks,
Larry
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: How to write marker info in MMIO trace from kernel
2010-05-04 22:27 ` Larry Finger
@ 2010-05-04 22:58 ` Steven Rostedt
2010-05-05 0:33 ` Larry Finger
0 siblings, 1 reply; 5+ messages in thread
From: Steven Rostedt @ 2010-05-04 22:58 UTC (permalink / raw)
To: Larry Finger; +Cc: LKML
On Tue, 2010-05-04 at 17:27 -0500, Larry Finger wrote:
> Thanks for the info. One other question - when I write only mmiotrace to
> the current_tracer, the trace_printk() stuff does not end up in the
> buffer. I can get it by using the "sysprof" tracer, but that has a lot
> of stuff I do not want. Did I miss some configuration? My list of
> available tracers is "blk kmemtrace mmiotrace wakeup_rt wakeup function
> sysprof sched_switch nop".
Ug, that's because the mmiotrace handles its own prints and ignores
anything it does not know about. Here, try this patch:
-- Steve
diff --git a/kernel/trace/trace_mmiotrace.c b/kernel/trace/trace_mmiotrace.c
index 017fa37..8652f28 100644
--- a/kernel/trace/trace_mmiotrace.c
+++ b/kernel/trace/trace_mmiotrace.c
@@ -282,7 +282,7 @@ static enum print_line_t mmio_print_line(struct trace_iterator *iter)
case TRACE_PRINT:
return mmio_print_mark(iter);
default:
- return TRACE_TYPE_HANDLED; /* ignore unknown entries */
+ return TRACE_TYPE_UNHANDLED;
}
}
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: How to write marker info in MMIO trace from kernel
2010-05-04 22:58 ` Steven Rostedt
@ 2010-05-05 0:33 ` Larry Finger
0 siblings, 0 replies; 5+ messages in thread
From: Larry Finger @ 2010-05-05 0:33 UTC (permalink / raw)
To: rostedt; +Cc: LKML
On 05/04/2010 05:58 PM, Steven Rostedt wrote:
> On Tue, 2010-05-04 at 17:27 -0500, Larry Finger wrote:
>
>> Thanks for the info. One other question - when I write only mmiotrace to
>> the current_tracer, the trace_printk() stuff does not end up in the
>> buffer. I can get it by using the "sysprof" tracer, but that has a lot
>> of stuff I do not want. Did I miss some configuration? My list of
>> available tracers is "blk kmemtrace mmiotrace wakeup_rt wakeup function
>> sysprof sched_switch nop".
>
> Ug, that's because the mmiotrace handles its own prints and ignores
> anything it does not know about. Here, try this patch:
>
> -- Steve
>
> diff --git a/kernel/trace/trace_mmiotrace.c b/kernel/trace/trace_mmiotrace.c
> index 017fa37..8652f28 100644
> --- a/kernel/trace/trace_mmiotrace.c
> +++ b/kernel/trace/trace_mmiotrace.c
> @@ -282,7 +282,7 @@ static enum print_line_t mmio_print_line(struct trace_iterator *iter)
> case TRACE_PRINT:
> return mmio_print_mark(iter);
> default:
> - return TRACE_TYPE_HANDLED; /* ignore unknown entries */
> + return TRACE_TYPE_UNHANDLED;
> }
> }
That did the trick.
Thanks a lot,
Larry
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2010-05-05 0:33 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-05-04 18:36 How to write marker info in MMIO trace from kernel Larry Finger
2010-05-04 18:42 ` Steven Rostedt
2010-05-04 22:27 ` Larry Finger
2010-05-04 22:58 ` Steven Rostedt
2010-05-05 0:33 ` Larry Finger
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox