[systemd-devel] Patch to show systemd & generators

Lennart Poettering lennart at poettering.net
Mon Jun 10 03:38:31 PDT 2013


On Fri, 07.06.13 21:31, Thomas H.P. Andersen (phomes at gmail.com) wrote:

> 
> On Thu, Jun 6, 2013 at 11:10 AM, Lennart Poettering
> <lennart at poettering.net> wrote:
> > On Tue, 14.05.13 08:59, Thomas H.P. Andersen (phomes at gmail.com) wrote:
> >
> >> >> Would you be interested in a patch that shows "Systemd + Generators" or
> >> >> maybe only "Generators"?
> >> >
> >> > Well, I guess it makes sense to show how much time is spent in the
> >> > generators and how much time is spent in systemd's own unit file loading
> >> > (especially given that the latter isn't particularly optimized yet...)
> >> I was looking for the relevant code parts for this. Is this basically
> >> what is done in manager_enumerate?
> >
> > Well, it's more complicated than that. manager_enumerate() will find
> > discover all units that encapsulate pre-existing objects. But this does
> > not include the units from the initial transaction. I guess we need to
> > time both manager_startup() and the manager_add_job() for the initial
> > transaction.
> 
> Okay, then the current way of color coding a part of the bar will not
> work. Unless we don't mind two parts with the same color?
> 
> Just to be sure. By "the initial transaction" do you mean the default
> target loading in the "if (queue_default_job) { ... }"  block in
> main.c?

Yeah, pretty much. That's where we actually already do some perfomance
measurment. Look for the before_startup/after_startup variables. (Though
they are more broad, and only written to logs, not exposed via the bus).

Lennart

-- 
Lennart Poettering - Red Hat, Inc.


More information about the systemd-devel mailing list