Re: [PATCH 0/5] perf kmem: Add more functions and show more statistics

Arjan van de Ven
2009-11-24T14:56:08Z

On Tue, 24 Nov 2009 09:34:23 +0100
Ingo Molnar <mingo@elte.hu> wrote:
> > It would be great if perf can be used for boot time tracing. This
> > needs pretty big work on kernel side.
>
> What would be needed is to open per cpu events right after perf
> events initializes, and allocate memory for output buffers to them.
>
> They would round-robin after that point, and we could use
> perf_event_open() (with a special flag) to 'attach' to them and
> mmap() them - at which point they'd turn into regular objects with a
> lot of boot time data in them.

I'm not too worried about this btw;
we can start the userland trace early enough in the boot (the kernel is
done after 0.6 seconds after all) to capture the relevant stuff.
The actual kernel mostly gets captured with scripts/bootgraph.pl
already.

Yes it would be nice to do a timechart earlier, but if it's extremely
hard...
Also unless it starts before the drivers (eg the normal driver
initcall level), it is not useful.