lkml.org 
[lkml]   [2010]   [Apr]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCHv6 3/4] tracing: graph output support for irqsoff tracer
On Fri, Apr 02, 2010 at 07:01:22PM +0200, Jiri Olsa wrote:
> +#define GRAPH_TRACER_FLAGS (TRACE_GRAPH_PRINT_CPU | \
> + TRACE_GRAPH_PRINT_PROC)
> +
> +static enum print_line_t irqsoff_print_line(struct trace_iterator *iter)
> +{
> + u32 flags = GRAPH_TRACER_FLAGS;
> +
> + if (trace_flags & TRACE_ITER_LATENCY_FMT)
> + flags |= TRACE_GRAPH_PRINT_DURATION;
> + else
> + flags |= TRACE_GRAPH_PRINT_ABS_TIME;



Why not having ABS_TIME in any case?

And more important, you probably want to add TRACE_ITER_LATENCY_FMT
as well to get the contexts (need-resched, hardirq/softirq, preempt-depth,
lock-depth)



> + /*
> + * In graph mode call the graph tracer output function,
> + * otherwise go with the TRACE_FN event handler
> + */
> + if (is_graph())
> + return print_graph_function_flags(iter, flags);
> +
> + return TRACE_TYPE_UNHANDLED;
> +}
> +
> +static void irqsoff_print_header(struct seq_file *s)
> +{
> + if (is_graph()) {
> + struct trace_iterator *iter = s->private;
> + u32 flags = GRAPH_TRACER_FLAGS;
> +
> + if (trace_flags & TRACE_ITER_LATENCY_FMT) {
> + /* print nothing if the buffers are empty */
> + if (trace_empty(iter))
> + return;
> +
> + print_trace_header(s, iter);
> + flags |= TRACE_GRAPH_PRINT_DURATION;
> + } else
> + flags |= TRACE_GRAPH_PRINT_ABS_TIME;
> +
> + print_graph_headers_flags(s, flags);



Same here.


Other than these few comments, the whole set looks good!

Thanks!



\
 
 \ /
  Last update: 2010-04-13 01:35    [W:0.129 / U:0.232 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site