dlang / project-ideas

Collection of impactful projects in the D ecosystem
36 stars 12 forks source link

DMD front end should be instrumented using SystemTap / Bpftrace on Linux #34

Open Laeeth opened 5 years ago

Laeeth commented 5 years ago

Description

What are rough milestones of this project?

How does this project help the D community?

Recommended skills

Point of Contact

## References
Laeeth commented 5 years ago

Given sufficient information about symbols this would allow identifying which parts of code consumed build time.

Dtrace and SystemTap have same API.

Example from use in JVM: https://docs.oracle.com/en/java/javase/11/vm/dtrace-probes-hotspot-vm.html#GUID-9F5AB9C5-AD86-4BE3-B52B-AEE6FE0AF025

stefan-koch-sociomantic commented 5 years ago

That won't be too effective since a lot of dmd internal information is needed for a good trace. I already have patches to output a profile which allow one to see which symbol takes longest to compile.

drug007 commented 4 years ago

Does anybody try use SystemTap in D? I'm interested in usdt probes and with gdc it works out of box, thanks to @ibuclaw , there is issue with ldc (can not add .stapsdt.base section to elf) and I have no idea how to implement it using dmd.

P.S. DTrace is not available in Linux and I think it shouldn't be mentioned here. At least it misguided me.