We can't optimize the strcspn(t, WHITESPACE); to a strchr(t, '\n') - t; because of the " kB" that meminfo and a few other places have, that we want to drop.
get_status_field() has to be run every time we log a message, and I am starting to not like this function at all. I think we should go back to having it hand-rolled in get_process_capeff(), at least for that one in the hot-path. patch coming... On Tue, Sep 17, 2013 at 4:39 PM, Zbigniew Jędrzejewski-Szmek < zbys...@in.waw.pl> wrote: > On Tue, Sep 17, 2013 at 03:48:46PM -0700, Shawn Landden wrote: > > 69ab80881552d5f79ca95f6b3be48ad122ab1ec2 tried to unify > > parsing of status files, but removed the logic of skipping > > extra '0's when getting the effective capabilities. Restore > > that logic. > Oh, I removed the logic on purpose, because I didn't know what > it was for. I applied a different fix now, which is a bit hacky, > but simplifies our hot path a bit. I've also added some comments > to make it clearer why 0's are skipped. > > Zbyszek > _______________________________________________ > systemd-devel mailing list > systemd-devel@lists.freedesktop.org > http://lists.freedesktop.org/mailman/listinfo/systemd-devel >
_______________________________________________ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel