This is similar to the work done in <https://bugs.webkit.org/show_bug.cgi?id=189768> - "Add functions to measure memory footprint to JSC", extending it to a command line option. Use of this option would dump the peak and current footprint when processing a script is completed.
<rdar://problem/47273045>
Created attachment 359114 [details] Patch
Comment on attachment 359114 [details] Patch r=me
Comment on attachment 359114 [details] Patch Clearing flags on attachment: 359114 Committed r239969: <https://trac.webkit.org/changeset/239969>
All reviewed patches have been landed. Closing bug.
I submitted a patch in https://bugs.webkit.org/show_bug.cgi?id=193441 to fix the printf()-related warnings.