janestreet / magic-trace

magic-trace collects and displays high-resolution traces of what a process is doing
https://magic-trace.org
MIT License
4.58k stars 87 forks source link

DRAFT: prototype of dlfilter passing perf samples to ocaml over shared memory #243

Closed lamoreauxaj closed 2 years ago

lamoreauxaj commented 2 years ago

DRAFT:

This is just a draft PR for a prototype of a dlfilter which actually writes all the perf samples to shared memory for magic-trace to read. This PR does not have magic-trace actually understand how to decode such samples and are just ignored currently. Additionally the dlfilter has some issues for the GC.

If this wanted to be further worked on, it would be useful to analyze how much time this may save or if it would be beneficial at all. It does avoid potential bugs in the regex decoding, but we would have to maintain both anyway for older perf versions.