I would like to see a log of all the emacs lisp function calls made during an emacs session.
I want to know exactly what the interpreter is doing. How can "intercept" the interpreter's REPL, if that makes any sense?
With strace I can attach to the emacs process and see all the system calls. But I need higher level information about which lisp functions are actually responsible.
As an aside, the motivation for this is to debug a problem in my emacs session where the emacs process keeps listening on a socket that is forever unavailable:
recvfrom(4, 0xbd4754, 4096, 0, 0, 0) = -1 EAGAIN (Resource temporarily unavailable)
# netstat -p |grep 14854
unix 3 [ ] STREAM CONNECTED 14854 3040/emacs
You can try M-x profile-start RET RET ... M-x profile-report RET
. It won't give you a complete trace, but it will show you the call tree for any function that lasted enough time.
BTW, I have no idea what problem you're trying to track. Calling recvfrom and getting EAGAIN over and over again might be completely normal.
The Elisp info manual comes with a node
18.2.12 Trace Buffer
As stuff mentioned relies on edebug, should be a way to work from trace-point to trace-point and eventually kill.
WRT to logging, that might be done already with trace-function
from trace.el.
_
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With