RESOLVED FIXED 200391
Implement memory monitoring functions for Linux OS
https://bugs.webkit.org/show_bug.cgi?id=200391
Summary Implement memory monitoring functions for Linux OS
Paulo Matos
Reported 2019-08-02 08:13:04 PDT
Implement memory monitoring functions for Linux OS
Attachments
Patch (2.35 KB, patch)
2019-08-02 08:13 PDT, Paulo Matos
no flags
Patch (5.90 KB, patch)
2019-09-04 01:49 PDT, Paulo Matos
no flags
Patch (5.97 KB, patch)
2019-09-20 06:42 PDT, Paulo Matos
no flags
Paulo Matos
Comment 1 2019-08-02 08:13:46 PDT
Paulo Matos
Comment 2 2019-08-02 08:17:26 PDT
I wanted to post this for review/discussion. Initially I discussed this with my colleague Caio and he suggested to get this in WTF, except WTF already contains memory management functions for Linux under ./Source/WTF/wtf/linux/MemoryFootprintLinux.cpp but for a completely different purpose. Initially my reason for implementing this was to get results out of JetStream2 benchmark with memory information when ran with runMode='RAMification'. I would like to know if this is something that upstream would like to keep in jsc.cpp or move somewhere else (maybe WTF), possibly even merging it with current functionality? Suggestions welcome.
Carlos Alberto Lopez Perez
Comment 3 2019-08-12 17:49:59 PDT
(In reply to Paulo Matos from comment #2) > I wanted to post this for review/discussion. Initially I discussed this with > my colleague Caio and he suggested to get this in WTF, except WTF already > contains memory management functions for Linux under > ./Source/WTF/wtf/linux/MemoryFootprintLinux.cpp but for a completely > different purpose. > > Initially my reason for implementing this was to get results out of > JetStream2 benchmark with memory information when ran with > runMode='RAMification'. > > I would like to know if this is something that upstream would like to keep > in jsc.cpp or move somewhere else (maybe WTF), possibly even merging it with > current functionality? Suggestions welcome. I think its reasonable to merge this with WTF/wtf/linux/MemoryFootprintLinux.cpp and share the code. For example, getCurrentMemoryUsage() can be implemented as returning ProcessMemoryStatus.resident after calling currentProcessMemoryStatus(ProcessMemoryStatus) Adding resetPeak() to MemoryFootprintLinux.cpp is also reasonable.
Paulo Matos
Comment 4 2019-09-03 04:52:59 PDT
Thanks Carlos for the comments. Sorry for the delay but I have been on holidays. I will submit a new patch later on with the changes you suggest.
Paulo Matos
Comment 5 2019-09-04 01:49:25 PDT
Zan Dobersek
Comment 6 2019-09-20 04:19:07 PDT
Comment on attachment 377965 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=377965&action=review Besides MemoryFootprintLinux.cpp, similar functionality also exists in bmalloc. At some point it would be nice to bring all this into a single place. > Source/WTF/wtf/linux/ProcessMemoryFootprint.h:30 > +#if OS(LINUX) > +#include <sys/resource.h> Nit: this would deserve an empty line in between. > Source/WTF/wtf/linux/ProcessMemoryFootprint.h:37 > + > + Nit: and this can do with a single empty line. > Source/WTF/wtf/linux/ProcessMemoryFootprint.h:46 > + return { ps.resident, static_cast<uint64_t>(ru.ru_maxrss)*1024 }; Nit: spaces around the multiplication operand.
Paulo Matos
Comment 7 2019-09-20 06:42:59 PDT
EWS
Comment 8 2019-09-20 06:48:57 PDT
Comment on attachment 379236 [details] Patch Rejecting attachment 379236 [details] from commit-queue. pmatos@igalia.com does not have committer permissions according to https://trac.webkit.org/browser/trunk/Tools/Scripts/webkitpy/common/config/contributors.json. - If you do not have committer rights please read http://webkit.org/coding/contributing.html for instructions on how to use bugzilla flags. - If you have committer rights please correct the error in Tools/Scripts/webkitpy/common/config/contributors.json by adding yourself to the file (no review needed). The commit-queue restarts itself every 2 hours. After restart the commit-queue will correctly respect your committer rights.
WebKit Commit Bot
Comment 9 2019-09-20 07:51:15 PDT
The commit-queue encountered the following flaky tests while processing attachment 379236 [details]: imported/w3c/web-platform-tests/websockets/bufferedAmount-unchanged-by-sync-xhr.any.worker.html bug 202003 (author: youennf@gmail.com) The commit-queue is continuing to process your patch.
WebKit Commit Bot
Comment 10 2019-09-20 07:51:25 PDT
The commit-queue encountered the following flaky tests while processing attachment 379236 [details]: fetch/fetch-worker-crash.html bug 187257 (author: youennf@gmail.com) The commit-queue is continuing to process your patch.
WebKit Commit Bot
Comment 11 2019-09-20 08:07:25 PDT
Comment on attachment 379236 [details] Patch Clearing flags on attachment: 379236 Committed r250129: <https://trac.webkit.org/changeset/250129>
WebKit Commit Bot
Comment 12 2019-09-20 08:07:27 PDT
All reviewed patches have been landed. Closing bug.
Radar WebKit Bug Importer
Comment 13 2019-09-20 08:08:16 PDT
Note You need to log in before you can comment on or make changes to this bug.