<?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>Taras' Blog</title>
	<atom:link href="http://blog.mozilla.com/tglek/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.mozilla.com/tglek</link>
	<description>Just another Blog.mozilla.com weblog</description>
	<lastBuildDate>Sat, 07 Nov 2009 01:46:24 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>FSOSS &amp; Dehydra Update</title>
		<link>http://blog.mozilla.com/tglek/2009/11/06/fsoss-dehydra-update/</link>
		<comments>http://blog.mozilla.com/tglek/2009/11/06/fsoss-dehydra-update/#comments</comments>
		<pubDate>Sat, 07 Nov 2009 01:27:53 +0000</pubDate>
		<dc:creator>tglek</dc:creator>
				<category><![CDATA[dehydra]]></category>

		<guid isPermaLink="false">http://blog.mozilla.com/tglek/?p=196</guid>
		<description><![CDATA[Last week I was in Canada to present at FSOSS with David Humphrey on awesome Mozilla Tools: Dehydra, DXR, Pork, etc. I think we managed to convey the message regarding what a sad affair that current developer development tools are.
General-Purpose Dehydra Scripts
Dehydra grew out of Mozilla&#8217;s constant need to figure out what is going on [...]]]></description>
			<content:encoded><![CDATA[<p>Last week I was in Canada to present at <a href="http://fsoss.senecac.on.ca/2009/">FSOSS</a> with <a href="http://vocamus.net/dave/">David Humphrey</a> on awesome Mozilla Tools: Dehydra, DXR, Pork, etc. I think we managed to convey the message regarding what a sad affair that current developer development tools are.</p>
<p><strong>General-Purpose Dehydra Scripts</strong></p>
<p>Dehydra grew out of Mozilla&#8217;s constant need to figure out what is going on in the source code. As a result most of our scripts are very Mozilla API-specific. This makes harder for people outside of Mozilla to learn Dehydra. There is no library of Dehydra code that one can just plugin to start analyzing their codebase. Instead one has to sit down, figure out what Dehydra is capable of and then see if any of the problems facing the developer can be solved this way. If anyone wants to contribute such a library, let me know.</p>
<p>In the meantime, more general-purpose analyses are surfacing.</p>
<p><b>Shadowed Members</b></p>
<p>My favourite script so far is the member-shadowing checker. I ran into a member-shadowing warning that is unique to Sun&#8217;s C++ compiler. It was triggered by some code that I just landed on the tree. I fixed the warning, but within a few days a coworker ran into a bug caused by that member shadowing(due to having an unlucky revision of the code). The following example shows how simple it was to implement the warning in GCC/Dehydra.</p>
<p><iframe src="http://people.mozilla.com/~tglek/shadow.html" width="95%" height="300"></iframe></p>
<p>See <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=522776">bug 522776</a> for the complete story on adding the member shadowing check to Mozilla.</p>
<p><b>Printf</b><br />
Another general purpose analysis was done outside of Mozilla by Philip Taylor for <a href="http://os.wildfiregames.com/">his game</a>. His <a href="http://svn.wildfiregames.com/public/ps/trunk/build/dehydra/printf-type-check.js">script</a> checks wide printf format strings (which are overlooked by gcc).<br />
Independently, Benjamin wrote a printf checker for Mozilla printf-like code, see <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=493996">bug 493996</a>.</p>
<p><b>Custom Sections in Object Files</b><br />
We have long speculated about how nice it would be if Dehydra could emit info into object files that could then be yanked out of the resulting binary (by say, valgrind). <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=523435">bug 523435</a> will soon make that a reality.</p>
<p><b>Update:</b><br />
<a href="http://www.flickr.com/photos/mhoye/4058902208/in/photostream/">Two</a> <a href="http://www.flickr.com/photos/mhoye/4058902456/sizes/l/in/photostream/">photos</a> from FSOSS.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.mozilla.com/tglek/2009/11/06/fsoss-dehydra-update/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Studying Library IO &#8211; SystemTap Style</title>
		<link>http://blog.mozilla.com/tglek/2009/10/23/studying-library-io-systemtap-style/</link>
		<comments>http://blog.mozilla.com/tglek/2009/10/23/studying-library-io-systemtap-style/#comments</comments>
		<pubDate>Sat, 24 Oct 2009 00:25:39 +0000</pubDate>
		<dc:creator>tglek</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blog.mozilla.com/tglek/?p=194</guid>
		<description><![CDATA[In my last blog post I expressed frustation with slowness induced by library IO. Then I went on a mission to measure it. I have been wanting to this for a while, but I figured that only DTrace can get this info without recompiling my kernel. So I tried to build Mozilla under Slowlaris (but [...]]]></description>
			<content:encoded><![CDATA[<p>In my last blog <a href="http://blog.mozilla.com/tglek/2009/10/20/large-apps-just-have-to-start-slow/">post</a> I expressed frustation with slowness induced by library IO. Then I went on a mission to measure it. I have been wanting to this for a while, but I figured that only DTrace can get this info without recompiling my kernel. So I tried to build Mozilla under Slowlaris (but the linker got up to 3GB and then set there swapping, ensuring that the nickname is justified). Then I fired up DTrace on the mini, but ran screaming because it seemed like fbt DTrace provider refused to let me dereference structs (later Joel told me that I&#8217;m supposed to copy data explicitly <a href="http://blogs.sun.com/timf/entry/dtrace_saves_the_day_again">like here</a>).</p>
<p>But while googling for a fbt workaround, I stumbled upon a DTrace/SystemTap comparision wiki. <a href="http://sourceware.org/systemtap/wiki">SystemTap</a>? The DTrace knockoff I have been hearing about? It works? This was a lightbulb moment where I realized that  Linux was about to provide me with more information than I thought was possible.</p>
<p>So here is the data I got out of it:</p>
<p><span id="more-194"></span>Writing scripts in systemtap felt really natural after I figured out that pointers are to be dereferenced as arrays and what some of the error messages really meant. In the script I watch vfs_read() for io done via read() syscall, but it turns out that mmap() io actually happens via readahead. Here is the systemtap <a href="http://people.mozilla.com/~tglek/kernelio.stp">script</a>. I believe I accounted for all io. ext4_get_block (which seems to be the main function ext4 reads file data with) did not spend any time outside of that called by the functions I was tapping into.</p>
<p>I haven&#8217;t had much time to draw too many conclusions out of the data, posting it as an example of systemtap use. libxul accounts for most io both in terms of bytes and time spent. We&#8217;ll be fixing that, not yet sure as to what strategy to employ for the rest of the libraries.</p>
<p>SELECT file, sum(size) as bytesread, sum(time)/1000 as ms from startup  group by file order by bytesread desc ;</p>
<pre>file                                   | bytesread | ms
-------------------------------------------------------------------------+-----------+-----
/home/taras/firefox/libxul.so/                                          |  19530240 | 103
/usr/lib/libgtk-x11-2.0.so.0.1800.2/                                    |   3277312 |  15
/home/taras/firefox/chrome/toolkit.jar/                                 |   2097152 |   8
/home/taras/firefox/libmozjs.so/                                        |   1835520 |  36
/home/taras/.mozilla/firefox/imph4tsg.default/XPC.mfasl/                |   1671168 |   3
/home/taras/firefox/chrome/browser.jar/                                 |   1572864 |   5
/usr/share/icons/gnome/icon-theme.cache/                                |   1441792 |   7
/home/taras/firefox/libnss3.so/                                         |   1311232 |  18
/usr/lib/libX11.so.6.3.0/                                               |   1049088 |   5
/home/taras/.mozilla/firefox/imph4tsg.default/XUL.mfasl/                |    995328 |   2
/usr/lib/libgnomeui-2.so.0.2400.1/                                      |    918016 |   3
/usr/lib/libfreetype.so.6.3.20/                                         |    786944 |   3
/home/taras/firefox/libsqlite3.so/                                      |    655872 |  10
/usr/lib/libgconf-2.so.4.1.5/                                           |    655872 |   1
/usr/lib/libbonoboui-2.so.0.0.0/                                        |    655872 |   2
/usr/lib/libgdk-x11-2.0.so.0.1800.2/                                    |    655872 |   2
/usr/lib/libcrypto.so.1.0.0/                                            |    655872 |   2
/home/taras/firefox/chrome/en-US.jar/                                   |    655360 |   2
/usr/lib/libORBit-2.so.0.1.0/                                           |    524800 |   2
/lib/libasound.so.2.0.0/                                                |    524800 |  18
/home/taras/firefox/libnspr4.so/                                        |    524800 |  17
/usr/lib/libxml2.so.2.7.5/                                              |    524800 |   1
/usr/lib/libbonobo-activation.so.4.0.0/                                 |    524800 |   1
/usr/lib/libgnomecanvas-2.so.0.2600.0/                                  |    524800 |   1
/usr/lib/libXt.so.6.0.0/                                                |    524800 |  14
/lib/libgssapi_krb5.so.2.2/                                             |    524800 |   1
/usr/lib/libatk-1.0.so.0.2809.1/                                        |    524800 |   2
/home/taras/firefox/libnssckbi.so/                                      |    524800 |   6
/usr/lib/libbonobo-2.so.0.0.0/                                          |    524800 |   1
/usr/lib/libgnomevfs-2.so.0.2400.2/                                     |    524800 |   2
/home/taras/firefox/libsmime3.so/                                       |    393728 |  15
/usr/lib/libart_lgpl_2.so.2.3.20/                                       |    393728 |   1
/usr/lib/libvorbis.so.0.4.3/                                            |    393728 |   1
/home/taras/firefox/components/libbrowsercomps.so/                      |    393728 |  12
/lib/libresolv-2.10.90.so/                                              |    393728 |   0
/home/taras/firefox/libnssdbm3.so/                                      |    393728 |  15
/home/taras/firefox/libfreebl3.so/                                      |    393728 |  13
/home/taras/firefox/libssl3.so/                                         |    393728 |   8
/usr/lib/libssl.so.1.0.0/                                               |    393728 |   1
/lib/libkrb5.so.3.3/                                                    |    393728 |  24
/lib/libglib-2.0.so.0.2200.2/                                           |    393728 |   1
/usr/share/fonts/dejavu/DejaVuSans.ttf/                                 |    393216 |   1
/home/taras/firefox/components/browser.xpt/                             |    378141 |   6
/usr/lib/gtk-2.0/2.10.0/engines/libclearlooks.so/                       |    262656 |   1
/lib/libexpat.so.1.5.2/                                                 |    262656 |   1
/usr/lib/libfontconfig.so.1.4.3/                                        |    262656 |   0
/home/taras/firefox/components/libimgicon.so/                           |    262656 |   1
/lib/libkeyutils-1.2.so/                                                |    262656 |   0
/usr/lib/libgnome-keyring.so.0.1.1/                                     |    262656 |   1
/usr/lib/libgnome-2.so.0.2800.0/                                        |    262656 |   0
/usr/lib/libXau.so.6.0.0/                                               |    262656 |   0
/usr/lib/libXinerama.so.1.0.0/                                          |    262656 |   0
/usr/lib/libXdamage.so.1.1.0/                                           |    262656 |   0
/usr/lib/libXcomposite.so.1.0.0/                                        |    262656 |   0
/usr/lib/libfam.so.0.0.0/                                               |    262656 |  22
/home/taras/firefox/components/libdbusservice.so/                       |    262656 |  12
/home/taras/firefox/components/libmozgnome.so/                          |    262656 |  11
/usr/lib/libICE.so.6.3.0/                                               |    262656 |   1
/home/taras/firefox/libnssutil3.so/                                     |    262656 |  22
/usr/lib/libpangoft2-1.0.so.0.2600.0/                                   |    262656 |   0
/lib/libk5crypto.so.3.1/                                                |    262656 |   1
/home/taras/firefox/components/libbrowserdirprovider.so/                |    262656 |   9
/home/taras/firefox/libsoftokn3.so/                                     |    262656 |  10
/usr/lib/libxcb.so.1.1.0/                                               |    262656 |   1
/home/taras/firefox/components/libnkgnomevfs.so/                        |    262656 |  14
/home/taras/firefox/firefox-bin/                                        |    262547 |  13
/usr/share/fonts/dejavu/DejaVuSerif.ttf/                                |    262144 |   0
/home/taras/.mozilla/firefox/imph4tsg.default/compreg.dat/              |    147563 |   0
/usr/share/X11/locale/locale.alias/                                     |    134322 |  18
/lib/libc-2.10.90.so/                                                   |    132608 |   1
/lib/libtinfo.so.5.7/                                                   |    132096 |   0
/usr/lib/gio/modules/libgioremote-volume-monitor.so/                    |    131584 |   0
/lib/libuuid.so.1.3.0/                                                  |    131584 |   0
/usr/lib/libvorbisfile.so.3.3.2/                                        |    131584 |   0
/lib/libkrb5support.so.0.1/                                             |    131584 |   0
/usr/lib/libgvfscommon.so.0.0.0/                                        |    131584 |   0
/lib/librt-2.10.90.so/                                                  |    131584 |   0
/usr/lib/libavahi-common.so.3.5.1/                                      |    131584 |   0
/usr/lib/libnotify.so.1.1.3/                                            |    131584 |   0
/usr/lib/libavahi-glib.so.1.0.1/                                        |    131584 |   0
/usr/lib/gio/modules/libgvfsdbus.so/                                    |    131584 |   0
/usr/lib/libXcursor.so.1.0.2/                                           |    131584 |   0
/usr/lib/libXi.so.6.1.0/                                                |    131584 |   3
/usr/lib/libgailutil.so.18.0.1/                                         |    131584 |   0
/usr/lib/libXrender.so.1.3.0/                                           |    131584 |   0
/lib/libcap-ng.so.0.0.0/                                                |    131584 |   0
/usr/lib/libSM.so.6.0.0/                                                |    131584 |   0
/lib/libudev.so.0.4.2/                                                  |    131584 |   0
/lib/libgmodule-2.0.so.0.2200.2/                                        |    131584 |   0
/usr/lib/libXfixes.so.3.1.0/                                            |    131584 |   0
/lib/libgobject-2.0.so.0.2200.2/                                        |    131584 |   0
/usr/lib/libXrandr.so.2.2.0/                                            |    131584 |   1
/lib/libgio-2.0.so.0.2200.2/                                            |    131584 |   1
/lib/libpopt.so.0.0.0/                                                  |    131584 |   0
/lib/libz.so.1.2.3/                                                     |    131584 |   0
/usr/lib/libXext.so.6.4.0/                                              |    131584 |   0
/usr/lib/libpangocairo-1.0.so.0.2600.0/                                 |    131584 |   0
/usr/lib/libogg.so.0.6.0/                                               |    131584 |   0
/usr/lib/libcairo.so.2.10800.8/                                         |    131584 |   0
/usr/lib/libavahi-client.so.3.2.5/                                      |    131584 |   1
/usr/lib/libtdb.so.1.1.5/                                               |    131584 |   0
/usr/lib/libORBitCosNaming-2.so.0.1.0/                                  |    131584 |   0
/usr/lib/libstdc++.so.6.0.13/                                           |    131584 |   1
/lib/libgthread-2.0.so.0.2200.2/                                        |    131584 |   0
/lib/libgcc_s-4.4.1-20091008.so.1/                                      |    131584 |   0
/lib/libdbus-1.so.3.4.0/                                                |    131584 |   0
/usr/lib/libcanberra-gtk.so.0.1.4/                                      |    131584 |   0
/usr/lib/libpango-1.0.so.0.2600.0/                                      |    131584 |   0
/usr/lib/libpng12.so.0.39.0/                                            |    131584 |   0
/usr/lib/libltdl.so.7.2.0/                                              |    131584 |   0
/usr/lib/gtk-2.0/modules/libcanberra-gtk-module.so/                     |    131584 |   0
/lib/libnss_files-2.10.90.so/                                           |    131584 |   0
/lib/libcom_err.so.2.1/                                                 |    131584 |   0
/usr/lib/libcanberra.so.0.2.1/                                          |    131584 |   0
/usr/lib/libdbus-glib-1.so.2.1.0/                                       |    131584 |   0
/usr/lib/gtk-2.0/modules/libpk-gtk-module.so/                           |    131584 |   0
/usr/lib/libpixman-1.so.0.16.2/                                         |    131584 |   0
/usr/lib/libgdk_pixbuf-2.0.so.0.1800.2/                                 |    131584 |   0
/home/taras/.fontconfig/3830d5c3ddfd5cd38a049b759396e72e-x86.cache-2/   |    131072 |   0
/usr/lib/gconv/gconv-modules.cache/                                     |    131072 |   0
/home/taras/.mozilla/firefox/imph4tsg.default/xpti.dat/                 |    101060 |  14
/home/taras/firefox/greprefs.js/                                        |     74132 |  12
/home/taras/.mozilla/firefox/imph4tsg.default/urlclassifier3.sqlite/    |     65832 |  85
/home/taras/.mozilla/firefox/imph4tsg.default/places.sqlite/            |     53396 |  43
/home/taras/firefox/defaults/pref/firefox.js/                           |     40803 |  17
/usr/lib/gio/modules/libgiofam.so/                                      |     33280 |  13
/usr/lib/gio/modules/libgiogconf.so/                                    |     33280 |  13
/home/taras/firefox/libxpcom.so/                                        |     33280 |  13
/usr/lib/gconv/UTF-16.so/                                               |     33280 |  16
/usr/lib/libXss.so.1.0.0/                                               |     33280 |  14
/home/taras/firefox/libplc4.so/                                         |     33280 |   5
/home/taras/firefox/libplds4.so/                                        |     33280 |   0
/usr/share/X11/locale/locale.dir/                                       |     32768 |  16
/home/taras/firefox/run-mozilla.sh/                                     |     27368 |  12
/usr/share/icons/hicolor/index.theme/                                   |     24293 |  25
/home/taras/firefox/chrome/icons/default/default48.png/                 |     22164 |   1
/home/taras/.mozilla/firefox/imph4tsg.default/cert8.db/                 |     16644 |  13
/usr/share/icons/gnome/index.theme/                                     |     12657 |  41
/home/taras/firefox/chrome/icons/default/default32.png/                 |     11964 |   1
/home/taras/.mozilla/firefox/imph4tsg.default/search.json/              |     11392 |  14
/usr/share/themes/Clearlooks/gtk-2.0/gtkrc/                             |     11287 |  18
/etc/fonts/conf.avail/65-fonts-persian.conf/                            |      9880 |   1
/dev/urandom/                                                           |      8468 |   4
/home/taras/.mozilla/firefox/imph4tsg.default/secmod.db/                |      8452 |   1
/usr/share/icons/Bluecurve/cursors/xterm/                               |      8192 |  12
/usr/share/icons/Bluecurve/cursors/bottom_right_corner/                 |      8192 |   7
/etc/fonts/conf.avail/65-nonlatin.conf/                                 |      7706 |   0
/home/taras/firefox/firefox/                                            |      7695 |   0
/etc/fonts/fonts.conf/                                                  |      5325 |  17
/usr/share/locale/locale.alias/                                         |      5024 |   8
/usr/share/icons/Mist/index.theme/                                      |      4771 |   7
/home/taras/.mozilla/firefox/imph4tsg.default/key3.db/                  |      4356 |   1
/home/taras/firefox/chrome/icons/default/default16.png/                 |      4332 |  21
/usr/share/X11/locale/en_US.UTF-8/XLC_LOCALE/                           |      4287 |  12
/proc/meminfo/                                                          |      4096 |   0
/etc/fonts/conf.avail/30-metric-aliases.conf/                           |      3939 |   0
/etc/passwd/                                                            |      3766 |   0
/etc/gtk-2.0/i386-redhat-linux-gnu/gdk-pixbuf.loaders/                  |      3618 |  16
/etc/pango/i386-redhat-linux-gnu/pango.modules/                         |      3452 |  16
/home/taras/.mozilla/firefox/imph4tsg.default/content-prefs.sqlite/     |      3252 |   8
/etc/fonts/conf.avail/25-unhint-nonlatin.conf/                          |      2941 |  12
/etc/localtime/                                                         |      2899 |   0
/home/taras/.mozilla/firefox/imph4tsg.default/permissions.sqlite/       |      2228 |   3
/home/taras/.mozilla/firefox/imph4tsg.default/cookies.sqlite/           |      2212 |  15
/home/taras/firefox/application.ini/                                    |      2128 |  18
/etc/fonts/conf.avail/40-nonlatin.conf/                                 |      2069 |   0
/usr/share/fontconfig/conf.avail/57-dejavu-sans.conf/                   |      2011 |   0
/etc/fonts/conf.avail/45-latin.conf/                                    |      1837 |   0
/home/taras/.mozilla/firefox/imph4tsg.default/prefs.js/                 |      1827 |  29
/etc/nsswitch.conf/                                                     |      1734 |  20
/etc/fonts/conf.avail/60-latin.conf/                                    |      1701 |   0
/etc/fonts/conf.avail/90-synthetic.conf/                                |      1691 |   6
/usr/share/fontconfig/conf.avail/57-dejavu-serif.conf/                  |      1649 |   0
/lib/libdl-2.10.90.so/                                                  |      1536 |   0
/usr/share/fontconfig/conf.avail/57-dejavu-sans-mono.conf/              |      1509 |   1
/home/taras/firefox/chrome/toolkit.manifest/                            |      1418 |   8
/usr/share/fontconfig/conf.avail/65-google-droid-sans.conf/             |      1403 |   0
/home/taras/firefox/chrome/en-US.manifest/                              |      1251 |   0
/usr/share/fontconfig/conf.avail/25-ttf-arphic-uming-bitmaps.conf/      |      1221 |  10
/home/taras/firefox/defaults/pref/firefox-branding.js/                  |      1186 |  11
/etc/fonts/conf.avail/30-urw-aliases.conf/                              |      1164 |   0
/etc/fonts/conf.d/25-no-bitmap-fedora.conf/                             |      1160 |   0
/etc/fonts/conf.avail/20-unhint-small-vera.conf/                        |      1157 |   0
/home/taras/.mozilla/firefox/imph4tsg.default/formhistory.sqlite/       |      1156 |  14
/usr/share/icons/Fedora/index.theme/                                    |      1128 |  32
/usr/share/fontconfig/conf.avail/90-smc-fonts.conf/                     |      1094 |  15
/usr/share/fontconfig/conf.avail/41-ttf-arphic-uming.conf/              |      1043 |   0
/home/taras/firefox/chrome/browser.manifest/                            |       963 |   0
/usr/share/fontconfig/conf.avail/64-ttf-arphic-uming.conf/              |       951 |   0
/etc/fonts/conf.avail/20-fix-globaladvance.conf/                        |       912 |   0
/usr/share/fontconfig/conf.avail/20-unhint-small-dejavu-sans-mono.conf/ |       866 |  20
/home/taras/startup.html/                                               |       864 |  17
/usr/share/fontconfig/conf.avail/20-unhint-small-dejavu-serif.conf/     |       858 |   0
/usr/share/fontconfig/conf.avail/20-unhint-small-dejavu-sans.conf/      |       856 |   0
/home/taras/.mozilla/firefox/imph4tsg.default/localstore.rdf/           |       850 |  11
/home/taras/.mozilla/firefox/imph4tsg.default/sessionstore.js/          |       762 |  13
/usr/share/fontconfig/conf.avail/65-ipa-pgothic.conf/                   |       705 |   8
/lib/ld-2.10.90.so/                                                     |       704 |   0
/etc/fonts/conf.avail/69-unifont.conf/                                  |       672 |   0
/usr/share/fontconfig/conf.avail/75-ttf-arphic-ukai-select.conf/        |       611 |  22
/etc/gtk-2.0/i386-redhat-linux-gnu/gtk.immodules/                       |       598 |  11
/etc/fonts/conf.avail/49-sansserif.conf/                                |       545 |   0
/usr/share/fontconfig/conf.avail/90-ttf-arphic-uming-embolden.conf/     |       541 |  14
/usr/share/fontconfig/conf.avail/90-ttf-arphic-ukai-embolden.conf/      |       540 |   0
/lib/libselinux.so.1/                                                   |       512 |   0
/lib/libpthread-2.10.90.so/                                             |       512 |   0
/lib/libutil-2.10.90.so/                                                |       512 |   0
/lib/libm-2.10.90.so/                                                   |       512 |   0
/usr/share/fontconfig/conf.avail/66-lohit-kashmiri@devanagari.conf/     |       488 |   0
/usr/share/fontconfig/conf.avail/66-lohit-sindhi@devanagari.conf/       |       484 |   0
/usr/share/fontconfig/conf.avail/66-lohit-maithili.conf/                |       478 |   3
/usr/share/fontconfig/conf.avail/66-lohit-assamese.conf/                |       477 |  18
/usr/share/fontconfig/conf.avail/66-lohit-gujarati.conf/                |       477 |   9
/usr/share/fontconfig/conf.avail/66-lohit-konkani.conf/                 |       476 |  14
/usr/share/fontconfig/conf.avail/66-lohit-bengali.conf/                 |       475 |  15
/usr/share/fontconfig/conf.avail/66-lohit-marathi.conf/                 |       475 |   7
/usr/share/fontconfig/conf.avail/66-lohit-kannada.conf/                 |       475 |   0
/usr/share/fontconfig/conf.avail/66-lohit-punjabi.conf/                 |       475 |   0
/proc/cpuinfo/                                                          |       474 |   0
/usr/share/fontconfig/conf.avail/67-lohit-nepali.conf/                  |       473 |   0
/usr/share/fontconfig/conf.avail/66-lohit-telugu.conf/                  |       473 |   1
/usr/share/fontconfig/conf.avail/66-lohit-tamil.conf/                   |       471 |   0
/usr/share/fontconfig/conf.avail/66-lohit-hindi.conf/                   |       471 |   0
/usr/share/fontconfig/conf.avail/66-lohit-oriya.conf/                   |       471 |   0
/bin/bash/                                                              |       403 |   0
/usr/share/fontconfig/conf.avail/41-ttf-arphic-ukai.conf/               |       400 |   0
/etc/gnome-vfs-2.0/modules/default-modules.conf/                        |       399 |   6
/etc/fonts/conf.avail/80-delicious.conf/                                |       388 |   1
/usr/share/fontconfig/conf.avail/25-ttf-arphic-uming-render.conf/       |       362 |   0
/usr/share/fontconfig/conf.avail/25-ttf-arphic-ukai-render.conf/        |       361 |  18
/usr/share/fontconfig/conf.avail/35-ttf-arphic-uming-aliases.conf/      |       353 |   0
/usr/share/fontconfig/conf.avail/60-google-droid-sans-mono.conf/        |       345 |  16
/usr/share/fontconfig/conf.avail/35-ttf-arphic-ukai-aliases.conf/       |       343 |   1
/usr/share/fontconfig/conf.avail/61-stix.conf/                          |       332 |  10
/usr/share/fontconfig/conf.avail/59-google-droid-serif.conf/            |       329 |   4
/home/taras/firefox/defaults/pref/firefox-l10n.js/                      |       257 |   9
/etc/fonts/conf.avail/50-user.conf/                                     |       245 |   0
/home/taras/firefox/defaults/pref/reporter.js/                          |       205 |  16
/etc/fonts/conf.avail/51-local.conf/                                    |       189 |   0
/var/cache/fontconfig/0251a5afa6ac727a1e32b7d4d4aa7cf0-x86.cache-2/     |       160 |  15
/home/taras/.mozilla/firefox/imph4tsg.default/compatibility.ini/        |       159 |  15
/home/taras/.mozilla/firefox/imph4tsg.default/urlclassifierkey3.txt/    |       154 |  13
/etc/hosts/                                                             |       147 |  13
/home/taras/firefox/defaults/pref/channel-prefs.js/                     |       143 |   0
/etc/resolv.conf/                                                       |       134 |  10
/home/taras/firefox/platform.ini/                                       |       132 |   7
/usr/share/gvfs/remote-volume-monitors/hal.monitor/                     |       123 |   0
/usr/share/gvfs/remote-volume-monitors/gdu.monitor/                     |       123 |   7
/usr/share/gvfs/remote-volume-monitors/gphoto2.monitor/                 |       115 |  32
/home/taras/.mozilla/firefox/imph4tsg.default/extensions.ini/           |       112 |  12
/home/taras/.mozilla/firefox/imph4tsg.default/extensions.cache/         |       106 |  14
/etc/gtk-2.0/gtkrc/                                                     |        97 |  20
/home/taras/.mozilla/firefox/profiles.ini/                              |        94 |  21
/usr/share/themes/Default/gtk-2.0-key/gtkrc/                            |        82 |  20
/home/taras/firefox/chrome/pippki.manifest/                             |        69 |   0
/home/taras/firefox/browserconfig.properties/                           |        68 |  37
/home/taras/.Xauthority/                                                |        52 |  13
/var/lib/dbus/machine-id/                                               |        33 |  13
/etc/host.conf/                                                         |        26 |  13
/etc/gnome-vfs-2.0/modules/ssl-modules.conf/                            |        12 |   1
/home/taras/.mozilla/firefox/Crash Reports/InstallTime20091022031207/   |        10 |  22
/home/taras/.mozilla/firefox/Crash Reports/LastCrash/                   |        10 |   1
/home/taras/.mozilla/firefox/imph4tsg.default/cookies.sqlite-journal/   |         5 |   1
(263 rows)</pre>
]]></content:encoded>
			<wfw:commentRss>http://blog.mozilla.com/tglek/2009/10/23/studying-library-io-systemtap-style/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Rant on Library IO</title>
		<link>http://blog.mozilla.com/tglek/2009/10/20/large-apps-just-have-to-start-slow/</link>
		<comments>http://blog.mozilla.com/tglek/2009/10/20/large-apps-just-have-to-start-slow/#comments</comments>
		<pubDate>Wed, 21 Oct 2009 05:24:36 +0000</pubDate>
		<dc:creator>tglek</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blog.mozilla.com/tglek/?p=188</guid>
		<description><![CDATA[So I&#8217;ve been trying to figure out how optimize disk IO startup. I looked into IO caused by libraries and turns out that apps with big libraries are screwed. Here is how I came to this conclusion:
Gnomer&#8217;s research on startup pointed out that dumb readahead leads to wins in terms file io. So I wrote [...]]]></description>
			<content:encoded><![CDATA[<p>So I&#8217;ve been trying to figure out how optimize disk IO startup. I looked into IO caused by libraries and turns out that apps with big libraries are screwed. Here is how I came to this conclusion:</p>
<p>Gnomer&#8217;s <a href="http://www.gnome.org/~lcolitti/gnome-startup/analysis/">research</a> on startup pointed out that dumb readahead leads to wins in terms file io. So I wrote some code and sure enough, reading in libxul on top of our main() function does indeed result in a significant measurable speed-up on both Linux and OSX.</p>
<p>From the gnome page I found a link to some <a href="http://ds9a.nl/diskstat/">diskstat</a> stuff. There lay a presentation with graphs that appear to show that OpenOffice has a much better cold IO pattern than Firefox. Given that there are some strong similarities between our application layouts I went digging to see if OpenOffice does something funny. And oh boy, it does do <a href="http://wiki.services.openoffice.org/wiki/Performance/Reorder_Symbols_For_Libraries">funny</a> page reordering on Windows and &#8220;slightly-smarter-than-dumb-readahead-style library prefetch&#8221; on Linux&#8230;</p>
<p>So here is an innocent question: Why is page-reordering not done as a PGO step? I mean shouldn&#8217;t you fire up your app, feed some info back to the linker and be done with it? Another question: Why can&#8217;t we mark certain files as &#8220;keep this whole file in ram if someone asks for part of it to be paged in&#8221;?</p>
<p>So is the only way to fast application startup via static linking? It sure is easy to</p>
<p>posix_fadvise(open(argv[0],O_RDONLY),  POSIX_FADV_WILLNEED);</p>
<p>Are these hacks still the state of the art in making apps with large libraries startup fast?</p>
<p><strong>Update:</strong> Found some mentions of GNU Rope unfinishedware and a relatively recent blog <a href="http://blogs.linux.ie/caolan/2007/04/24/controlling-symbol-ordering/">post</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.mozilla.com/tglek/2009/10/20/large-apps-just-have-to-start-slow/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Restless Bug Fixing</title>
		<link>http://blog.mozilla.com/tglek/2009/10/08/restless-bug-fixing/</link>
		<comments>http://blog.mozilla.com/tglek/2009/10/08/restless-bug-fixing/#comments</comments>
		<pubDate>Thu, 08 Oct 2009 18:13:01 +0000</pubDate>
		<dc:creator>tglek</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blog.mozilla.com/tglek/?p=186</guid>
		<description><![CDATA[I spent the past couple weeks analyzing and improving fastload performance. I&#8217;ve long been suspicious of fastload, but only finally got around to investigating it in detail. I think there is some fundamentally ironic rule in software that if you put the word “fast” in the name of a component, it is bound to eventually [...]]]></description>
			<content:encoded><![CDATA[<p><!-- 		@page { margin: 0.79in } 		P { margin-bottom: 0.08in } 		A:link { so-language: zxx } -->I spent the past couple weeks analyzing and improving fastload performance. I&#8217;ve long been suspicious of fastload, but only finally got around to investigating it in detail. I think there is some fundamentally ironic rule in software that if you put the word “fast” in the name of a component, it is bound to eventually become a performance bottleneck.</p>
<p>Almost a decade has passed since the conception of this code, so it was time to update code&#8217;s assumptions to reflect the capabilities of modern OSes. I landed the <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=412796">fix</a> today. It results in startup performance gains of 1-20% on various platforms I tested, making this the most exiting perf bug I&#8217;ve worked on.</p>
<p><strong>Plans</strong></p>
<p>Now that I&#8217;ve had my fill of almost a year&#8217;s worth of startup performance analysis, for the remainder of the year I plan to refocus on static analysis. My main goal is decent  C support on Dehydra(not to mention the ever elusive GCC 4.5 compatibility) and to facilitate a production-quality DXR.</p>
<p>I&#8217;m hoping that we&#8217;ll end up with cool ways of dealing with the painful/slow boilerplate (bugs <a title="NEW  - Get rid of pointless qi calls" href="https://bugzilla.mozilla.org/show_bug.cgi?id=520626">520626</a>, <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=516085">516085</a> and <a title="ASSIGNED - alwayszero function attribute for gcc" href="https://bugzilla.mozilla.org/show_bug.cgi?id=517370">517370</a>)</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.mozilla.com/tglek/2009/10/08/restless-bug-fixing/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Corrupting Innocent Minds With GCC</title>
		<link>http://blog.mozilla.com/tglek/2009/09/30/corrupting-innocent-minds-with-gcc/</link>
		<comments>http://blog.mozilla.com/tglek/2009/09/30/corrupting-innocent-minds-with-gcc/#comments</comments>
		<pubDate>Thu, 01 Oct 2009 01:32:38 +0000</pubDate>
		<dc:creator>tglek</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blog.mozilla.com/tglek/?p=184</guid>
		<description><![CDATA[Ever since the plugin branch landed in GCC, I have been itching to explore the application-specific optimization space that it opens up. It&#8217;s really hard to optimize code in the general case, but it&#8217;s relatively easy to optimize for something for specific use-cases. We can rely on API-specific static analysis in order to get rid [...]]]></description>
			<content:encoded><![CDATA[<p>Ever since the plugin branch landed in GCC, I have been itching to explore the application-specific optimization space that it opens up. It&#8217;s really hard to optimize code in the general case, but it&#8217;s relatively easy to optimize for something for specific use-cases. We can rely on API-specific static analysis in order to get rid of the API-imposed overheads at compile time. Let me repeat, we can get rid of some API-induced suck (OO frameworks  usually have a lot of it) without sacrificing any of the benefits.</p>
<p>Unfortunally, I got busy working on, supposedly, more important stuff such as making Firefox startup quicker, so my<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=517370"> de-error-handling</a> and de-virtualizer (basically possible with LTO, but we can prove that certain classes will never be overloaded via dynamic linking) ideas had to be put on indefinite hold. Luckily, one of David Humphrey&#8217;s students decided to take on the first task, see his <a href="http://ehren.wordpress.com/2009/09/30/popping-my-gimples-a-plan/">blog post</a> here. I&#8217;m really psyched about this,  few things that are cooler than cross-project open source work involving the most important open source projects of our time <img src='http://blog.mozilla.com/tglek/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://blog.mozilla.com/tglek/2009/09/30/corrupting-innocent-minds-with-gcc/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Enforcing Inheritance Rules</title>
		<link>http://blog.mozilla.com/tglek/2009/09/18/enforcing-inheritance-rules/</link>
		<comments>http://blog.mozilla.com/tglek/2009/09/18/enforcing-inheritance-rules/#comments</comments>
		<pubDate>Fri, 18 Sep 2009 18:01:48 +0000</pubDate>
		<dc:creator>tglek</dc:creator>
				<category><![CDATA[dehydra]]></category>

		<guid isPermaLink="false">http://blog.mozilla.com/tglek/?p=180</guid>
		<description><![CDATA[While writing C++ sometimes one wishes that one could squeeze  a little more out of the type system. In this particular case, Zack Weinberg (layout-refactorer extraordinaire), wanted to make sure that certain methods always get overridden in derived classes. Unfortunately, in that particular design, those methods were not pure-virtual. At this point most C++ [...]]]></description>
			<content:encoded><![CDATA[<p>While writing C++ sometimes one wishes that one could squeeze  a little more out of the type system. In this particular case, Zack Weinberg (layout-refactorer extraordinaire), wanted to make sure that certain methods always get overridden in derived classes. Unfortunately, in that particular design, those methods were not pure-virtual. At this point most C++ hackers would cry a little and move on without any compiler assistance.</p>
<p>Instead of crying, Zack added a NS_MUST_OVERRIDE attribute to methods along with a matching <a href="https://developer.mozilla.org/En/Dehydra">Dehydra</a> script. See the <a href="http://hg.mozilla.org/mozilla-central/file/2047ed35d947/xpcom/analysis/must-override.js">source code</a> and the <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=512726">bug</a> for how simple it can be to extend C++ with a useful new check.</p>
<p>Nothing makes me happier than seeing developers land  big code changes and accompany them with compiler checks instead of relying on programming folklore to maintain important invariants.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.mozilla.com/tglek/2009/09/18/enforcing-inheritance-rules/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Moving Files Into JARs</title>
		<link>http://blog.mozilla.com/tglek/2009/08/27/moving-files-into-jars/</link>
		<comments>http://blog.mozilla.com/tglek/2009/08/27/moving-files-into-jars/#comments</comments>
		<pubDate>Thu, 27 Aug 2009 18:40:09 +0000</pubDate>
		<dc:creator>tglek</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blog.mozilla.com/tglek/?p=178</guid>
		<description><![CDATA[Moving files into jars reduces amount of seeks on startup, and has miscellaneous other performance/organization benefits. I added resource://gre-resources/ which maps to jar:toolkit.jar!/res/.
To move a file into a jar:

Add a jar.mn entry.
Remove existing references to the file in Makefile.in, packages-static files
Add file to the removed-files.in list of dead files
Update urls refering to the file in [...]]]></description>
			<content:encoded><![CDATA[<p>Moving files into jars reduces amount of seeks on startup, and has miscellaneous other performance/organization benefits. I added resource://gre-resources/ which maps to jar:toolkit.jar!/res/.</p>
<p>To move a file into a jar:</p>
<ol>
<li>Add a jar.mn entry.</li>
<li>Remove existing references to the file in Makefile.in, packages-static files</li>
<li>Add file to the removed-files.in list of dead files</li>
<li>Update urls refering to the file in the source. Sometimes one has to switch from using file streams and filenames to using channels and URIs. This is the hard part.</li>
<li>Set your bug as blocking bug <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=513027">513027</a>.</li>
</ol>
<p>For an example see <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=508421">bug 508421</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.mozilla.com/tglek/2009/08/27/moving-files-into-jars/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Cleaning Up Startup Disk IO</title>
		<link>http://blog.mozilla.com/tglek/2009/08/20/cleaning-up-startup-disk-io/</link>
		<comments>http://blog.mozilla.com/tglek/2009/08/20/cleaning-up-startup-disk-io/#comments</comments>
		<pubDate>Thu, 20 Aug 2009 23:50:12 +0000</pubDate>
		<dc:creator>tglek</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blog.mozilla.com/tglek/?p=173</guid>
		<description><![CDATA[Maintaining a module, killing off another one

I was granted ownership of the jar module. Today,  I resumed my quest to kill off the barely limping stopwatch module. Together with nuking STANDALONE mode in jar stuff, I will have landed 75KB worth of -ve diffs this month. It feels so good to delete code.
IO Report
Currently [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Maintaining a module, killing off another one<br />
</strong></p>
<p>I was granted ownership of the <a href="http://benjamin.smedbergs.us/blog/2009-08-19/taras-owns-libjar/">jar module</a>. Today,  I resumed my quest to <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=457949">kill off </a>the barely limping stopwatch module. Together with nuking <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=505784">STANDALONE</a> mode in jar stuff, I will have landed 75KB worth of -ve diffs this month. It feels so good to delete code.</p>
<p><strong>IO Report</strong></p>
<p>Currently I am focusing on application IO (excluding libraries and IO caused by libraries).</p>
<p>From my empirical measurements, opening individual files on a 7200RPM hard drive costs around 0-40ms. This is on Linux. I presume files open quickly when they are located near previously opened files and slower if a full disk seek is required for them. Combining files is usually a significant win in terms of throughput. It turns out that even warm starts and reading from SSDs can benefit from combined IO. Currently small file throughput ranges from &lt;1KB/s to &lt;200KB/s for files &lt; 500K. Combining files into memory mapped jars bumps that up to 1-1.5MB/s (currently jar files are relatively small, making them responsible for a higher proportion of IO should boost that further).</p>
<p>The biggest gains are to be had on Windows Mobile where almost every seemingly trivial filesystem operation takes 2-3ms.</p>
<p>I would like to reduce the number of files read on startup to a dozen or so to be able to crank up disk throughput. Unfortunately, there is a lot to be done, I could use a great deal of help.</p>
<p>Below is a long list of files gathered by stracing firefox-bin, and what I know about them:<br />
<span id="more-173"></span><br />
/home/taras/builds/minefield/dist/bin/application.ini<br />
/home/taras/builds/minefield/dist/bin/browserconfig.properties<br />
/home/taras/builds/minefield/dist/bin/platform.ini<br />
Haven&#8217;t investigated these yet. Perhaps, instead of reading these files should be compiling this info into the xulrunner launcher app?</p>
<p><strong>Update</strong>: ted says application.ini used to be compiled in: <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=383167">bug 383167 </a><br />
/home/taras/builds/minefield/dist/bin/plugins</p>
<p>I&#8217;m ignoring plugins at the moment.<br />
/home/taras/builds/minefield/dist/bin/chrome<br />
/home/taras/builds/minefield/dist/bin/chrome/browser.jar<br />
/home/taras/builds/minefield/dist/bin/chrome/browser.manifest<br />
/home/taras/builds/minefield/dist/bin/chrome/comm.manifest<br />
/home/taras/builds/minefield/dist/bin/chrome/en-US.jar<br />
/home/taras/builds/minefield/dist/bin/chrome/en-US.manifest<br />
/home/taras/builds/minefield/dist/bin/chrome/pageloader.manifest<br />
/home/taras/builds/minefield/dist/bin/chrome/pippki.manifest<br />
/home/taras/builds/minefield/dist/bin/chrome/reftest.manifest<br />
/home/taras/builds/minefield/dist/bin/chrome/toolkit.jar<br />
/home/taras/builds/minefield/dist/bin/chrome/toolkit.manifest<br />
/home/taras/builds/minefield/dist/bin/chrome/xslt-qa.manifest</p>
<p>The .manifest files describe how to find stuff in chrome jars. Parsing .manifest files is inefficient due to disk seeks. Additionally, current .manifest parsing code appears to be  slow on mobile devices. <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=506392">bug 506392</a><br />
I would like to move .manifest files within jars(and look for manifests within jars when a manifest isn&#8217;t found alongside the .jar in the filesystem)</p>
<p>.jar files are a little bit of  a  cpu hog when it comes  to parse the zip file index. This can be done lazily: <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=511754">bug 511754</a><br />
/home/taras/builds/minefield/dist/bin/chrome/icons/default/default16.png<br />
/home/taras/builds/minefield/dist/bin/chrome/icons/default/default32.png<br />
/home/taras/builds/minefield/dist/bin/chrome/icons/default/default48.png<br />
These icons are parsed by gnome libs 3 times during startup. I wonder if we are initializing some gnome thing 3 times?</p>
<p>/home/taras/builds/minefield/dist/bin/components<br />
/home/taras/builds/minefield/dist/bin/components/aboutCertError.js<br />
/home/taras/builds/minefield/dist/bin/components/aboutPrivateBrowsing.js<br />
/home/taras/builds/minefield/dist/bin/components/aboutRights.js<br />
/home/taras/builds/minefield/dist/bin/components/aboutRobots.js<br />
/home/taras/builds/minefield/dist/bin/components/aboutSessionRestore.js<br />
/home/taras/builds/minefield/dist/bin/components/FeedConverter.js<br />
/home/taras/builds/minefield/dist/bin/components/FeedWriter.js<br />
/home/taras/builds/minefield/dist/bin/components/fuelApplication.js<br />
/home/taras/builds/minefield/dist/bin/components/httpd.js<br />
/home/taras/builds/minefield/dist/bin/components/NetworkGeolocationProvider.js<br />
/home/taras/builds/minefield/dist/bin/components/nsAddonRepository.js<br />
/home/taras/builds/minefield/dist/bin/components/nsBadCertHandler.js<br />
/home/taras/builds/minefield/dist/bin/components/nsBlocklistService.js<br />
/home/taras/builds/minefield/dist/bin/components/nsBrowserContentHandler.js<br />
/home/taras/builds/minefield/dist/bin/components/nsBrowserGlue.js<br />
/home/taras/builds/minefield/dist/bin/components/nsContentDispatchChooser.js<br />
/home/taras/builds/minefield/dist/bin/components/nsContentPrefService.js<br />
/home/taras/builds/minefield/dist/bin/components/nsDefaultCLH.js<br />
/home/taras/builds/minefield/dist/bin/components/nsDownloadManagerUI.js<br />
/home/taras/builds/minefield/dist/bin/components/nsExtensionManager.js<br />
/home/taras/builds/minefield/dist/bin/components/nsFilePicker.js<br />
/home/taras/builds/minefield/dist/bin/components/nsFormAutoComplete.js<br />
/home/taras/builds/minefield/dist/bin/components/nsHandlerService.js<br />
/home/taras/builds/minefield/dist/bin/components/nsHelperAppDlg.js<br />
/home/taras/builds/minefield/dist/bin/components/nsLivemarkService.js<br />
/home/taras/builds/minefield/dist/bin/components/nsLoginInfo.js<br />
/home/taras/builds/minefield/dist/bin/components/nsLoginManager.js<br />
/home/taras/builds/minefield/dist/bin/components/nsLoginManagerPrompter.js<br />
/home/taras/builds/minefield/dist/bin/components/nsMicrosummaryService.js<br />
/home/taras/builds/minefield/dist/bin/components/nsPlacesAutoComplete.js<br />
/home/taras/builds/minefield/dist/bin/components/nsPlacesDBFlush.js<br />
/home/taras/builds/minefield/dist/bin/components/nsPlacesTransactionsService.js<br />
/home/taras/builds/minefield/dist/bin/components/nsPrivateBrowsingService.js<br />
/home/taras/builds/minefield/dist/bin/components/nsProgressDialog.js<br />
/home/taras/builds/minefield/dist/bin/components/nsProxyAutoConfig.js<br />
/home/taras/builds/minefield/dist/bin/components/nsSafebrowsingApplication.js<br />
/home/taras/builds/minefield/dist/bin/components/nsSample.js<br />
/home/taras/builds/minefield/dist/bin/components/nsSearchService.js<br />
/home/taras/builds/minefield/dist/bin/components/nsSearchSuggestions.js<br />
/home/taras/builds/minefield/dist/bin/components/nsSessionStartup.js<br />
/home/taras/builds/minefield/dist/bin/components/nsSessionStore.js<br />
/home/taras/builds/minefield/dist/bin/components/nsSetDefaultBrowser.js<br />
/home/taras/builds/minefield/dist/bin/components/nsSidebar.js<br />
/home/taras/builds/minefield/dist/bin/components/nsTaggingService.js<br />
/home/taras/builds/minefield/dist/bin/components/nsTryToClose.js<br />
/home/taras/builds/minefield/dist/bin/components/nsUpdateService.js<br />
/home/taras/builds/minefield/dist/bin/components/nsUrlClassifierLib.js<br />
/home/taras/builds/minefield/dist/bin/components/nsUrlClassifierListManager.js<br />
/home/taras/builds/minefield/dist/bin/components/nsURLFormatter.js<br />
/home/taras/builds/minefield/dist/bin/components/nsWebHandlerApp.js<br />
/home/taras/builds/minefield/dist/bin/components/pluginGlue.js<br />
/home/taras/builds/minefield/dist/bin/components/reftest-cmdline.js<br />
/home/taras/builds/minefield/dist/bin/components/storage-Legacy.js<br />
/home/taras/builds/minefield/dist/bin/components/storage-mozStorage.js<br />
/home/taras/builds/minefield/dist/bin/components/tp-cmdline.js<br />
/home/taras/builds/minefield/dist/bin/components/txEXSLTRegExFunctions.js<br />
/home/taras/builds/minefield/dist/bin/components/WebContentConverter.js<br />
Above files are only read in during the &#8220;slow&#8221; startup and are &#8220;fastloaded&#8221; afterward. However, they are stat()ed to make sure the fastload stuff isn&#8217;t stale. This is bad: <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=511761">bug 511761</a>. Making these depend on .autoreg seems reasonable.</p>
<p>/home/taras/builds/minefield/dist/bin/extensions<br />
This probably should depend on .autoreg too</p>
<p>/home/taras/builds/minefield/dist/bin/updates<br />
/home/taras/builds/minefield/dist/bin/updates/0/update.test<br />
/home/taras/builds/minefield/dist/bin/update.test<br />
This too?</p>
<p>/home/taras/builds/minefield/dist/bin/greprefs<br />
/home/taras/builds/minefield/dist/bin/greprefs/all.js<br />
/home/taras/builds/minefield/dist/bin/greprefs/security-prefs.js<br />
/home/taras/builds/minefield/dist/bin/greprefs/xpinstall.js<br />
Reading a directory full of pref files that never change is crazy.<br />
<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=507288">bug 507288</a> provides 10-100x throughput improvement in reading gre prefs.</p>
<p>/home/taras/builds/minefield/dist/bin/defaults/pref<br />
/home/taras/builds/minefield/dist/bin/defaults/pref/channel-prefs.js<br />
/home/taras/builds/minefield/dist/bin/defaults/pref/firefox-branding.js<br />
/home/taras/builds/minefield/dist/bin/defaults/pref/firefox.js<br />
/home/taras/builds/minefield/dist/bin/defaults/pref/firefox-l10n.js<br />
/home/taras/builds/minefield/dist/bin/defaults/pref/reporter.js<br />
This is similar to gre pref situation, but worse because there are more pref files. This is also harder to refactor. I propose having 2 hardcoded pref names for xulrunner applications: app.js burried in a jar file speed and l10n.js for localization convenience.</p>
<p>/home/taras/builds/minefield/dist/bin/dictionaries<br />
/home/taras/builds/minefield/dist/bin/dictionaries/en-US.aff<br />
/home/taras/builds/minefield/dist/bin/dictionaries/en-US.dic<br />
For some reason only one of my computers is reading the spellcheck dictionary at startup, but it is costing me 70ms. I wonder if these can be moved to a locale jar.</p>
<p>/home/taras/builds/minefield/dist/bin/modules/distribution.js<br />
/home/taras/builds/minefield/dist/bin/modules/DownloadLastDir.jsm<br />
/home/taras/builds/minefield/dist/bin/modules/ISO8601DateUtils.jsm<br />
/home/taras/builds/minefield/dist/bin/modules/NetUtil.jsm<br />
/home/taras/builds/minefield/dist/bin/modules/utils.js<br />
/home/taras/builds/minefield/dist/bin/modules/XPCOMUtils.jsm<br />
These modules should be moved into toolkit.jar: <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=509755">bug 509755</a></p>
<p>/home/taras/builds/minefield/dist/bin/res/broken-image.png<br />
/home/taras/builds/minefield/dist/bin/res/charsetalias.properties<br />
/home/taras/builds/minefield/dist/bin/res/charsetData.properties<br />
/home/taras/builds/minefield/dist/bin/res/forms.css<br />
/home/taras/builds/minefield/dist/bin/res/hiddenWindow.html<br />
/home/taras/builds/minefield/dist/bin/res/html.css<br />
/home/taras/builds/minefield/dist/bin/res/loading-image.png<br />
/home/taras/builds/minefield/dist/bin/res/quirk.css<br />
/home/taras/builds/minefield/dist/bin/res/ua.css</p>
<p>These need to be in a jar too: <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=508421">bug 508421</a><br />
/home/taras/builds/minefield/dist/bin/searchplugins<br />
/home/taras/builds/minefield/dist/bin/searchplugins/amazondotcom.xml<br />
/home/taras/builds/minefield/dist/bin/searchplugins/answers.xml<br />
/home/taras/builds/minefield/dist/bin/searchplugins/creativecommons.xml<br />
/home/taras/builds/minefield/dist/bin/searchplugins/eBay.xml<br />
/home/taras/builds/minefield/dist/bin/searchplugins/google.xml<br />
/home/taras/builds/minefield/dist/bin/searchplugins/wikipedia.xml<br />
/home/taras/builds/minefield/dist/bin/searchplugins/yahoo.xml<br />
I think these should be in a jar too.</p>
<p>This concludes the list of Firefox application files read at startup. I haven&#8217;t touched the stuff in the profile directories or libraries. I think it is realistic to get a tenfold reduction in physical files read by Firefox 3.6.</p>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 285px; width: 1px; height: 1px; overflow: hidden;">https://bugzilla.mozilla.org/show_bug.cgi?id=383167</div>
]]></content:encoded>
			<wfw:commentRss>http://blog.mozilla.com/tglek/2009/08/20/cleaning-up-startup-disk-io/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>There is nothing exciting about filesystems</title>
		<link>http://blog.mozilla.com/tglek/2009/08/14/there-is-nothing-exciting-about-filesystems/</link>
		<comments>http://blog.mozilla.com/tglek/2009/08/14/there-is-nothing-exciting-about-filesystems/#comments</comments>
		<pubDate>Fri, 14 Aug 2009 22:22:22 +0000</pubDate>
		<dc:creator>tglek</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blog.mozilla.com/tglek/?p=171</guid>
		<description><![CDATA[When I originally started at Mozilla, I only knew the people who interviewed me. But I quickly discovered beltzner  when he uttered a sacrilegious statement that went something like: &#8220;&#8230;.. nothing could be as boring as filesystems&#8230;.&#8221;. Mike Beltzner is one of my favourite characters at Mozilla for his ability to speak his mind, [...]]]></description>
			<content:encoded><![CDATA[<p>When I originally started at Mozilla, I only knew the people who interviewed me. But I quickly discovered beltzner  when he uttered a sacrilegious statement that went something like: &#8220;&#8230;.. nothing could be as boring as filesystems&#8230;.&#8221;. Mike Beltzner is one of my favourite characters at Mozilla for his ability to speak his mind, but this quote has troubled me greatly. How can one not care about filesystems? Linux&#8217;s ability to do file stuff efficiently makes it magnitudes faster than other operating systems. Plan 9&#8217;s file-system-centric layout proved that OSes don&#8217;t have to consist of a series of poorly named and categorized system calls. In fact, a clean file layout allows many awesome optimizations. ZFS is one of the few things keeping Solaris relevant. HFS+ is one of the things keeping OSX from being fast.</p>
<p>Being a Linux user, I was disappointed by the pointlessness of optimizing application IO. Sure we inefficiently open tons of files on startup, sure we hit the filesystem 10-100x more than we could, why would one optimize when there when there is no more than a few percent of startup being take up by terrible io patterns?</p>
<p><strong>Excitingly Crappy Filesystems</strong></p>
<p>Luckily Firefox runs on OSX and we are making it run on WinCE. I was delighted to discover that on wince* we paid 1-5ms per file existence check, modification date, size, etc. I was shocked to see that the throughput while reading certain files could be expressed in bytes per second (most crappy flash media seems to be able to pull in &gt;1mb/s).  This brought upon switching our<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=504864"> jar io to mmap</a>, <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=468011">amalgamating</a> jar files, moving more <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=508421">files into jars</a>, etc. I&#8217;ll blog about the details later. My basic idea is that we can utilize jar files as &#8220;controlled filesystem environments&#8221; to deal with having to run on crappy OSes with exceptionally bad filesystems. OSes such as OSX where file IO is barely faster than that of a WinCE phone.</p>
<p>Beltzner, wouldn&#8217;t it be exciting if OSes like Mac OSX had file systems worth being excited about?</p>
<p>* MS likes to use puns for their product names</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.mozilla.com/tglek/2009/08/14/there-is-nothing-exciting-about-filesystems/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>This Month In Static Analysis</title>
		<link>http://blog.mozilla.com/tglek/2009/08/03/this-month-in-static-analysis/</link>
		<comments>http://blog.mozilla.com/tglek/2009/08/03/this-month-in-static-analysis/#comments</comments>
		<pubDate>Tue, 04 Aug 2009 05:19:55 +0000</pubDate>
		<dc:creator>tglek</dc:creator>
				<category><![CDATA[dehydra]]></category>
		<category><![CDATA[pork]]></category>

		<guid isPermaLink="false">http://blog.mozilla.com/tglek/?p=164</guid>
		<description><![CDATA[Lately I have been focusing on optimizing Fennec startup on a delightfully inadequate platform: Windows Mobile. More on fascinating startup, performance problems and solutions later. As a result I have been doing relatively little static analysis stuff.
The main reason for taking a break is that I feel that I went from having no way to [...]]]></description>
			<content:encoded><![CDATA[<p>Lately I have been focusing on optimizing Fennec startup on a delightfully inadequate platform: Windows Mobile. More on fascinating startup, performance problems and solutions later. As a result I have been doing relatively little static analysis stuff.</p>
<p>The main reason for taking a break is that I feel that I went from having no way to do any analysis to having production-quality tools for <a href="https://developer.mozilla.org/En/Dehydra">analysis</a> and <a href="https://developer.mozilla.org/En/Pork">rewriting</a>.  I finally have a chance to move on from developing tools to using them in everyday development. The main puzzle piece that needs completion is GCC 4.5 support in Dehydra. We are feature-complete on 4.5, just need to stabilize once the trunk stabilizes.</p>
<p><strong>Drowning In Pork<br />
</strong></p>
<p>A number of other people did some cool stuff in the meantime. First and foremost: Joshua Cranmer has ventured into the land of <a href="https://developer.mozilla.org/En/Pork">Pork</a> and is publishing a guide to doing refactoring tools on this blog (<a href="http://quetzalcoatal.blogspot.com/2009/07/guide-to-pork-part-1.html">part  1</a>, <a href="http://quetzalcoatal.blogspot.com/2009/07/guide-to-pork-part-2.html">part  2</a>, <a href="http://quetzalcoatal.blogspot.com/2009/08/guide-to-pork-part-3.html">part  3</a>). This is cool, because until now, there were no Pork docs and nothing I write could ever match Joshua&#8217;s documenting talents.  Thanks a bunch, Joshua.</p>
<p>I have also received my first-ever bugfix patches to Elsa. Previously, I&#8217;ve received miscellaneous build fixes, etc, but these are the first patches that involved somebody pounding their head against the wall until they figured out why things were crashing or not accepting valid C++ code.</p>
<p><strong>Introducing Dan Witte</strong></p>
<p>Dan is the new static analysis go-to person. So far he facilitated an explosion of static analysis ideas (they are tracked in <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=430328">bug 430328</a>). A lot of these can be expressed as &lt;10line Dehydra analyses, so they are excellent introductory projects. If you are dying to start analyzing code, but don&#8217;t know where to begin, look in that bug. Dan has written an interesting analysis to do with finding accidental temporaries due to C++&#8217;s &#8220;wonderful&#8221; implicit conversions/etc (expect to see a blog post on that). He is also working on the holy grail of Mozilla static analysis: a full callgraph. It&#8217;s a little embarrassing that we don&#8217;t have that yet, but it&#8217;s hard and once we do have it, a whole new world of analyses will be possible.</p>
<p><strong>Speaking of Callgraphs&#8230;</strong></p>
<p>So while various Mozillians were pondering how awesome it would be to do inter-function analysis, an intern has beat us to writing the first useful inter-function analysis! Sully had a problem, after a tiny bit of  Dehydra coaching, he solved his problem in the amount of time it took me to eat my lunch. Brilliant! See his <a href="http://www.msully.net/blog/2009/08/03/doing-whole-tree-analysis-with-dehydra/">blog post</a> for details. My conclusion: either Dehydra is pretty easy to use and/or we get mad genius interns <img src='http://blog.mozilla.com/tglek/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> .</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.mozilla.com/tglek/2009/08/03/this-month-in-static-analysis/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
