Regular methods and classmethods supported. No support for static methods. This is because the frame object doesn't refer to the function, only its code, which leaves no other option than to try to find self or cls in locals. The alternative of using the gc module is horrendously slow even in the same process and also impractical in a remote process.
I was experiencing unaligned memory reads in coredump::test::test_coredump locally, unrelated to my changes. I fixed it in a separate PR.
Regular methods and classmethods supported. No support for static methods. This is because the frame object doesn't refer to the function, only its code, which leaves no other option than to try to find
self
orcls
in locals. The alternative of using thegc
module is horrendously slow even in the same process and also impractical in a remote process.I was experiencing unaligned memory reads in
coredump::test::test_coredump
locally, unrelated to my changes. I fixed it in a separate PR.it works in the record mode:![image](https://github.com/benfred/py-spy/assets/43616133/da7e7adb-2615-4bcd-a95c-5d0d8f5ed117)