janestreet/magic-trace — reverse-engineered prompt
Reverse engineered prompt
Build me a simple tool like magic trace for Linux on newer Intel machines that can attach to a running process, record what every function call was doing at very high resolution, and then save a trace file I can inspect in an interactive timeline. I want it to feel like a practical debugging and performance tool, not something that needs me to rewrite my app first. It should work by attaching to a process, letting it run for a bit, then taking a snapshot when I press Ctrl C, and it should also support triggering a snapshot when a specific function gets called.
Please keep the overhead low, make the basic workflow easy to understand, and include a small demo program plus clear getting started instructions so I can try it end to end. If there are important limits, like Linux only, Intel only, or not working well in VMs, make those obvious. I also want the output trace to be easy to open and explore, with enough detail to zoom in on tiny function calls and see what happened right before a slowdown or crash. Look up current docs online if you need to.
Want more depth? Deep Reverse