Last Comment Bug 748444 - eliminate relocations required by gHistograms
: eliminate relocations required by gHistograms
Status: RESOLVED FIXED
:
Product: Toolkit
Classification: Components
Component: Telemetry (show other bugs)
: unspecified
: All All
: -- normal (vote)
: mozilla18
Assigned To: Nathan Froyd [:froydnj]
:
: Georg Fritzsche [:gfritzsche]
Mentors:
Depends on: 748417
Blocks:
  Show dependency treegraph
 
Reported: 2012-04-24 10:46 PDT by Nathan Froyd [:froydnj]
Modified: 2012-08-30 03:54 PDT (History)
1 user (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
patch (6.77 KB, patch)
2012-08-29 08:59 PDT, Nathan Froyd [:froydnj]
taras.mozilla: review+
Details | Diff | Splinter Review

Description Nathan Froyd [:froydnj] 2012-04-24 10:46:13 PDT
bug 748417 is going to write a python script to parse TelemetryHistograms.h.  Once that's written, we should use the script to generate gHistograms at compile time; doing that will enable eliminating the pointers to names and descriptions (can simply use indices into a global char[] instead), reducing relocations and footprint.
Comment 1 Nathan Froyd [:froydnj] 2012-08-29 08:59:00 PDT
Created attachment 656475 [details] [diff] [review]
patch

I realize StringTable is a little overkill, but I copied the code directly from quickstubs, so I know it works, and if we start annotating histograms with units, we'll need something like StringTable anyway.  So I'd like to keep it around.
Comment 2 (dormant account) 2012-08-29 10:07:39 PDT
Comment on attachment 656475 [details] [diff] [review]
patch

rubberstamp
Comment 3 (dormant account) 2012-08-29 10:08:22 PDT
What are the footprint wins here?
Comment 4 Nathan Froyd [:froydnj] 2012-08-29 10:18:11 PDT
(In reply to Taras Glek (:taras) from comment #3)
> What are the footprint wins here?

N histograms * (2 relocations + 1 word).  More than 1k bytes, less than 10k bytes on x86/ARM Linux.  Might be the same range for x86-64/Linux.  I imagine it's roughly the same on Windows and OS X, but not really sure.
Comment 6 Ed Morley [:emorley] 2012-08-30 03:54:56 PDT
https://hg.mozilla.org/mozilla-central/rev/a8b7d2524e94

Note You need to log in before you can comment on or make changes to this bug.