{"repo":"janestreet/magic-trace","free":true,"listed":false,"github":"https://github.com/janestreet/magic-trace","clone":"git clone https://github.com/janestreet/magic-trace.git","description":"magic-trace collects and displays high-resolution traces of what a process is doing","language":"OCaml","stars":6234,"topics":["intel","x86","visualizer","tracing","profile","performance-tools","introspection"],"license":"MIT","category":"analytics","readme_excerpt":"magic-trace Overview magic-trace collects and displays high-resolution traces of what a process is doing. People have used it to: - figure out why an application running in production handles some requests slowly while simultaneously handling a sea of uninteresting requests, - look at what their code is actually doing instead of what they think it's doing, - get a history of what their application was doing before it crashed, instead of a mere stacktrace at that final instant, - ...and much more! magic-trace: - has 2%-10% overhead, - doesn't require application changes to use, - traces every function call with 40ns resolution, and - renders a timeline of call stacks going back (a configurable) 10ms. You use it like perf ): point it to a process and off it goes. The key difference from perf is that instead of sampling call stacks throughout time, magic-trace uses Intel Processor Trace to snapshot a ring buffer of all control flow leading up to a chosen point in time[^1]. Then, you can explore an interactive timeline of what happened. You can point magic-trace at a function such that when your application calls it, magic-trace takes a snapshot. Alternatively, attach it to a running process and detach it with Ctrl + C , to see a trace of an arbitrary point in your program. [^1]: perf can do this too, but that's not how most people use it. In fact, if you peek under the hood you'll see that magic-trace uses perf to drive Intel PT. Testimonials \"Magic-trace is one of the simplest ","default_branch":null,"files":null,"tree":[],"storefront":"/r/janestreet","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/janestreet/magic-trace/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}