top | item 44905224

(no title)

entelechy | 6 months ago

Love it! We did something similar using strace/dtruss back in 2018 with https://buildinfer.loopperfect.com/ and were generating graphs (using eg. graphviz and perfetto.dev) and BUCK files on the back of that

Whilst we regrettably never came around to package it as a propper product, we found it immensly valuable in our consulting work, to pinpoint issues and aid the conversion to BUCK/Bazel. We used graphviz, https://perfetto.dev/ and couple other tools to visualise things

Recently we cicled back to this too but with a broader usecase in mind.

There are some inherent technical challanges with this approach & domain:

- syscall logs can get huge - especially when saved to disk. Our strace logs would get over 100GB for some projects (llvm was around ~50GB)

- some projects also use https and inter process communications and that needs ot be properly handled too. (We even had a customer that was retriving code from a firebird database via perl as part of the compilation step!)

- It's runtime analysis - you might need to repeat the analysis for each configuration.

discuss

order

flakes|6 months ago

Curious, what were you using for doing syscall logging? LD_PRELOAD tricks, or ebpf filtering?

entelechy|6 months ago

mostly strace and it's macos equivalent; Later we moved to ptrace and ebpf. LD_PRELOAD unfortunately doesn't work for statically linked libc. There are also kernel probes but didn't like that it required root permissions...