dlang / project-ideas

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

Instrument DMD frontend #50

Open burner opened 5 years ago

burner commented 5 years ago

Description

It is difficult to find out why the use of many templates slows down DMD. Profilers are not totally helpful, as they normally don't report the values past to functions.

Think prometheus + grafana for dmd. Maybe something like

void* someFunction(int v, string templateName) {
    version(Stats) auto s = Stats!(&someFunction)(v, templateName)();
}

such that Stats logs the name of the functions a reasonable about of the arguments, and takes the time how long the function took to execute.

What are rough milestones of this project?

  1. Write the Stats functionality
  2. Created PR for dmd
  3. Find out what is slow in DMD and why

How does this project help the D community?

Should be a good first step to figure out why dmd is slow sometimes. dmd being faster, will mean that we have to do less waiting

Recommended skills

Willingness to learn. Frustration tolerance.

(If applicable, e.g. GSoC/SAoC)

What can students expect to get out of doing this project?

  1. How to profile
  2. What do profile
  3. Some inside into how dmd works

Point of Contact

@WalterBright @burner

## References
JinShil commented 5 years ago

See also https://github.com/dlang/projects/issues/41 - Create a CI or other infrastructure for measuring D's progress and performance

UplinkCoder commented 5 years ago

You know that i have already done that right? https://github.com/UplinkCoder/dmd/tree/trace_symbol_time so has @CyberShadow just in a diffrent way than I did it

burner commented 5 years ago

PR?

wilzbach commented 5 years ago

https://github.com/CyberShadow/dmdprof