DTrace Mozilla - [RFE] Dynamic Tracing Framework for Mozilla landed :)

Happy days - the basic framework patch [#370906] for the tracing framework in mozilla has landed in CVS head :)

I've built and put up a refreshed patch for the Browser load and dns lookup probes that work with the new framework. To test them you can run the browserspy_time_all.d script as before.

Next steps are to get the various probes themselves added, including the JavaScript probes, the load and dnslookup probes and other probes that various community members want such as Robert Sayre's xpc wrapped javascript class probes and Benjamin Smedberg's cycle collection probes.

If you want to play with the probes, you can just build firefox from cvs and apply the load and dns patch from above, no need to apply the framework patch anymore :) Note the JavaScript patch currently needs a little tlc to get it to apply cleanly to head, job for next week, sooner it's landed the better ;)

Steps to build Firefox from CVS on Solaris (nevada b74). Note: when I built from head today the browser core'd on startup, the following patch sorts it. I'm sure they'll fix it in head shortly, but if you see cores this could help, I know it saved my bacon, thanks to Ginn Chen for pointing it out to me :) disconnect_handlers_and_prevent_unloading_v1.1

GET SOURCE
export CVSROOT=":pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot"
cvs co mozilla/client.mk
cd mozilla/
gmake -f client.mk checkout MOZ_CO_PROJECT=browser

Create .mozconfig under mozilla:
cat mozilla/.mozconfig:

ac_add_options --enable-xft
ac_add_options --disable-freetype2
ac_add_options --disable-tests
ac_add_options --disable-debug
ac_add_options --enable-svg
ac_add_options --enable-canvas
ac_add_options --enable-optimize
ac_add_options --enable-xinerama
ac_add_options --disable-auto-deps
ac_add_options --enable-application=browser
. $topsrcdir/browser/config/mozconfig

Patch Source for Load Probes
https://bugzilla.mozilla.org/attachment.cgi?id=284484

Save above patch to mozilla-probe.patch, in mozilla dir:
gpatch -p0 -i mozilla-probe.patch


Setup Build Environment (on Solaris - nevada b74)
export LD_LIBRARY_PATH=/usr/sfw/lib
export CC="/opt/SUNWspro/bin/cc"
export CXX="/opt/SUNWspro/bin/CC"
export CFLAGS="-xlibmil"
export CXXFLAGS="-xlibmil -xlibmopt -features=tmplife -norunpath"
export LDFLAGS="-R'\\$\\$ORIGIN:\\$\\$ORIGIN/..' -R/usr/sfw/lib"

BUILD
/usr/autoconf-2.13/bin/autoconf
./configure --enable-dtrace
gmake

RUN
export LD_LIBRARY_PATH=".:/usr/sfw/lib"
cd dist/bin
./firefox & 

Test
List probes: dtrace -lP "moz\*"
Get timings: ./browserspy_time_all.d

Comments:

This is cool !

Posted by Shiv on October 16, 2007 at 09:31 PM IST #

What's the chance that these probes and the fixes found by the probes will go into the version of Mozilla in Solaris 10?

Posted by SunTzuTech on October 17, 2007 at 05:49 AM IST #

Post a Comment:
Comments are closed for this entry.
About

jmr

Search

Top Tags
Categories
Archives
« April 2014
MonTueWedThuFriSatSun
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
    
       
Today