Needs a Skylake or later CPU, linuxers can cat /sys/devices/cpu/caps/pmu_name to find if they're invited to the party
One of the maintainers here -- it should work on Broadwell if you're not super keen on the tens-of-nanoseconds timing precision and are okay with microsecond precision (i.e. only want accurate callstacks), grep intel_pt /proc/cpuinfo should do the trick.
Magic-trace – High-resolution traces of what a process is doing
31–40 of 146 posts
Re: Magic-trace – High-resolution traces of what a process is doing
#32Jane Street is a prop trading shop. I heard that they take tech seriously, but still impressed to see them at the front of HN with a tool like this.
They are among the most notable users of OCaml in the world, and have taken significant stewardship of the language. They sponsor, attend, and publish at multiple academic conferences, especially in the realm of programming languages. I don't think I can say I support their company's primary mission, but their commitment to improving the world of software through various means (language influence, academic publicatio…
Re: Magic-trace – High-resolution traces of what a process is doing
#33Earlier quoted context omitted.
One of the maintainers here -- it should work on Broadwell if you're not super keen on the tens-of-nanoseconds timing precision and are okay with microsecond precision (i.e. only want accurate callstacks), grep intel_pt /proc/cpuinfo should do the trick.
Thank you! I was really disappointed none of the readme actually said what the extension name was.....
Intel PT has a bunch of rough edges that we've tried to paper over in magic-trace, but the gritty caveats are documented in the wiki.
Re: Magic-trace – High-resolution traces of what a process is doing
#34You should make it clearer in the magic trace Readme that the UI service fork used for viewing and analyzing the traces is also available should one want to deploy it locally or in a situation without Internet access: https://github.com/janestreet/perfetto/ It is mentioned in the documentation but for anyone quickly skimming and expecting a SaaS pricing model underneath (I think many do now), that isn't obvious. From…
Re: Magic-trace – High-resolution traces of what a process is doing
#35Looks really cool. I'm sad that I'll never know; Intel + Linux + non-VM excludes literally every computer I have access to. We're all AMD + Windows, and my only access to Intel Linux machines would be a cloud VM.
You can use PMUs in the cloud. Amazon's c6i.metal instance type is an Intel Ice Lake Xeon with full PMU access, for example.
A quick way to check if PMU access is enabled is this:
dmesg | grep "Performance Events"
Edit: Oh, unfortunately VMware Fusion 12 (on Mac OSX Intel) does not expose the performance counters to the VM anymore, as it's using the OSX Hypervisor Framework instead of its own kernel module.Re: Magic-trace – High-resolution traces of what a process is doing
#36I came across the incr_dom library [1], which efficiently calculates the diff on the projected DOM based on a diff of the model data, sorta like React but more... mathematically grounded (?). incr_dom was then reformulated in Bonsai [2] which refactors and generalizes the idea to work with more than DOM. There was a recent Signals and Threads podcast about it a few months ago [3].
[0]: https://news.ycombinator.com/item?id=31100023
[1]: https://opensource.janestreet.com/incr_dom/
Re: Magic-trace – High-resolution traces of what a process is doing
#37Re: Magic-trace – High-resolution traces of what a process is doing
#38You should make it clearer in the magic trace Readme that the UI service fork used for viewing and analyzing the traces is also available should one want to deploy it locally or in a situation without Internet access: https://github.com/janestreet/perfetto/ It is mentioned in the documentation but for anyone quickly skimming and expecting a SaaS pricing model underneath (I think many do now), that isn't obvious. From…
Re: Magic-trace – High-resolution traces of what a process is doing
#39Re: Magic-trace – High-resolution traces of what a process is doing
#40Hi HN! I'm Clark, one of the maintainers of magic-trace. magic-trace was submitted before, our first announcement was this blog post: https://blog.janestreet.com/magic-trace/ . Since then, we've worked hard at making magic-trace more accessible to outside users. We've heard stories of people thinking this was cool before but being unable to even find a download link. I'm posting this here because we just released "ve…
Any plans to support Arm in the future? Thanks!