Re:Magic-trace – High-resolution traces of what a process is...
by gigatexal on Friday April 22, 2022 @02:25PM
(#31125917)
I’m probably missing something so apologies if this is obvious: does this only work on compiled programs or could it work on any arbitrary running code. Everything from Firefox to my random python script?
[ Parent
| on HN ]
Re:Magic-trace – High-resolution traces of what a process is...
by tbr1 on Friday April 22, 2022 @02:29PM
(#31125982)
It works best on compiled programs.
We do try to support scripted languages with JITs that can emit info about what symbol is located where [1]. Notably, this more or less works for Node.js. It'll work somewhat for Python in that you'll see the Python interpreter frames (probably uninteresting), but you will see any ffi calls (e.g., numpy) with proper stacks.
[1]: https://github.com/torvalds/linux/blob/master/tools/perf/Doc...