Make gHistograms constexpr to remove its initializer

RESOLVED FIXED in Firefox 56

Status

()

enhancement
P1
normal
RESOLVED FIXED
2 years ago
2 years ago

People

(Reporter: dmajor, Assigned: dmajor)

Tracking

unspecified
mozilla56
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox56 fixed)

Details

Attachments

(1 attachment)

For whatever reason, MSVC is emitting a 230K function to initialize gHistograms at startup. It can be avoided by marking gHistograms as constexpr.
Posted patch patchSplinter Review
Assignee: nobody → dmajor
Attachment #8879299 - Flags: review?(gfritzsche)
Comment on attachment 8879299 [details] [diff] [review]
patch

Review of attachment 8879299 [details] [diff] [review]:
-----------------------------------------------------------------

Thanks!

This will enable properly doing the static asserts here:
https://dxr.mozilla.org/mozilla-central/rev/416c3c8c4b3db9ba96a103ce7820c9a140a3051d/toolkit/components/telemetry/TelemetryHistogram.cpp#1890

I'll file a follow-up on that.
Attachment #8879299 - Flags: review?(gfritzsche) → review+
Priority: -- → P2
Priority: P2 → P1

Comment 3

2 years ago
Pushed by dmajor@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/57a2424a75e8
Make gHistograms constexpr to remove its initializer. r=gfritzsche

Comment 4

2 years ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/57a2424a75e8
Status: NEW → RESOLVED
Last Resolved: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla56
You need to log in before you can comment on or make changes to this bug.