Third-party

Profiling

Built-in

CPU profiling

The D compiler can instrument generated code to measure per-function profiling information, and save a report on program exit.
This is enabled by the -profile compiler switch. For projects that are configured to be built with dub, profiling can be enabled with the profile build type:

dub build --build=profile

The trace.log file can also be converted into a graphical HTML page using the third party D Profile Viewer.

Heap profiling

Starting with DMD 2.068, the D compiler can instrument memory allocations, and save a report on program exit.
This is enabled by the -profile=gc compiler switch. Or, using dub, with the profile-gc build type:

File size profiling

D map treemap viewer can visualize a .map file in a treemap, and allows seeing at a glance what is using the most space in a compiled executable. Generating map files can be enabled with the -map compiler switch.

On the same page is a tool which attempts to disassemble an ELF binary, and finds which symbol is pulling in which symbol.

Build time profiling

DBuildStat can measure the parsing and compilation times of a large project on a module-by-module basis (example output).

GPerfTools

GPerfTools (formely Google performance tools) can be used in the D programs compiled with LDC using gperftools-d, a binding to C library.

Integration

Demangling

To demangle D symbols emitted by third-party programs, pipe the output through the ddemangle tool.
The tool will recognize D symbols in its input, and replace them with the demangled versions, while outputting all other input intact.

D language development

These tools may be helpful when submitting D bugs, or when working on D itself:

DustMite can reduce a large program to a small one by performing reductions which satisfy a given condition (e.g. that a certain error message is reproduced).

Digger can build D, including old versions of D, and bisect D's history to find which commit fixed or introduced a bug.

TrenD ("Is D slim yet?") measures and visualizes D's history across a number of parameters.