build symbol analysis tool to monitor template code bloat




JavaScript Engine
9 years ago
4 years ago


(Reporter: luke, Unassigned)


Firefox Tracking Flags

(Not tracked)




9 years ago
Recent patches (bug 200505, bug 506410) are introducing STL-style containers into the JS engine for great performance wins.  Unchecked, templates can produce a lot of code which can indirectly reduce these wins or other badness.  There are techniques to combat this, but they involve writing more code and often "ungenericizing" things, which can reduce some of the template performance benefits.  Hence, we should build a tool that provides clear information on how much code is being generated so that we can go about fighting it on an as-needed basis.  At the moment there are only a handful of instantiations, so we can accept this as a "baseline" against which to monitor future growth.

Ideally, a tool would analyze a binary with symbols, like the js/shell, and, at the minimum, produce for each template function or member function of template class:
 - the number of instantiations
 - an argument tuple for each instantiation
 - the average binary size of each instantiation (I'm assuming low variance, but I could be wrong)


4 years ago
Assignee: general → nobody
You need to log in before you can comment on or make changes to this bug.