<?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/"
	>

<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>
	<pubDate>Thu, 02 Jul 2009 21:21:39 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.7.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Python GDB - Logging File IO</title>
		<link>http://blog.mozilla.com/tglek/2009/07/01/python-gdb-logging-file-io/</link>
		<comments>http://blog.mozilla.com/tglek/2009/07/01/python-gdb-logging-file-io/#comments</comments>
		<pubDate>Wed, 01 Jul 2009 23:05:42 +0000</pubDate>
		<dc:creator>tglek</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blog.mozilla.com/tglek/?p=146</guid>
		<description><![CDATA[Python GDB Rocks!
I wanted a non-painful way to figure out what&#8217;s causing bonus file IO. I&#8217;ve noticed that gtk likes to open files, but I didn&#8217;t have the exact details. So I grabbed python gdb, and with some tips on syscalls from gdb old-timers managed to produce a report to assign blame for open()ing files to [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Python GDB Rocks!</strong></p>
<p>I wanted a non-painful way to figure out what&#8217;s causing bonus file IO. I&#8217;ve noticed that gtk likes to open files, but I didn&#8217;t have the exact details. So I grabbed <a href="http://sourceware.org/gdb/wiki/PythonGdb">python gdb</a>, and with some tips on syscalls from gdb old-timers managed to produce a <a href="http://people.mozilla.com/~tglek/fennec/files.txt">report</a> to assign blame for open()ing files to relevant Mozilla functions.</p>
<p>Other than the gdb-hating syscalls issue, achieving this was simple</p>
<ol>
<li>Compile python-enabled gdb(Next set of distribution releases should have it..I hope)</li>
<li>Define a new gdb command in a python file. I called mine &#8220;taras&#8221; for lack of a better name.</li>
<li>Set a breakpoint, attach your command to it. :<br />
<code>break open<br />
source -p /path/to/your/script.py<br />
command 1<br />
taras<br />
end</code></li>
<li>Have the script walk the backtrace to figure out the filename and the last Mozilla function. Log the info, issue gdb continue command.</li>
<li>Print out a report and profit:<br />
<code>python report()</code></li>
</ol>
<p>Here is my <a href="http://people.mozilla.com/~tglek/gdblog.py">script</a>. The only nasty part here is that I had to read the filename out of a register (i&#8217;m on amd64, on 32 it&#8217;d be $esi instead of $rdi) because gdb doesn&#8217;t deal well with system calls.</p>
<p>I&#8217;ve never throught it would be this fun to use gdb. I always thought debuggers should be scriptable, thanks to <a href="http://tromey.com/blog/">Tom Tromey</a> (lots of gdb tutorials on Tom&#8217;s blog) and any others who finally made this a reality.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.mozilla.com/tglek/2009/07/01/python-gdb-logging-file-io/feed/</wfw:commentRss>
		</item>
		<item>
		<title>DXR: The Most Impressive Code Navigation Tool Ever</title>
		<link>http://blog.mozilla.com/tglek/2009/06/29/dxr-the-most-impressive-code-navigation-tool-ever/</link>
		<comments>http://blog.mozilla.com/tglek/2009/06/29/dxr-the-most-impressive-code-navigation-tool-ever/#comments</comments>
		<pubDate>Mon, 29 Jun 2009 17:19:16 +0000</pubDate>
		<dc:creator>tglek</dc:creator>
		
		<category><![CDATA[dehydra]]></category>

		<guid isPermaLink="false">http://blog.mozilla.com/tglek/?p=143</guid>
		<description><![CDATA[Are you are a developer who has been frustrated by the pathetic state of the art in code search engines and code browsing experience on the web? Have you been longing for being able to view code with more aid than coloured words?
David Humphrey just released his DXR bombshell. The &#8220;basic&#8221; concept behind DXR is [...]]]></description>
			<content:encoded><![CDATA[<p>Are you are a developer who has been frustrated by the pathetic state of the art in code search engines and code browsing experience on the web? Have you been longing for being able to view code with more aid than coloured words?</p>
<p>David Humphrey just <a href="http://vocamus.net/dave/?p=557">released</a> his DXR bombshell. The &#8220;basic&#8221; concept behind DXR is extraction of the rich semantic information gathered by tools like GCC, Spidermonkey and <a href="https://developer.mozilla.org/en/XPIDL/xpidl">xpidl</a>. This data is then coherently linked together into a pretty UI in order to provide cleverness during code browsing sessions.</p>
<p>DXR will be happy to answer seemingly trivial queries:</p>
<ul>
<li>List implementations of  interfaces in C++ (and soon JS).</li>
<li>Provide relevant search results by searching semantic data first. No, grep is no longer state of the art for searching code.</li>
<li>Switch between definition and declaration.</li>
<li>Walk up/down class hierarchies.</li>
<li>Lookup typedefs, types, etc.</li>
</ul>
<p>I&#8217;ve been wanting to see this sort of tool built on top information exposed by <a href="https://developer.mozilla.org/En/Dehydra">Dehydra</a> since I got it working. Words can not express how pumped I am about DXR and the magic powers that we will be granting it.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.mozilla.com/tglek/2009/06/29/dxr-the-most-impressive-code-navigation-tool-ever/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Studying Fennec Performance</title>
		<link>http://blog.mozilla.com/tglek/2009/06/26/studying-fennec-performance/</link>
		<comments>http://blog.mozilla.com/tglek/2009/06/26/studying-fennec-performance/#comments</comments>
		<pubDate>Fri, 26 Jun 2009 22:31:36 +0000</pubDate>
		<dc:creator>tglek</dc:creator>
		
		<category><![CDATA[fennec]]></category>

		<category><![CDATA[performance]]></category>

		<guid isPermaLink="false">http://blog.mozilla.com/tglek/?p=140</guid>
		<description><![CDATA[Working on Fennec performance N810 has been very educational. I have been learning more and more about performance profiling on crappy platforms. I define a platform as crap if it has poor development tools, limited OS or other significant limitations. Linux is a crappy platform in this case because it&#8217;s running on ARM where oprofile [...]]]></description>
			<content:encoded><![CDATA[<p>Working on Fennec performance N810 has been very educational. I have been learning more and more about performance profiling on crappy platforms. I define a platform as crap if it has poor development tools, limited OS or other significant limitations. Linux is a crappy platform in this case because it&#8217;s running on ARM where oprofile barely does anything and there are no other performance tools for N810 (more modern ARM cpus should user-space perf counters and be more useful for instrumentation).</p>
<p><strong>JSD Secret Sauce for JS Optimization</strong></p>
<p>In general there is a misconception that implementing stuff in  JavaScript will result in slower code than doing the same in C++. That  may be true if the code is implemented in the exact same manner. But in  real life the expressiveness and safety of a high-level language like  JavaScript permits algorithmic optimizations that would often not be  realistic to do in C++ because of time/safety constraints.</p>
<p>So how does one figure out what&#8217;s slow in JS? timeless suggested that I checkout the JavaScript Debugging API. Using the API and a small hack in spidermonkey(JSD doesn&#8217;t expose fast dom calls) I was able to hook into chrome code to get a timed trace of JavaScript functions being run.</p>
<p>Once I had a trace it was relatively easy to figure out to &#8220;do not call this slow thing all the time&#8221; dance (aka optimize code). I collected that work in <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=470116">bug 470116</a>. Last I checked there was relatively little room for optimization left on the JS side of Fennec, so then I went to look at what&#8217;s lurking in C++.</p>
<p>PS. Firebug is a popular consumer of the JSD API for those times when one isn&#8217;t willing to write JS components to figure out why something is slow.</p>
<p><strong>C++ Is Harder</strong></p>
<p>I&#8217;ve some success with inserting probes into C++ code. I would find interesting code by running oprofile on the desktop (while doing things that I felt were slow on N810). Oprofile would then provide me a callgraph which I would visualize with <a href="http://code.google.com/p/jrfonseca/wiki/Gprof2Dot">this awesome little script</a>. Then I would stick <a href="http://people.mozilla.com/~tglek/fennec/patches/measurer.diff">MeasurerOfTime</a> timing blocks into interesting &#8220;hot&#8221; code and hope that I would learn something useful.</p>
<p>This got me thinking. Wouldn&#8217;t it be nice if there existed a JSD for C++? It&#8217;d be cool to inspect the C++ callgraph just like one does for JS. It seems like it would help on platforms that aren&#8217;t gcc and can&#8217;t inject tracing code via -finstrument-functions. Even -finstrument-functions is of limited use due to the pain of looking up symbols in shared libraries. Stay tuned.</p>
<p><strong>Measuring Progress</strong></p>
<p>The worst part of doing optimizations is knowing that some time in a future an innocent programmer will slightly change some seemingly innocent code and things will no longer happen quickly. Short of policing every single patch by people who previously optimized code in question there is only one thing one can do: performance tests.</p>
<p><a href="http://hg.mozilla.org/users/tglek_mozilla.com/fennecmark">Fennecmark</a> is a benchmark for measuring responsiveness of the Fennec features that I worked on most: panning, zooming and lag during pageload. I <a href="http://blog.mozilla.com/tglek/2009/04/23/benchmarks-and-instrumentation-for-fennecetc/">blogged</a> about it before. Since then Joel Maher has <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=493057">gotten Fennecmark</a> to run automatically and produce results on the graph server. I think we should be logging more numbers (Tpan, Tzoom), but it&#8217;s an excellent first step in monitoring performance regressions.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.mozilla.com/tglek/2009/06/26/studying-fennec-performance/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Dehydra &amp; Pork Sources Moved</title>
		<link>http://blog.mozilla.com/tglek/2009/06/25/dehydra-pork-sources-moved/</link>
		<comments>http://blog.mozilla.com/tglek/2009/06/25/dehydra-pork-sources-moved/#comments</comments>
		<pubDate>Thu, 25 Jun 2009 23:32:57 +0000</pubDate>
		<dc:creator>tglek</dc:creator>
		
		<category><![CDATA[dehydra]]></category>

		<category><![CDATA[pork]]></category>

		<guid isPermaLink="false">http://blog.mozilla.com/tglek/?p=137</guid>
		<description><![CDATA[I moved dehydra to a more official location, please update your scripts and hg settings.
New dehydra url:
http://hg.mozilla.org/rewriting-and-analysis/dehydra/
Pork got reshuffled during the move, it&#8217;s now 2 repositories. oink is dead. It now depends on current versions of flex (as opposed to flex-old) and features a cleaned up buildsystem.
New way to checkout pork:

hg clone http://hg.mozilla.org/rewriting-and-analysis/pork
hg clone http://hg.mozilla.org/rewriting-and-analysis/elsa [...]]]></description>
			<content:encoded><![CDATA[<p>I moved dehydra to a more official location, please update your scripts and hg settings.<br />
New dehydra url:<br />
http://hg.mozilla.org/rewriting-and-analysis/dehydra/</p>
<p>Pork got reshuffled during the move, it&#8217;s now 2 repositories. oink is dead. It now depends on current versions of flex (as opposed to flex-old) and features a cleaned up buildsystem.</p>
<p>New way to checkout pork:<br />
<code><br />
hg clone http://hg.mozilla.org/rewriting-and-analysis/pork<br />
hg clone http://hg.mozilla.org/rewriting-and-analysis/elsa pork/elsa<br />
</code></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.mozilla.com/tglek/2009/06/25/dehydra-pork-sources-moved/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Dehydra/Treehydra C support</title>
		<link>http://blog.mozilla.com/tglek/2009/06/17/dehydratreehydra-c-support/</link>
		<comments>http://blog.mozilla.com/tglek/2009/06/17/dehydratreehydra-c-support/#comments</comments>
		<pubDate>Wed, 17 Jun 2009 19:22:53 +0000</pubDate>
		<dc:creator>tglek</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blog.mozilla.com/tglek/?p=133</guid>
		<description><![CDATA[Every once in a while people want to be analyze C code. If you are one of those people, checkout bug 494960. For GCC 4.3, you&#8217;ll need to update your patch queue. If you you followed the Dehydra install instructions do something like:

cd gcc-4.3.0/.hg/patches
hg pull -u
cd ../..
hg qpush -a

and rebuild gcc to get C support [...]]]></description>
			<content:encoded><![CDATA[<p>Every once in a while people want to be analyze C code. If you are one of those people, checkout <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=494960">bug 494960</a>. For GCC 4.3, you&#8217;ll need to update your patch queue. If you you followed the <a href="https://developer.mozilla.org/En/Dehydra/Installing_Dehydra">Dehydra install instructions</a> do something like:</p>
<p><code><br />
cd gcc-4.3.0/.hg/patches<br />
hg pull -u<br />
cd ../..<br />
hg qpush -a<br />
</code></p>
<p>and rebuild gcc to get C support in the plugin framework for GCC 4.5 (patch for trunk is in the bug).</p>
<p>Everything other than process_function should work in both treehydra and dehydra. Note that the objects provided by GCC will be slightly different in structure due to the underlying difference between gcc/g++, so scripts that were written for C++ may need to be updated.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.mozilla.com/tglek/2009/06/17/dehydratreehydra-c-support/feed/</wfw:commentRss>
		</item>
		<item>
		<title>GCC 4.5 + Dehydra is a go and other updates</title>
		<link>http://blog.mozilla.com/tglek/2009/05/14/gcc-45-dehydra-is-a-go-and-other-updates/</link>
		<comments>http://blog.mozilla.com/tglek/2009/05/14/gcc-45-dehydra-is-a-go-and-other-updates/#comments</comments>
		<pubDate>Fri, 15 May 2009 05:06:59 +0000</pubDate>
		<dc:creator>tglek</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blog.mozilla.com/tglek/?p=131</guid>
		<description><![CDATA[I finally landed the remaining GCC patches needed to get a useful Dehydra without any of that gcc-patching pain!
This week I also got some nice contributions from a contributor with a masterplan.
Overall I expect cool things to happen once GCC 4.5 ships with plugin support.  It&#8217;ll open up a jar of whoopass like C++ [...]]]></description>
			<content:encoded><![CDATA[<p>I finally landed the remaining GCC patches needed to get a useful <a href="https://developer.mozilla.org/En/Dehydra">Dehydra</a> without any of that gcc-patching pain!</p>
<p>This week I also got some nice contributions from a contributor with a masterplan.</p>
<p>Overall I expect cool things to happen once GCC 4.5 ships with plugin support.  It&#8217;ll open up a jar of whoopass like C++ has not seen before.</p>
<p><strong>Dehydra Docs</strong></p>
<p>Benjamin redid the <a href="http://benjamin.smedbergs.us/blog/">Dehydra</a> documentation, it should be easier than ever to get started.</p>
<p><strong>Static Analysis in Mozilla</strong></p>
<p>Slowly but surely we are gathering static analysis momentum. More and more developers are pausing and thinking &#8220;I need to make sure this code has an analysis to go with it because there is no way I can prove it correct, time to write a <a href="https://developer.mozilla.org/en/Treehydra">Treehydra</a> script&#8230;or ask someone else to make one for me&#8221;. This mindset is important for being able to introduce complex changes in a controlled manner.</p>
<p>On the refactoring side, things are held up a little by API compatibility. Perhaps multi-process stuff will shake things up. However, nothing can hold <a href="https://blog.mozilla.com/cjones/">Chris</a> up from letting his piglet/porky gremlins chew through locking code.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.mozilla.com/tglek/2009/05/14/gcc-45-dehydra-is-a-go-and-other-updates/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Dehydra Updates</title>
		<link>http://blog.mozilla.com/tglek/2009/05/11/dehydra-updates/</link>
		<comments>http://blog.mozilla.com/tglek/2009/05/11/dehydra-updates/#comments</comments>
		<pubDate>Mon, 11 May 2009 18:55:14 +0000</pubDate>
		<dc:creator>tglek</dc:creator>
		
		<category><![CDATA[dehydra]]></category>

		<guid isPermaLink="false">http://blog.mozilla.com/tglek/?p=129</guid>
		<description><![CDATA[How well are you packing your structs?
Arpad asked that question with an awesome Dehydra script and came up with an interesting list.
GCC 4.3.3 Is supported
GCC 4.3.3(4.3.[210] worked) broke C++ compatibility in the headers used by Dehydra.
Zach pointed out that passing -fpermissive to g++ solves the problem. Sorry to all the people who had issues building [...]]]></description>
			<content:encoded><![CDATA[<p><strong>How well are you packing your structs?</strong><br />
Arpad asked that question with an awesome <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=492185">Dehydra scrip</a>t and came up with an interesting list.</p>
<p><strong>GCC 4.3.3 Is supported</strong><br />
GCC 4.3.3(4.3.[210] worked) broke C++ compatibility in the headers used by <a href="https://developer.mozilla.org/En/Dehydra">Dehydra</a>.<br />
Zach pointed out that passing -fpermissive to g++ solves the problem. Sorry to all the people who had issues building the hydras with GCC 4.3.3, that&#8217;s fixed now.</p>
<p>As I mentioned before, we are skipping GCC 4.4 support in Dehydra and aiming for supporting unpatched GCC 4.5. I wish that the small GCC patches were as quick to land as that big one I landed a couple of weeks ago :(.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.mozilla.com/tglek/2009/05/11/dehydra-updates/feed/</wfw:commentRss>
		</item>
		<item>
		<title>GCC Rant + Progress</title>
		<link>http://blog.mozilla.com/tglek/2009/04/30/gcc-rant-progress/</link>
		<comments>http://blog.mozilla.com/tglek/2009/04/30/gcc-rant-progress/#comments</comments>
		<pubDate>Thu, 30 Apr 2009 21:51:35 +0000</pubDate>
		<dc:creator>tglek</dc:creator>
		
		<category><![CDATA[dehydra]]></category>

		<category><![CDATA[treehydra]]></category>

		<guid isPermaLink="false">http://blog.mozilla.com/tglek/?p=127</guid>
		<description><![CDATA[I feel strange working on GCC-specific stuff and then discussing it on planet mozilla as mozilla work. However, without GCC, Dehydra and Treehydra would not be half as awesome (much less feasible even). The power of open source is that it allows us to leverage the entire open source ecosystem to achieve specific goals. When [...]]]></description>
			<content:encoded><![CDATA[<p>I feel strange working on GCC-specific stuff and then discussing it on planet mozilla as mozilla work. However, without GCC, Dehydra and Treehydra would not be half as awesome (much less feasible even). The power of open source is that it allows us to leverage the entire open source ecosystem to achieve specific goals. When open source projects combine their efforts, not even the biggest software companies can compete as cross-project goals would be incredibly expensive and unpleasant otherwise.</p>
<p>Occasionally, it is very frustrating to see people treat open source software as immutable and independent black boxes. In my personal experience, the browser and the compiler are viewed as finished products and therefore it is OK to bitch and complain about them. That&#8217;s frustrating because the same users could be channeling that energy in a more positive way by reporting bugs, contributing code/documentation, etc.</p>
<p>Sometimes these rants result in rather comical conclusions: Ingo&#8217;s <a href="http://lwn.net/Articles/328685/">rant</a> is priceless. My perspective on this:</p>
<ul>
<li> what have Linux kernel devs done to help GCC help them?</li>
<li>&lt;flame&gt;Sparse is a deadend. Writing compiler code in C is silly, writing analysis code in C is sillier (and frustrating and limiting). Taking a crappy parser and bolting a crappy compiler backend onto it will result in bigger pile of crap <img src='http://blog.mozilla.com/tglek/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> Given how smart kernel devs are, they sure like wasting their time on crappy solutions in crappy languages.&lt;/flame&gt;</li>
<li>Wouldn&#8217;t it be cool if instead of complaining these talented people wrote a GCC plugin to do what they want?</li>
</ul>
<p><strong>GCC Plugin Progress</strong></p>
<p>I finally landed the massively boring and annoying <a href="http://hg.mozilla.org/users/tglek_mozilla.com/gcc-moz-plugin-mq/file/24bbb11d7346/gty.diff">GTY patch</a>. I can barely believe that the patch went in so smoothly without excess complaining from GCC devs. From GCC perspective it&#8217;s merely a cosmetic cleanup that affects a large number of headers. For us it enables <a href="https://developer.mozilla.org/en/Treehydra">Treehydra</a> to be generated via <a href="https://developer.mozilla.org/En/Dehydra">Dehydra</a> with little manual effort. It basically makes Treehydra possible without patching GCC. I have another 3-4 patches that need to land before trunk GCC can run the hydras out of the box. Those are mainly localized bugfixes and cleanups so I fully expect them to go in and for GCC 4.5 to rock my world.<br />
Once GCC 4.5 ships. analyzing code will depend on a trivial matter of apt-getting(or equivalent) the hydras and specifying the analysis flags on the GCC commandline!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.mozilla.com/tglek/2009/04/30/gcc-rant-progress/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Benchmarks and Instrumentation for Fennec/etc</title>
		<link>http://blog.mozilla.com/tglek/2009/04/23/benchmarks-and-instrumentation-for-fennecetc/</link>
		<comments>http://blog.mozilla.com/tglek/2009/04/23/benchmarks-and-instrumentation-for-fennecetc/#comments</comments>
		<pubDate>Thu, 23 Apr 2009 18:19:14 +0000</pubDate>
		<dc:creator>tglek</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blog.mozilla.com/tglek/?p=121</guid>
		<description><![CDATA[I wrote Fennecmark to automate some of the tasks that I did manually while doing performance debugging.
I tried to capture some of the &#8220;perceived performance&#8221; in numbers. My goal is to focus on user-visible areas of performance. Ideally it will enable us to track performance better to ensure that key features do not regress in [...]]]></description>
			<content:encoded><![CDATA[<p>I wrote Fennecmark to automate some of the tasks that I did manually while doing performance debugging.</p>
<p>I tried to capture some of the &#8220;perceived performance&#8221; in numbers. My goal is to focus on user-visible areas of performance. Ideally it will enable us to track performance better to ensure that key features do not regress in performance and enable us to compare Fennec speed on various platforms. I need to spend some quality time with QA people to figure out how to achieve that.</p>
<p>Currently Fennecmark loads a slow-to-load webpage, zooms around it and then pans from the top to the bottom. This measures: responsiveness during pageload, zoom speed and panning lag.</p>
<p>See code at <a href="http://hg.mozilla.org/users/tglek_mozilla.com/fennecmark">http://hg.mozilla.org/users/tglek_mozilla.com/fennecmark</a>.</p>
<p><strong>JSD Instrumentation</strong></p>
<p>Spidermonkey provides an API that allows one to get a notification on every method entry/exit. I was able to do most of my Fennec performance analysis via a component in <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=470116">bug 470116</a>. My stopwatch component times the execution of every js function call and spits out a log that has been very useful in figuring out what is taking up time in Fennec chrome.</p>
<p><strong>Porkstain</strong></p>
<p>I am itching to write a tool that can instrument large portions of Mozilla code such that it can be profiled across C++/JS boundaries and without any external tool support. I am guessing this would be most useful on platforms with crappy sampling tools, but it would be cool if it made finding slow codepaths easier in general. If you know any lightweight instrumentation techniques, please share.</p>
<p>I wrote a little prototype to insert stopwatch stuff into code deemed interesting by oprofile (stuff in the bug above). The code patching part works well, but it&#8217;s a big runtime hit and outputs too much data.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.mozilla.com/tglek/2009/04/23/benchmarks-and-instrumentation-for-fennecetc/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Misc Static Analysis News: s/#mmgc/#static/, Codecon, piglet, &#8230;</title>
		<link>http://blog.mozilla.com/tglek/2009/04/15/misc-static-analysis-news-smmgcstatic-codecon-piglet/</link>
		<comments>http://blog.mozilla.com/tglek/2009/04/15/misc-static-analysis-news-smmgcstatic-codecon-piglet/#comments</comments>
		<pubDate>Wed, 15 Apr 2009 21:37:23 +0000</pubDate>
		<dc:creator>tglek</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blog.mozilla.com/tglek/?p=124</guid>
		<description><![CDATA[#static on irc.mozilla.org is now the correct irc channel for anything to do with static analysis.
Codecon
On Sunday, I will be presenting on Pork at codecon. I have been meaning to attend codecon since the days when P2P was considered cool, was not able to make it until this year. It is a historical milestone for [...]]]></description>
			<content:encoded><![CDATA[<p>#static on irc.mozilla.org is now the correct irc channel for anything to do with static analysis.</p>
<p><strong>Codecon</strong><br />
On Sunday, I will be presenting on <a href="https://developer.mozilla.org/En/Pork">Pork</a> at codecon. I have been meaning to attend <a href="http://www.codecon.org/">codecon</a> since the days when P2P was considered cool, was not able to make it until this year. It is a historical milestone for me. Codecon was how people at Mozilla first heard of Elsa, which is now the foundation of all our refactoring tools (it is also  inherited baggage I get to maintain).</p>
<p><strong>Piglet</strong></p>
<p>I adopted <a href="http://hg.mozilla.org/users/tglek_mozilla.com/piglet">Piglet</a>, <a href="http://blog.mozilla.com/dmandelin/">Dave Mandelin</a>&#8217;s de-oinkification project, and imported it into hg. It feels really good to finally be able to do a make -j without disturbing people nearby with surprise explosions of foul language. I plan to move all relevant static analysis tools into piglet. After that I shall finally merge a dozen or so elsa repositories and end up with Pork consisting of elsa/ + piglet/.</p>
<p><strong>Pork*</strong></p>
<p>Chris Jones is quietly working on making Pork magnitudes more useful to average developers. It&#8217;s exciting stuff and I&#8217;ll let him announce it when he&#8217;s ready. Between his work and <a href="http://vocamus.net/dave/">David Humphrey</a>&#8217;s DXR. I think we are finally going to make it easier to hack on Mozilla for a much wider audience than before.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.mozilla.com/tglek/2009/04/15/misc-static-analysis-news-smmgcstatic-codecon-piglet/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
