зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1671114 - pt 1. Report committed memory in logalloc-replay r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D93473
This commit is contained in:
Родитель
038b637268
Коммит
fd20b8a605
|
@ -4327,11 +4327,13 @@ inline void MozJemalloc::jemalloc_stats_internal(
|
|||
MOZ_ASSERT(arena_mapped >= arena_committed);
|
||||
MOZ_ASSERT(arena_committed >= arena_allocated + arena_dirty);
|
||||
|
||||
// "waste" is committed memory that is neither dirty nor
|
||||
// allocated.
|
||||
aStats->mapped += arena_mapped;
|
||||
aStats->allocated += arena_allocated;
|
||||
aStats->page_cache += arena_dirty;
|
||||
// "waste" is committed memory that is neither dirty nor
|
||||
// allocated. If you change this definition please update
|
||||
// memory/replace/logalloc/replay/Replay.cpp's jemalloc_stats calculation of
|
||||
// committed.
|
||||
aStats->waste += arena_committed - arena_allocated - arena_dirty -
|
||||
arena_unused - arena_headers;
|
||||
aStats->bin_unused += arena_unused;
|
||||
|
|
|
@ -496,11 +496,17 @@ class Replay {
|
|||
}
|
||||
}
|
||||
|
||||
// This formula corresponds to the calculation of wasted (from committed and
|
||||
// the other parameters) within jemalloc_stats()
|
||||
size_t committed = stats.allocated + stats.waste + stats.page_cache +
|
||||
stats.bookkeeping + stats.bin_unused;
|
||||
|
||||
FdPrintf(mStdErr, "\n");
|
||||
FdPrintf(mStdErr, "Objects: %9zu\n", num_objects);
|
||||
FdPrintf(mStdErr, "Slots: %9zu\n", mNumUsedSlots);
|
||||
FdPrintf(mStdErr, "Ops: %9zu\n", mOps);
|
||||
FdPrintf(mStdErr, "mapped: %9zu\n", stats.mapped);
|
||||
FdPrintf(mStdErr, "committed: %9zu\n", committed);
|
||||
FdPrintf(mStdErr, "allocated: %9zu\n", stats.allocated);
|
||||
FdPrintf(mStdErr, "waste: %9zu\n", stats.waste);
|
||||
FdPrintf(mStdErr, "dirty: %9zu\n", stats.page_cache);
|
||||
|
|
Загрузка…
Ссылка в новой задаче