Haven't worked with Valgrind in a while, and never on MacOS, so not sure. A quick glance at online documentation
here and
here shows the latest mentioned versions to be a bit old (10.12 and 10.15, I'm running 11.6.7 on my machine). But if you recommend it I'll take a better look.
I was referring to this portion of the manual:
link. It seems Emacs is pretty well integrated with gprof. But on Mac I couldn't configure it with the
--enable-profiling option; I get this error:
clang: error: the clang compiler does not support -pg option on versions of OS X 10.9 and later.