Closed Bug 1741196 Opened 4 years ago Closed 3 years ago

MemoryDistribution's C++ API would be clearer with `size_t` than `uint64_t`

Categories

(Toolkit :: Telemetry, task, P3)

task

Tracking

()

RESOLVED FIXED
104 Branch
Tracking Status
firefox104 --- fixed

People

(Reporter: chutten|RustWeek, Assigned: perry.mcmanis)

Details

(Whiteboard: [telemetry:fog:m?][good next bug])

Attachments

(1 file)

C++ has an explicit integral type for representing the sizes of things in memory: size_t. We should totally be taking that in MemoryDistribution::Accumulate instead of uint64_t.

(( In at least some cases they're the same width anyway, but let's not pass up a chance to use types to communicate with our users ))

Whiteboard: [telemetry:fog:m?] → [telemetry:fog:m?][good next bug]
Assignee: nobody → pmcmanis

GleanMemoryDistribution in rust/glean core is i64, should I also be updating that to usize so I can move this to size_t as well? https://searchfox.org/mozilla-central/source/toolkit/components/glean/bindings/private/MemoryDistribution.cpp#53

I can just leave it if we prefer m-c only changes or if it would not be appropriate to change in glean

Flags: needinfo?(chutten)

This is just for the FOG-side changes where we can break the API and fix the consumers all at once.

My recommendation is to file a follow-up for the Glean SDK to consider that change.

Flags: needinfo?(chutten)
Pushed by pmcmanis@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/2e6f8694537a Modify MemoryDistribution::Accumulate() to take size_t instead of u_int64 r=chutten
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 104 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: