Skip to content

Category Archives: Uncategorized

on development speedbumps

10-Apr-15

Last week, I ran into a small speedbump with my development process. I normally write my patches and commit them to git with initial lines that look like: fix IPDL thinko for never-inline method declarations; r=bent Then, when I use git-bz to push my patches to bugzilla, it autofills the r? flag for the patch […]

tsan bug finding update

31-Mar-15

At the beginning of Q1, I set a goal to investigate races with Thread Sanitizer and to fix the “top” 10 races discovered with the tool.  Ten races seemed like a conservative number; we didn’t know how many races there were, their impact, or how difficult fixing them would be.  We also weren’t sure how […]

measuring power usage with power gadget and joulemeter

24-Feb-15

In the continuing evaluation of how Firefox’s energy usage might be measured and improved, I looked at two programs, Microsoft Research’s Joulemeter and Intel’s Power Gadget. As you might expect, Joulemeter only works on Windows. Joulemeter is advertised as “a software tool that estimates the power consumption of your computer.” Estimates for the power usage […]

finding races in Firefox with ThreadSanitizer

20-Feb-15

We use a fair number of automated tools for memory errors (AddressSanitizer/Leak Sanitizer for use-after-free and buffer overflows; custom leak checking on refcounted objects; Valgrind tests and Julian Seward’s mochitests on Valgrind periodic testing), but we do very little in terms of checking for data races between threads.  As more and more components of the […]

multiple return values in C++

17-Feb-15

I’d like to think that I know a fair amount about C++, but I keep discovering new things on a weekly or daily basis.  One of my recent sources of new information is the presentations from CppCon 2014.  And the most recent presentation I’ve looked at is Herb Sutter’s Back to the Basics: Essentials of […]

examples of poor API design, 1/N – pldhash functions

27-Jan-15

The other day in the #content IRC channel: <bz> I have learned so many things about how to not define APIs in my work with Mozilla code ;) <bz> (probably lots more to learn, though) I, too, am still learning a lot about what makes a good API. Like a lot of other things, it’s […]

profiling for wakeups on osx

07-Jan-15

One of my Q1 goals is to investigate what can be done for cross-platform power profiling, in service of the Firefox Platform’s Project Candle.  Roberto Vitillo already did a bit of exploration in this space last year.  Ideally, what would come out of my research would be some sort of event counter that we could […]

what’s new in xpcom

16-Dec-14

I was talking to somebody at Mozilla’s recent all-hands meeting in Portland, and in the course of attempting to provide a reasonable answer for “What have you been doing lately?”, I said that I had been doing a lot of reviews, mostly because of my newfound duties as XPCOM module owner. My conversational partner responded […]

table-driven register reading in rr

03-Nov-14

Many of the changes done for porting rr to x86-64 were straightforward, mechanical changes: change this type or format directive, add a template parameter to this function, search-and-replace all SYS_* occurrences and so forth. But the way register reading for rr’s GDB stub fell out was actually a marked improvement on what went before and […]

porting rr to x86-64

30-Oct-14

(TL;DR: rr from git can record and replay 64-bit programs.  Try it for yourself!) Over the last several months, I’ve been devoting an ever-increasing amount of my time to making rr able to trace x86-64 programs.  I’ve learned a lot along the way and thought I’d lay out all the major pieces of work that […]