Re: [PATCH 4/5] tracing/fastboot: Add a time field on the sched_switchentry

From: Steven Rostedt
Date: Sat Oct 11 2008 - 19:50:46 EST



On Sat, 11 Oct 2008, Fr?d?ric Weisbecker wrote:

> 2008/10/11 Steven Rostedt <rostedt@xxxxxxxxxxx>:
> >> +
> >> +static enum print_line_t boot_trace_print_line(struct trace_iterator *iter)
> >> +{
> >> + struct trace_entry *entry = iter->ent;
> >> +
> >> + if (entry->type == TRACE_BOOT)
> >> + return initcall_print_line(iter);
> >> + if (entry->type == TRACE_CTX || entry->type == TRACE_WAKE)
> >> + return sched_switch_print_line(iter);
> >> return TRACE_TYPE_UNHANDLED;
> >> }
> >>
> >> @@ -100,7 +159,7 @@ struct tracer boot_tracer __read_mostly =
> >> .init = boot_trace_init,
> >> .reset = reset_boot_trace,
> >> .ctrl_update = boot_trace_ctrl_update,
> >> - .print_line = initcall_print_line,
> >> + .print_line = boot_trace_print_line,
> >> };
> >>
> >> void trace_boot(struct boot_trace *it, initcall_t fn)
> >>
> >>
> >
>
> Yes but this one doesn't seem to start at zero at the boot time.
> There is a big difference between those two ...

Even so, I disagree having the context switch tracer hold another 8 byte
timestamp. If you want to add something to the boot tracer, than fine.
But not to something that other tracers use.

You can tap into the context switch trace_point too, and have that record
a special trace entry for you instead.

-- Steve

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/