Closed Bug 500876 Opened 15 years ago Closed 6 years ago

Find the largest classes in Gecko

Categories

(Developer Infrastructure :: Source Code Analysis, enhancement)

enhancement
Not set
normal

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: jruderman, Unassigned)

References

Details

(Keywords: memory-footprint)

Pav is pretty sure that identifying the largest classes (in terms of sizeof) would lead us to some easy perf optimizations.
this seems like a variant of bug 492185. I'm not sure what you'll do once you find a big class(ie pretty much any class in editor/).
especially since most of the largest classes are singletons or otherwise pretty uninteresting
Keywords: footprint
i think having it be visible how big classes are would be helpful for people, and might lead us to spotting some useful information.
can gdb's sizeof() be trusted for this, are these true:

(gdb) p sizeof(nsDOMClassInfo)
$4 = 40
(gdb) p sizeof(nsCAutoString)
$5 = 96
(gdb) p sizeof(JSRuntime)
$6 = 2256

if these are true, gdb script can be created and then parsed.
Product: Core → Firefox Build System
We're not going to write a static analysis for this; if somebody is super-motivated, they can script gdb or write a dwarf groveller along the lines of comment 4.
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → WONTFIX
Product: Firefox Build System → Developer Infrastructure
You need to log in before you can comment on or make changes to this bug.