logalloc-replay doesn't calculate RSS properly
Categories
(Core :: Memory Allocator, defect)
Tracking
()
Tracking | Status | |
---|---|---|
firefox91 | --- | fixed |
People
(Reporter: pbone, Assigned: pbone)
References
Details
Attachments
(2 files, 1 obsolete file)
We calculate RSS by parsing /proc/smaps
. So that we can calculate the RSS of the malloc implementation only we do an initial pass of /proc/smaps
as the program starts which we can use to exclude unrelated maps such as data segments belonging to shared libraries. However the system libc calls malloc (on both shared and static linking paths) causing jemalloc to allocate a chunk of memory before we have a chance to make our initial pass of /proc/smaps
.
Assignee | ||
Comment 1•3 years ago
|
||
Assignee | ||
Comment 2•3 years ago
|
||
isspace requires data in libc to be initialised. If we're parsing
/proc/smaps before libc has initialised we need to provide our own
implementation.
Depends on D116337
Assignee | ||
Comment 3•3 years ago
|
||
Use a weak linkage function pointer to gain control before
malloc_init_hard() runs. Use this to capture the initial memory maps.
This can occur before dynamic C++ initialisation so we have to be careful
what data we access.
Depends on D116338
Updated•3 years ago
|
Updated•3 years ago
|
Comment 5•3 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/1b63f9b29728
https://hg.mozilla.org/mozilla-central/rev/1cfda2726fab
Description
•