Ah yep, that would do it. Just be sure to have the script check the username, because even if you're on a single-user system the gdm user also runs a gnome-shell:
#!/bin/sh if [ $USER = your_username_here ] ; then exec valgrind --tool=massif --num-callers=32 --log-file=/tmp/gnome-shell.valgrind.log.%p $0.bin $* ; fi exec $0.bin $* I ran this and experimented with all the usual applications. Valgrind's RSS was growing slowly as you'd expect until I played a video, then it exploded to > 6 GiB and Wayland hung. I killed Valgrind with -HUP and it did produce a valid profile (attached). Please check if this is what you are after. I'm now running it again but won't test video playback this time. ** Attachment added: "Valgrind Massif profile of leak during normal use and video playback" https://bugs.launchpad.net/ubuntu/+source/gnome-shell/+bug/1672297/+attachment/5002841/+files/massif.out.1684 -- You received this bug notification because you are a member of Ubuntu Desktop Bugs, which is subscribed to gnome-shell in Ubuntu. https://bugs.launchpad.net/bugs/1672297 Title: gnome-shell uses lots of memory, and grows over time To manage notifications about this bug go to: https://bugs.launchpad.net/gnome-shell/+bug/1672297/+subscriptions -- desktop-bugs mailing list desktop-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/desktop-bugs