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 execution trace of the program can be observed rather
than all identical cost centres being identified in the report.
Fixes #17322 (closed)