project-ideas icon indicating copy to clipboard operation
project-ideas copied to clipboard

Instrument DMD frontend

Open burner opened this issue 6 years ago • 4 comments

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

<NG discussions, GitHub PRs, Bugzilla issues, ...>

burner avatar Jul 11 '19 13:07 burner

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

JinShil avatar Jul 11 '19 22:07 JinShil

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

UplinkCoder avatar Jul 11 '19 23:07 UplinkCoder

PR?

burner avatar Jul 12 '19 06:07 burner

https://github.com/CyberShadow/dmdprof

wilzbach avatar Jul 12 '19 09:07 wilzbach