eventlog: Dump cost centre stack on each sample
With this change it is possible to reconstruct the timing portion of a
.prof file after the fact. By logging the stacks at each time point
a more precise executation trace of the program can be observed rather
than all identical cost centres being identified in the report.
There are two new events:
- EVENT_PROF_BEGIN - emitted at the start of profiling to communicate
the tick interval
- EVENT_PROF_SAMPLE_COST_CENTRE - emitted on each tick to communicate the
current call stack.
Fixes Trac #17322