Now that we have a Gjs profiler we can start looking at doing some fun things with it.
Today I wrote a couple line patch to GNOME Shell to toggle on and off the profiler using SIGUSR2. So if you build Gjs and gnome-shell with the appropriate patches, you can do something like:
gnome-shell --wayland # .. inside shell kill -SIGUSR2 <pid> # .. exercise shell a bit kill -SIGUSR2 <pid> # .. now look at /tmp/gjs-profile-$pid
If you open that file up with my Sysprof improvements, you can browse around the profile information containing JavaScript stacks.
It looks something like this.
Happy bug hunting!