Live data from Hacker News

Magic-trace – High-resolution traces of what a process is doing

github.com

31–40 of 146 posts

Re: Magic-trace – High-resolution traces of what a process is doing

#31
post #4
post #3

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.

Thank you! I was really disappointed none of the readme actually said what the extension name was.....

Re: Magic-trace – High-resolution traces of what a process is doing

#32
post #8

Jane 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…

Do you take issue with the market maker business model?

Re: Magic-trace – High-resolution traces of what a process is doing

#33
post #31
post #4

Earlier 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.....

You may also be interested in this wiki page: https://github.com/janestreet/magic-trace/wiki/Supported-pla...>

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

#34
post #14

You 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…

The magic of PR's :)

Re: Magic-trace – High-resolution traces of what a process is doing

#35
post #29

Looks 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.

Also, KVM, VMWare (and maybe Xen?) allow PMU access too (but not VirtualBox). Both VMWare ESXi and VMware Server/Workstation/Fusion allow PMU access, you just need to make sure it's enabled in the settings.

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

#36
Jane Street has been publishing some interesting projects recently. See Signals and Threads podcast State Machine Replication, and Why You Should Care [0] posted 2 days ago.

I 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/

[2]: https://opensource.janestreet.com/bonsai/

[3]: https://signalsandthreads.com/building-a-ui-framework/

Re: Magic-trace – High-resolution traces of what a process is doing

#38
post #14

You 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…

They mention that in the privacy section:

https://github.com/janestreet/magic-trace#privacy-policy

Re: Magic-trace – High-resolution traces of what a process is doing

#39
Being a person who works with FPGAs. For all their difficulties, waveforms of both simulation and real-time tapping capabilities are indispensable for tracking what happens before, during, and after an erroneous event occurs. One thing I always miss when going back to software development is some sort of 'waveform' of what the process has done over time and tracking the state of the system over that same course of time. Admittedly dealing with CPU instructions and a program's function calls and overlapping threads is orders of magnitude more difficult than tracking how a bit is changing in a waveform over time, but it definitely seems like tools are getting closer and closer to something that's equivalent and that's pretty awesome to see.

Re: Magic-trace – High-resolution traces of what a process is doing

#40
post #2

Hi 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…

Awesome work Clark!

Any plans to support Arm in the future? Thanks!

Post reply on HN