Loading about 20 tabs with lots of caching, see the Load Image and Load Requests below ========================================================================================= LOAD PROBE STATS: Total start loadImage's called 696 Total start imageRequest's called 205 Total done imageRequest's called 203 bash-3.00$ browserspy_time_image.d Tracing Browser Network Activity... Hit Ctrl-C to end. ^C URI structure: ://:@://.;?# Browser requests by scheme, PID UID COUNT AVG(msec) SUM(msec) SCHEME 10955 65535 2 0 0 jar 10955 65535 17 0 2 moz-anno 10955 65535 4 0 3 https 10955 65535 7 2 17 file 10955 65535 175 1 202 http Browser requests by content type, PID UID COUNT AVG(msec) SUM(msec) CONTENT_TYPE 10955 65535 1 0 0 image/php 10955 65535 8 0 2 image/ico 10955 65535 25 0 6 image/unknown 10955 65535 31 1 52 image/png 10955 65535 9 10 73 image/jpg 10955 65535 131 0 91 image/gif Browser requests by username (if used), PID UID COUNT AVG(msec) SUM(msec) USERNAME 10955 65535 205 1 225 Browser requests by file extension, PID UID COUNT AVG(msec) SUM(msec) FILE_EXT 10955 65535 1 0 0 php 10955 65535 8 0 2 ico 10955 65535 25 0 6 10955 65535 31 1 52 png 10955 65535 9 10 73 jpg 10955 65535 131 0 91 gif Browser requests by host, PID UID COUNT AVG(msec) SUM(msec) HOST 10955 65535 1 0 0 www.suselinuxsupport.de 10955 65535 1 0 0 slynkr.sunwarp.net 10955 65535 1 0 0 ads.sun.com 10955 65535 1 0 0 creativecommons.org 10955 65535 4 0 0 www.sun.com 10955 65535 2 0 0 www.google-analytics.com 10955 65535 1 0 0 bugzilla.mozilla.org 10955 65535 1 0 0 static.technorati.com 10955 65535 2 0 1 sunopensolaris.112.2o7.net 10955 65535 2 0 1 www.google.ie 10955 65535 3 0 1 sunglobal.112.2o7.net 10955 65535 9 0 3 groups.google.com 10955 65535 13 0 3 www.opensolaris.org 10955 65535 5 0 4 blog.mozilla.com 10955 65535 2 5 10 www.makepovertyhistory.org 10955 65535 23 0 11 forums.suselinuxsupport.de 10955 65535 12 0 11 i.ixnp.com 10955 65535 30 0 16 blogs.sun.com 10955 65535 26 0 19 10955 65535 22 1 30 www.mozilla.org 10955 65535 25 1 37 docs.sun.com 10955 65535 19 3 69 www.abercornbasin.com Top 10 sites, PID UID COUNT AVG(msec) SUM(msec) SITE 10955 65535 1 0 0 moz-anno:favicon:http://www.mozilla.org/2005/made-up-favicon/133-1321718550 10955 65535 1 0 0 moz-anno:favicon:http://www.mozilla.org/2005/made-up-favicon/178-1321865092 10955 65535 1 0 0 moz-anno:favicon:http://www.mozilla.org/2005/made-up-favicon/76-1321412015 10955 65535 1 0 0 moz-anno:favicon:http://www.mozilla.org/2005/made-up-favicon/83-1321462309 10955 65535 1 0 0 moz-anno:favicon:http://www.mozilla.org/2005/made-up-favicon/84-1321463278 10955 65535 1 0 0 moz-anno:favicon:http://www.mozilla.org/images/mozilla-16.png 10955 65535 1 0 0 moz-anno:favicon:http://www.opensolaris.org/favicon.ico 10955 65535 1 0 0 moz-anno:favicon:http://www.suselinuxsupport.de/favicon.ico 10955 65535 1 0 0 moz-anno:favicon:http://www.w3schools.com/favicon.ico 10955 65535 1 0 0 moz-anno:favicon:https://bugzilla.mozilla.org/mozilla-16.png 10955 65535 0 3 3 file:///usr/share/doc/soldevex/html/images/gnome_devtools.gif 10955 65535 0 3 3 http://www.makepovertyhistory.org/whiteband_mphtranslinkimg.gif 10955 65535 0 3 3 http://blogs.sun.com/peteh/resource/images/blog_pacifico_h1_full_wide.gif 10955 65535 0 4 4 http://forums.suselinuxsupport.de/style_images/slforums/logo4.png 10955 65535 0 4 4 file:///usr/share/doc/soldevex/html/images/Solaris.gif 10955 65535 0 7 7 http://www.makepovertyhistory.org/whiteband_small_right.gif 10955 65535 0 7 7 file:///usr/share/doc/soldevex/html/images/New_Prod_Banner.jpg 10955 65535 0 12 12 http://www.mozilla.org/images/header_tab.gif 10955 65535 0 26 26 http://docs.sun.com/app/images/shadow_box.png 10955 65535 0 62 62 http://www.abercornbasin.com/items/ar02_eflyer.jpg Loading http://www.smh.com.au/ with little or no caching, see the Load Image and Load Requests below ====================================================================================================== LOAD PROBE STATS: Total start loadImage's called 99 Total start imageRequest's called 87 Total done imageRequest's called 82 bash-3.00$ bash-3.00$ browserspy_time_image.d Tracing Browser Network Activity... Hit Ctrl-C to end. ^C URI structure: ://:@://.;?# Browser requests by scheme, PID UID COUNT AVG(msec) SUM(msec) SCHEME 10955 65535 1 0 0 jar 10955 65535 4 0 0 moz-anno 10955 65535 82 14 1135 http Browser requests by content type, PID UID COUNT AVG(msec) SUM(msec) CONTENT_TYPE 10955 65535 6 0 1 image/unknown 10955 65535 4 2 10 image/png 10955 65535 1 85 85 image/img 10955 65535 42 5 207 image/jpg 10955 65535 34 25 830 image/gif Browser requests by username (if used), PID UID COUNT AVG(msec) SUM(msec) USERNAME 10955 65535 87 13 1136 Browser requests by file extension, PID UID COUNT AVG(msec) SUM(msec) FILE_EXT 10955 65535 6 0 1 10955 65535 4 2 10 png 10955 65535 1 85 85 img 10955 65535 42 5 207 jpg 10955 65535 34 25 830 gif Browser requests by host, PID UID COUNT AVG(msec) SUM(msec) HOST 10955 65535 1 0 0 smh.com.au 10955 65535 1 0 0 www.rsvp.com.au 10955 65535 6 0 0 unstable.elemental.com 10955 65535 1 0 0 secure-au.imrworldwide.com 10955 65535 1 0 0 samples.fairfax.com.au 10955 65535 1 0 0 f2nsmh.112.2o7.net 10955 65535 5 0 1 10955 65535 1 85 85 chart.bigcharts.com 10955 65535 59 7 410 www.smh.com.au 10955 65535 11 63 636 fdimages.fairfax.com.au Top 10 sites, PID UID COUNT AVG(msec) SUM(msec) SITE 10955 65535 1 0 0 http://www.smh.com.au/images/classifieds/homepage/mastheads_smh.jpg 10955 65535 1 0 0 http://www.smh.com.au/ssi/breaking_news.jpg?rid=31650 10955 65535 1 0 0 http://www.smh.com.au/ssi/entertainment.jpg?rid=31642 10955 65535 1 0 0 http://www.smh.com.au/ssi/life_and_style.jpg?rid=31516 10955 65535 1 0 0 http://www.smh.com.au/ssi/whats_on.jpg?rid=31598 10955 65535 1 0 0 jar:file:///export/home/jr140578/work/mozilla/dist/bin/chrome/classic.jar!/skin/classic/mozapps/places/defaultFavicon.png 10955 65535 1 0 0 moz-anno:favicon:http://blogs.sun.com/roller/resources/alanc/favicon.ico 10955 65535 1 0 0 moz-anno:favicon:http://pastebin.mozilla.org/favicon.ico 10955 65535 1 0 0 moz-anno:favicon:http://www.google.com/favicon.ico 10955 65535 1 0 0 moz-anno:favicon:http://www.smh.com.au/favicon.ico 10955 65535 0 20 20 http://www.smh.com.au/ffximage/2007/09/13/plasma_tv,1.jpg 10955 65535 0 23 23 http://www.smh.com.au/css/images/li_sprites.gif 10955 65535 0 27 27 http://www.smh.com.au/ffximage/2007/09/13/th_clivejames_med-thumb__90x60.jpg 10955 65535 0 40 40 http://www.smh.com.au/ffximage/2007/09/13/hypnotism_thumb,1.jpg 10955 65535 0 43 43 http://www.smh.com.au/ffximage/2007/09/13/th_jamesblunt_med-thumb__90x60.jpg 10955 65535 0 51 51 http://www.smh.com.au/css/img/bg_weather.gif 10955 65535 0 75 75 http://www.smh.com.au/css/img/bgHomepage.gif 10955 65535 0 85 85 http://chart.bigcharts.com/custom/fairfax-com-au/index-182.img?symb=xao 10955 65535 0 311 311 http://fdimages.fairfax.com.au/crtvs/amEx-30x180_030807.gif 10955 65535 0 318 318 http://fdimages.fairfax.com.au/crtvs/080607_ANZ_CarLoans_Build_100x29.gif PROBE Listing: ================= dtrace -n 'moz*::: { @[probefunc, ustack(2)] = count(); } tick-10sec{exit(0);} dtrace: description 'moz*::: ' matched 8 probes CPU ID FUNCTION:NAME 1 72047 :tick-10sec mozdtrace_load_start libxul.so`mozdtrace_load_start+0x8c libxul.so`unsigned nsDocShell::DoURILoad(nsIURI*,nsIURI*,int,nsISupports*,const char*,nsIInputStream*,nsIInputStream*,int,nsIDocShell**,nsIRequest**,int)+0x6f4 1 unsigned imgRequest::OnStartRequest(nsIRequest*,nsISupports*) libxul.so`unsigned imgRequest::OnStartRequest(nsIRequest*,nsISupports*)+0x12c libxul.so`unsigned ProxyListener::OnStartRequest(nsIRequest*,nsISupports*)+0x1e3 6 mozdtrace_load_image_request_done libxul.so`mozdtrace_load_image_request_done+0xe3 libxul.so`unsigned imgRequest::OnStopRequest(nsIRequest*,nsISupports*,unsigned)+0x199 6 mozdtrace_load_done libxul.so`mozdtrace_load_done+0x8c libxul.so`unsigned nsDocShell::EndPageLoad(nsIWebProgress*,nsIChannel*,unsigned)+0x178 7 mozdtrace_load_image_start libxul.so`mozdtrace_load_image_start+0x96 libxul.so`unsigned imgLoader::LoadImage(nsIURI*,nsIURI*,nsIURI*,nsILoadGroup*,imgIDecoderObserver*,nsISupports*,unsigned,nsISupports*,imgIRequest*,imgIRequest**)+0x55 8 Current Script for Images: ============================ #!/usr/sbin/dtrace -CZs /* * browserspy_uri.d - trace and report browser URI requests. * * URI structure - spec: * ://:@://.;?# * * Probes: * mozilla:::load-start * mozilla:::load-done * * Args: * arg0 is of type void * - unique_id * arg1 is an enum nsTraceLoadType - TYPE_URI or TYPE_IMAGE * arg2 is of type struct nsTraceLoadInfo * - pointer to the URI info * */ #pragma D option quiet /* Any member of nsTraceLoadInfo can be returned as "" except spec and scheme */ struct nsTraceLoadInfo { char * contentType; /* mime type e.g. text/html - can be */ char * spec; /* Complete URI of above structure */ char * prePath; /* scheme://user:password@host:port */ char * scheme; /* protocol - http, file ... */ char * userPass; /* username:password */ char * username; char * password; char * hostPort; /* host:port or just host if port = -1 */ char * host; int port; char * path; /* path = ;?# */ char * filePath; /* . */ char * fileName; /* */ char * fileExtension; /* */ char * param; char * query; char * ref; int imagestatus; }; enum nsTraceLoadType { TYPE_URI = 1, TYPE_IMAGE_LOAD, TYPE_IMAGE_REQUEST }; dtrace:::BEGIN { printf("Tracing Browser Network Activity... Hit Ctrl-C to end.\n"); top = 10; /* top sites to print */ } moz*:::load-start { type[pid, arg0] = arg1 == TYPE_IMAGE_REQUEST ? "IMAGE" : "URI"; } moz*:::load-start / arg1 == TYPE_IMAGE_LOAD/ { @["Total start loadImage's called"] = count(); } moz*:::load-start /type[pid, arg0] == "IMAGE"/ { @["Total start imageRequest's called"] = count(); this->info = (struct nsTraceLoadInfo *) copyin(arg2, sizeof (struct nsTraceLoadInfo)); @scheme[pid, uid, copyinstr((uintptr_t)this->info->scheme)] = count(); @site[pid, uid, copyinstr((uintptr_t)this->info->spec)] = count(); this->ct = copyinstr((uintptr_t)this->info->contentType) ; @ctype[pid, uid, this->ct == "" ? "":this->ct] = count(); this->fe = copyinstr((uintptr_t)this->info->fileExtension) ; @fext[pid, uid, this->fe == "" ? "":this->fe] = count(); this->un = copyinstr((uintptr_t)this->info->username) ; @user[pid, uid, this->un == "" ? "":this->un] = count(); this->hs = copyinstr((uintptr_t)this->info->host) ; @host[pid, uid, this->hs == "" ? "":this->hs] = count(); start[pid, arg0] = timestamp; } moz*:::load-done /start[pid, arg0] && type[pid, arg0] == "IMAGE"/ { @["Total done imageRequest's called"] = count(); this->elapsed = timestamp - start[pid, arg0]; this->info = (struct nsTraceLoadInfo *) copyin(arg2, sizeof (struct nsTraceLoadInfo)); @schemeavg[pid, uid, copyinstr((uintptr_t)this->info->scheme)] = avg(this->elapsed); @schemesum[pid, uid, copyinstr((uintptr_t)this->info->scheme)] = sum(this->elapsed); @siteavg[pid, uid, copyinstr((uintptr_t)this->info->spec)] = avg(this->elapsed); @sitesum[pid, uid, copyinstr((uintptr_t)this->info->spec)] = sum(this->elapsed); this->ct = copyinstr((uintptr_t)this->info->contentType); @ctypeavg[pid, uid, this->ct == "" ? "":this->ct] = avg(this->elapsed); @ctypesum[pid, uid, this->ct == "" ? "":this->ct] = sum(this->elapsed); this->fe = copyinstr((uintptr_t)this->info->fileExtension); @fextavg[pid, uid, this->fe == "" ? "":this->fe] = avg(this->elapsed); @fextsum[pid, uid, this->fe == "" ? "":this->fe] = sum(this->elapsed); this->un = copyinstr((uintptr_t)this->info->username); @useravg[pid, uid, this->un == "" ? "":this->un] = avg(this->elapsed); @usersum[pid, uid, this->un == "" ? "":this->un] = sum(this->elapsed); this->hs = copyinstr((uintptr_t)this->info->host); @hostavg[pid, uid, this->hs == "" ? "":this->hs] = avg(this->elapsed); @hostsum[pid, uid, this->hs == "" ? "":this->hs] = sum(this->elapsed); } moz*:::load-done /start[pid, arg0] && type[pid, arg0] == "IMAGE"/ { type[pid, arg0] = NULL; start[pid, arg0] = 0; } dtrace:::END { /* URI Stats */ printf("\nURI structure:\n"); printf("://:@://.;?#\n"); printf("\nBrowser requests by scheme,\n\n"); normalize(@schemeavg, 1000000); normalize(@schemesum, 1000000); setopt("aggsortpos", "2"); printf("%8s %8s %8s %11s %11s %-36s\n", "PID", "UID", "COUNT", "AVG(msec)", "SUM(msec)", "SCHEME"); printa("%8d %8d %@8d %@11d %@11d %-36s\n", @scheme, @schemeavg, @schemesum); printf("\nBrowser requests by content type,\n\n"); normalize(@ctypeavg, 1000000); normalize(@ctypesum, 1000000); printf("%8s %8s %8s %11s %11s %-36s\n", "PID", "UID", "COUNT", "AVG(msec)", "SUM(msec)", "CONTENT_TYPE"); printa("%8d %8d %@8d %@11d %@11d %-36s\n", @ctype, @ctypeavg, @ctypesum); printf("\nBrowser requests by username (if used),\n\n"); normalize(@useravg, 1000000); normalize(@usersum, 1000000); printf("%8s %8s %8s %11s %11s %-36s\n", "PID", "UID", "COUNT", "AVG(msec)", "SUM(msec)", "USERNAME"); printa("%8d %8d %@8d %@11d %@11d %-36s\n", @user, @useravg, @usersum); printf("\nBrowser requests by file extension,\n\n"); normalize(@fextavg, 1000000); normalize(@fextsum, 1000000); printf("%8s %8s %8s %11s %11s %-36s\n", "PID", "UID", "COUNT", "AVG(msec)", "SUM(msec)", "FILE_EXT"); printa("%8d %8d %@8d %@11d %@11d %-36s\n", @fext, @fextavg, @fextsum); printf("\nBrowser requests by host,\n\n"); normalize(@hostavg, 1000000); normalize(@hostsum, 1000000); printf("%8s %8s %8s %11s %11s %-36s\n", "PID", "UID", "COUNT", "AVG(msec)", "SUM(msec)", "HOST"); printa("%8d %8d %@8d %@11d %@11d %-36s\n", @host, @hostavg, @hostsum); trunc(@site, top); trunc(@siteavg, top); trunc(@sitesum, top); printf("\nTop %d sites,\n\n", top); normalize(@siteavg, 1000000); normalize(@sitesum, 1000000); printf("%8s %8s %8s %11s %11s %-36s\n", "PID", "UID", "COUNT", "AVG(msec)", "SUM(msec)", "SITE"); printa("%8d %8d %@8d %@11d %@11d %-36s\n", @site, @siteavg, @sitesum); printf("\nLOAD PROBE STATS:\n\n"); printa("%-25s %@10d\n", @); }