- How do I best understand what I’m seeing?Â (Most of the codebase is brand new to me…)
- How do I share the data with others in a way that is both comprehensible and allows them to draw their own conclusions from the data?
- What can I do to reduce the effort required to work on performance problems?
I was tempted to just try and just dig into the system so I could have something to show immediately, but I knew it would still take a while to see the big picture just using an editor/ctags/lxr/opengrok, even informed by dtrace.Â And even then, that big picture doesn’t scale well; whatever picture I managed to formulate would be stuck inside my head…
So what can it do so far?Â You can go try it for yourself if you like as long as you keep your expectations very low and realize the current state does not reflect all of the bullet points below.Â Also, you probably want firefox 3.0.Â Or you can read my bullet points:
- Parse custom DTrace script output!Â The Mozilla DTrace probe points could probably use a little love to improve what we are able to get out.Â Also, I think it’s betraying us somewhere.
- Visualize some stuff!Â Inter-file relationship graph in the overview.Â In the code and ‘Funcs’ sidebar tab you get a sparkbar where each bar represents a time interval.Â The height of the par is the percentage of possible time we could have spent in that time interval.Â Red means we belive that time was spent in the function itself, green means we think we spent that time in calls to other functions. [Yay visophyte!]
- Navigate with history!Â Click on the overview graph and you go to things.Â Click on the file names in the ‘Files’ list and you go to the files.Â I tried to make it so you could click on function names in the side bars to go to them, but jquery.scrollTo and/or firefox 3.0b5 had serious crashing issues.Â [Yay jquery, jquery.history!]
- See syntax-highlighted code with random headings intertwined (shows the parser worked) and potentially a visualization.Â [Yay pygments!]
My hope in the near-term is to fix the outright bugs (parsing issues), get XBL going, and then augment the function information with more trace-derived data including more traditional call-stacks, etc.Â Then the tool should be sufficiently usable that my immediate focus can change to creating automated tests to actually gather performance/execution traces so we can use the tool for what I started it for.Â This may also get shelved for a while if it turns out that we need action (patches) immediately.