<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>codemonkey.org.uk &#187; fastboot</title>
	<atom:link href="http://www.codemonkey.org.uk/tag/fastboot/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.codemonkey.org.uk</link>
	<description>Dave Jones' Linux &#38; opensource stuff.</description>
	<lastBuildDate>Sat, 03 Jul 2010 23:33:15 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Boot tracing.</title>
		<link>http://www.codemonkey.org.uk/2008/12/25/boot-tracing/</link>
		<comments>http://www.codemonkey.org.uk/2008/12/25/boot-tracing/#comments</comments>
		<pubDate>Fri, 26 Dec 2008 03:28:09 +0000</pubDate>
		<dc:creator>davej</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[early-init]]></category>
		<category><![CDATA[fastboot]]></category>
		<category><![CDATA[kernel]]></category>

		<guid isPermaLink="false">http://www.codemonkey.org.uk/?p=21</guid>
		<description><![CDATA[I&#8217;m on vacation, but I can&#8217;t resist playing with new toys, seeing as Santa didn&#8217;t bring me anything fun this year. In my previous post, I mentioned that 2.6.28 was for the most part, dull. Reading the excellent changelog summary at kernelnewbies, I noticed a new feature I had until now overlooked. 1.6. Boot tracer [...]<p><a href="http://www.codemonkey.org.uk/2008/12/25/boot-tracing/">Boot tracing.</a> is a post from: <a href="http://www.codemonkey.org.uk">codemonkey.org.uk</a></p>



Related posts:<ol><li><a href='http://www.codemonkey.org.uk/2009/09/16/bootinit-miniconf-plumbers-week/' rel='bookmark' title='Permanent Link: boot/init miniconf at plumbers next week.'>boot/init miniconf at plumbers next week.</a> <small>I&#8217;m MC&#8217;ing the boot/init miniconf next week at the Linux...</small></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m on vacation, but I can&#8217;t resist playing with new toys, seeing as Santa didn&#8217;t bring me anything fun this year. In <a href="http://www.codemonkey.org.uk/2008/12/24/linux-kernel-2628/">my previous post</a>, I mentioned that 2.6.28 was for the most part, dull.  Reading the <a href="http://kernelnewbies.org/Linux_2_6_28">excellent changelog summary at kernelnewbies</a>, I noticed a new feature I had until now overlooked.</p>
<blockquote><p>1.6. Boot tracer</p>
<p>The purpose of this tracer is to helps developers to optimize boot times: it records the timings of the initcalls. Its aim is to be parsed by the scripts/bootgraph.pl tool to produce graphics about boot inefficiencies, giving a visual representation of the delays during initcalls. Users need to enable CONFIG_BOOT_TRACER, boot with the &#8220;initcall_debug&#8221; and &#8220;printk.time=1&#8243; parameters, and run &#8220;dmesg | perl scripts/bootgraph.pl > output.svg&#8221; to generate the final data.</p></blockquote>
<p>Very interesting.</p>
<p>Here&#8217;s what it looks like when I ran it on my eeepc ..</p>
<p><a href="http://www.codemonkey.org.uk/wp-content/uploads/2008/12/bootprofile.png"><br />
<div id="attachment_25" class="wp-caption aligncenter" style="width: 310px"><img src="http://www.codemonkey.org.uk/wp-content/uploads/2008/12/bootprofile-300x133.png" alt="boot tracing output. (click to enlarge)" title="boot tracing output." width="300" height="133" class="size-medium wp-image-25" /><p class="wp-caption-text">boot tracing output.</p></div></a></p>
<p>Looks pretty. Though something isn&#8217;t quite right.<br />
If you look at <a href="/projects/eeepc/eeepc.dmesg">the dmesg output</a>, there are over 400 initcalls.  Even if we ignore all the uninteresting ones that return in 0 usecs, there&#8217;s still over 300 in the log.  What gives?<br />
The script stops parsing once the kernel hands off to the early userspace scripts in initramfs.  So everything from the &#8216;Write protecting the kernel&#8217; message at 8 seconds into the bootup is ignored. (Sidenote: The fact that we&#8217;re taking 8 seconds just to get to this stage _sucks_, more on that another time).  So all the later modules that get loaded aren&#8217;t part of this picture.</p>
<p>My perl is a little rusty so I didn&#8217;t spot how it does it, but it seems there&#8217;s a threshold at which it ignores the initcalls that return quickly. Of those reported in the graph, the &#8216;fastest&#8217; was ehci_hcd_init at 126837.  acpi_init was almost in the same ballpark at 106445, but didn&#8217;t get picked up.</p>
<p>Whilst these big hitters are no doubt damaging to the boot time, it&#8217;s important to note the cumulative effect of all those five-figure initcalls.</p>
<p><a href="http://www.codemonkey.org.uk/2008/12/25/boot-tracing/">Boot tracing.</a> is a post from: <a href="http://www.codemonkey.org.uk">codemonkey.org.uk</a></p>


<p>Related posts:<ol><li><a href='http://www.codemonkey.org.uk/2009/09/16/bootinit-miniconf-plumbers-week/' rel='bookmark' title='Permanent Link: boot/init miniconf at plumbers next week.'>boot/init miniconf at plumbers next week.</a> <small>I&#8217;m MC&#8217;ing the boot/init miniconf next week at the Linux...</small></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.codemonkey.org.uk/2008/12/25/boot-tracing/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
