[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20100412233332.GH8285@nowhere>
Date: Tue, 13 Apr 2010 01:33:37 +0200
From: Frederic Weisbecker <fweisbec@...il.com>
To: Jiri Olsa <jolsa@...hat.com>
Cc: mingo@...e.hu, rostedt@...dmis.org, linux-kernel@...r.kernel.org
Subject: Re: [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!
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists