mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-21 01:05:45 +00:00
fb0b046a21
Example output from the Obama Wikipedia page: > ├──2,315,600 B (01.16%) -- stylist > │ ├──1,916,928 B (00.96%) ── invalidation-map > │ ├────228,800 B (00.11%) ── rule-tree > │ ├────142,336 B (00.07%) ── element-and-pseudos-maps > │ ├─────14,336 B (00.01%) ── revalidation-selectors > │ ├──────9,648 B (00.00%) ── other > │ └──────3,552 B (00.00%) ── precomputed-pseudos This change requires new code to measure HashMaps, which uses the new 'malloc_enclosing_size_of' functions that can measure a heap block from an interior pointer. The patch changes MallocSizeOfFn to a newtype, and introduces MallocEnclosingSizeOfFn alongside. It also adds new traits: MallocSizeOfBox, MallocSizeOfVec, MallocSizeOfHash. These each contain a single method that does shallow measurement of the relevant type, which is often useful. (This is a different style to the existing MallocSizeOf trait, which does deep measurement, but I'm moving away from the always-deep-measurement style because it's less flexible.) MozReview-Commit-ID: FgJCCmdw0ZF --HG-- extra : rebase_source : c692c2073aa66020224489b97247c49de95a99a4 |
||
---|---|---|
.. | ||
base | ||
build | ||
doc | ||
forms | ||
generic | ||
inspector | ||
ipc | ||
mathml | ||
media | ||
painting | ||
printing | ||
reftests | ||
style | ||
svg | ||
tables | ||
tools | ||
xul | ||
moz.build |