View source code
Display the source code in dmd/timetrace.d from which thispage was generated on github.
Report a bug
If you spot a problem with this page, click here to create aBugzilla issue.
Improve this page
Quickly fork, edit online, and submit a pull request for this page.Requires a signed-in GitHub account. This works well for small changes.If you'd like to make larger changes you may want to consider usinglocal clone.

Module dmd.timetrace

Compilation time tracing, -ftime-trace.

The time trace profile is output in the Chrome Trace Event Format, described

here

https://docs.google.com/document/d/1CvAClvFfyA5R-PhYUmn5OOQtYMH4h6I0nSsKchNAySU/preview

This file is originally from LDC (the LLVM D compiler).

Documentation

https://dlang.org/phobos/dmd_common_timetrace.html

Coverage

https://codecov.io/gh/dlang/dmd/src/master/compiler/src/dmd/timetrace.d

Functions

NameDescription
deinitializeTimeTrace() Cleanup for time tracing functionality.
initializeTimeTrace(timeGranularityUs, processName) Initialize time tracing functionality.
timeTraceBeginEvent(name_ptr, detail_ptr, loc) Start a new time trace event (C++ interface using upfront C-strings instead of lazy delegates)
timeTraceBeginEvent(eventType) Start a new time trace event
timeTraceEndEvent(eventType) End a time tracing event, optionally updating the event name and details with a delegate. Delegates are used to prevent spending time on string generation when an event is too small to be generated anyway.
timeTraceProfilerEnabled()
writeTimeTraceProfile(buf) Write all time tracing results so far to JSON, in the Chrome Trace Event Format.

Enums

NameDescription
TimeTraceEventType Identifies which compilation stage the event is associated to

Authors

Johan Engelen, Max Haughton, Dennis Korpel

License

Boost License 1.0