News for hackers. Stuff that matters.
Re:Magic-trace – High-resolution traces of what a process is... by cgaebel on Friday April 22, 2022 @09:30AM (#31121323)
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 "version 1.0", which is the first version that we think is sufficiently user-friendly for it to be worth your time to experiment with.

And uhh... sorry in advance if you run into hiccups despite our best efforts. Going from dozens of internal users to anyone and everyone is bound to discover new corners we haven't considered yet. Let us know if you run into trouble!

Re:Magic-trace – High-resolution traces of what a process is... by zeusk on Friday April 22, 2022 @02:59PM (#31126482)
Windows has Windows Performance Analyzer, GPUView and PIX so most game devs are covered on that front :)
Re:Magic-trace – High-resolution traces of what a process is... by djmips on Friday April 22, 2022 @11:21PM (#31131065)
Do people still use GPUView? It hasn't seen a lot of development in years AFAIK and wondered if it was still working and useful.

PIX is great! It gets regular updates and an active and responsive Discord channel.

Re:Magic-trace – High-resolution traces of what a process is... by zeusk on Sunday April 24, 2022 @02:11PM (#31146598)
We use it internally, I'm not entirely certain of external usage. It still works and is good for tracking command packet scheduling and inter-process wait chains.

Yup, PIX is THE tool for game developers. Direct3D team also has a very responsive discord channel :)

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

Re:Magic-trace – High-resolution traces of what a process is... by giovannibonetti on Friday April 22, 2022 @10:46AM (#31122212)
I'm curious about why Standard ML (SML) was chosen for this project, given the track record Jane Street has with OCaml. Do you seen an advantage for using the former in this kind of project?
Re:Magic-trace – High-resolution traces of what a process is... by tbr1 on Friday April 22, 2022 @10:47AM (#31122227)
It's all OCaml, GitHub is just misclassifying it as SML :)
Re:Magic-trace – High-resolution traces of what a process is... by mananaysiempre on Friday April 22, 2022 @08:35PM (#31130072)
Hint[1] in case you’re ever in this situation:

  echo '*.ml  linguist-language=OCaml' >> .gitattributes
  echo '*.mli linguist-language=OCaml' >> .gitattributes
[1] https://github.com/github/linguist/blob/master/docs/override...
Re:Magic-trace – High-resolution traces of what a process is... by cgaebel on Friday April 22, 2022 @08:54PM (#31130218)
Thank you for this. I've made the change, but it looks like it may be several days before github gets around to refreshing the language statistics.
Re:Magic-trace – High-resolution traces of what a process is... by la6472 on Friday April 22, 2022 @04:26PM (#31127610)
So one needs to upload the trace log to your website to visualize? Any way to do it locally?
Re:Magic-trace – High-resolution traces of what a process is... by tbr1 on Friday April 22, 2022 @04:27PM (#31127627)
Absolutely, check out https://github.com/janestreet/magic-trace#privacy-policy and https://github.com/janestreet/magic-trace/wiki/Setting-up-a-.... With a bit of extra configuration, magic-trace can host its own UI locally. You just need to build the UI from source, and point magic-trace to it (via an environment variable).
Re:Magic-trace – High-resolution traces of what a process is... by TooSmugToFail on Friday April 22, 2022 @12:22PM (#31123694)
Awesome work Clark!

Any plans to support Arm in the future? Thanks!

Re:Magic-trace – High-resolution traces of what a process is... by tbr1 on Friday April 22, 2022 @01:03PM (#31124488)
We don't have plans to add ARM support largely because we have no in-house expertise with ARM. That said, ARM has CoreSight which sounds like it could support something like magic-trace in some form, and we'd definitely be open to community contributions for CoreSight support in magic-trace.
Re:Magic-trace – High-resolution traces of what a process is... by geuis on Friday April 22, 2022 @11:16AM (#31122643)
On the website, scrolling doesn't work in mobile safari.
Re:Magic-trace – High-resolution traces of what a process is... by panosfilianos on Friday April 22, 2022 @09:58AM (#31121607)
Thanks for sharing this.
Re:Magic-trace – High-resolution traces of what a process is... by b20000 on Friday April 22, 2022 @03:26PM (#31126845)
why do you guys use Caml?
Re:Magic-trace – High-resolution traces of what a process is... by cgaebel on Friday April 22, 2022 @03:53PM (#31127197)
Re:Magic-trace – High-resolution traces of what a process is... by b20000 on Friday April 22, 2022 @04:10PM (#31127394)
that seems to be a presentation about language features. I'm mostly interested in the business reasons for using the language within what jane street does, and how the language offers a competitive advantage and why it is "good enough" for the highly competitive HFT landscape they work in.
Re:Magic-trace – High-resolution traces of what a process is... by brobinson on Friday April 22, 2022 @06:56PM (#31129250)
The language features are the competitive advantage.
Re:Magic-trace – High-resolution traces of what a process is... by nesarkvechnep on Friday April 22, 2022 @03:56PM (#31127254)
Because Java is not the be-all and end-all.
Re:Magic-trace – High-resolution traces of what a process is... by b20000 on Friday April 22, 2022 @04:08PM (#31127378)
why use java when you have c++?
Re:Magic-trace – High-resolution traces of what a process is... by ARandomerDude on Friday April 22, 2022 @05:22PM (#31128334)
So you can use Clojure. ;-)