Make MOZ_PROFILER_STARTUP_ENTRIES understand sizes with units, e.g. "64MB"
Categories
(Core :: Gecko Profiler, enhancement, P3)
Tracking
()
Tracking | Status | |
---|---|---|
firefox96 | --- | fixed |
People
(Reporter: mozbugz, Assigned: neel)
Details
(Keywords: good-first-bug)
Attachments
(1 file)
MOZ_PROFILER_STARTUP_ENTRIES takes a number of "entries", and converts them to bytes (8 per entry).
With the big buffer we want these days, and this entry-to-bytes conversion, it can be difficult to quickly enter a size.
E.g., 512MB: MOZ_PROFILER_STARTUP_ENTRIES=67108864
.
I think it should be possible to parse numbers with some expected units, e.g.: "512MB", "512MiB" (currently these will be equivalent because we round up to the next power of 2), "2GB"...
I don't think we need to have a unit for entries, like "64M" could be interpreted as 64 million entries (which equals 512 megabytes), I want to make "entries" obsolete eventually.
Optional: Consider having a new env-var called "MOZ_PROFILER_STARTUP_MAX_BUFFER_SIZE", which would be more correct, as we don't allocate all of it at once anymore.
Reporter | ||
Comment 1•4 years ago
|
||
And bonus: Convert these big numbers back to numbers-with-units strings, this could be used to show friendly defaults in MOZ_PROFILER_HELP=1
.
Assignee | ||
Comment 2•3 years ago
|
||
Updated•3 years ago
|
Updated•3 years ago
|
Updated•3 years ago
|
Pushed by gsquelart@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/5e6c082f582e Make MOZ_PROFILER_STARTUP_ENTRIES understand sizes with units r=gerald
Comment 4•3 years ago
|
||
bugherder |
Description
•