xrmx / bootchart

merge of bootchart-collector and pybootchartgui
GNU General Public License v2.0
233 stars 88 forks source link

Investigate bootchartd poking with arguments #27

Open xrmx opened 13 years ago

xrmx commented 13 years ago

130d775e230636f2e15cd7f766bec7a84d6b2461 introduced reading the value of bootchart_init from an environment variable. Since this is a lot cleaner that looping on arguments i think we should investigate if the old code may be safely removed.

This is an excerpt of his findings:

bootparam(7) says that all parameters interpreted by the kernel are stripped. That means, init=blah never makes it to bootchartd. Unless using an initrd (which I am not) somehow depends on it, I think the entire for-loop can go without checking $init at all.

This is also what I observe (now on Linux 3.0-rc1 :-)). The exact (perhaps not very exciting) details follow. My kernel command line is:

root=/dev/sda3 ro init=/sbin/bootchartd resume=/dev/sda2 initcall_debug printk.time=y bootchart_init=/bin/systemd

Bootchartd has the following environment variables set (by calling "env" just before checking for $bootchart_init):

TERM=linux PWD=/ bootchart_init=/bin/systemd SHLVL=1 HOME=/ BOOTIMAGE=/vmlinuz-3.0.0-rc1 =/bin/env

And $@ is empty.