We have implemented categorization in spacetrace. This is similar to the stacktrace based rule matching that brendan/waterson did but does it more in the context of the spacetrace tool. With this spacetrace will let you focus on a particular category.
I took a first stab at the rules file. Owners please help refine it. http://lxr.mozilla.org/mozilla/source/tools/trace-malloc/rules.txt The categorization is not exact but gives more than a ballpark - optimized for speed. I have attached the report it generated (formatted to text). NOTE: I will post more accurate categorized data betn testgtkembed and mozilla later. This is data I collected about a week ago at two different points. So dont compare them too much. TestGtkEmbed: All [ 5,144,384 size, 100.0%, 48,422 allocations ] -------------------------------------------------------------------- html [ 1,004,088 size, 19.5%, 9,423 allocations ] images [ 847,240 size, 16.5%, 481 allocations ] xpcom [ 675,104 size, 13.1%, 7,852 allocations ] necko [ 345,088 size, 6.7%, 1,512 allocations ] font [ 329,160 size, 6.4%, 5,585 allocations ] css [ 313,704 size, 6.1%, 5,289 allocations ] uncategorized [ 289,688 size, 5.6%, 3,361 allocations ] js [ 212,800 size, 4.1%, 3,270 allocations ] global-history [ 172,920 size, 3.4%, 65 allocations ] X [ 151,648 size, 2.9%, 2,414 allocations ] jar [ 134,080 size, 2.6%, 122 allocations ] xbl [ 126,976 size, 2.5%, 2,148 allocations ] intl [ 118,592 size, 2.3%, 2,646 allocations ] preferences [ 108,352 size, 2.1%, 822 allocations ] dom [ 88,208 size, 1.7%, 1,062 allocations ] atoms [ 63,192 size, 1.2%, 861 allocations ] rdf [ 55,776 size, 1.1%, 364 allocations ] gtk [ 54,432 size, 1.1%, 388 allocations ] js-catchall [ 31,848 size, 0.6%, 329 allocations ] xul [ 20,792 size, 0.4%, 417 allocations ] necko-uri [ 568 size, 0.0%, 7 allocations ] bookmarks [ 128 size, 0.0%, 4 allocations ] Mozilla All [ 10,159,816 size, 100.0%, 125,013 allocations ] --------------------------------------------------------------------- js [ 1,581,008 size, 15.6%, 22,422 allocations ] html [ 1,255,000 size, 12.4%, 10,489 allocations ] xbl [ 1,198,640 size, 11.8%, 19,762 allocations ] xul [ 900,912 size, 8.9%, 15,556 allocations ] css [ 873,672 size, 8.6%, 15,613 allocations ] images [ 818,368 size, 8.1%, 1,064 allocations ] xpcom [ 780,936 size, 7.7%, 7,957 allocations ] uncategorized [ 445,608 size, 4.4%, 6,287 allocations ] js-catchall [ 367,760 size, 3.6%, 6,892 allocations ] necko [ 353,192 size, 3.5%, 1,857 allocations ] font [ 334,400 size, 3.3%, 5,684 allocations ] jar [ 234,208 size, 2.3%, 256 allocations ] rdf [ 190,704 size, 1.9%, 1,686 allocations ] global-history [ 172,952 size, 1.7%, 65 allocations ] X [ 162,328 size, 1.6%, 2,427 allocations ] dom [ 141,736 size, 1.4%, 1,775 allocations ] intl [ 130,768 size, 1.3%, 2,822 allocations ] preferences [ 114,472 size, 1.1%, 1,021 allocations ] gtk [ 52,544 size, 0.5%, 392 allocations ] atoms [ 38,600 size, 0.4%, 859 allocations ] bookmarks [ 7,216 size, 0.1%, 74 allocations ] necko-uri [ 4,792 size, 0.0%, 53 allocations ]
