[plt-dev] Profiling
I tried to profile some GUI code which uses canvas% but unfortunately I
get strange results.
AFAIU (most of) the time spent in the C drawing code is accounted for
but distributed non-uniformly between scheme functions.
My conjecture is that the profiling thread cannot run while the drawing
is taking place (assuming all Scheme threads are serialized like with
FFI calls) which causes non-uniform continuation mark sampling. The
profiler code is correcting for this non-uniformity by adding all the
time (spent in scheme and C) to the last captured sample (which is not
likely to be the one that called the C code).
PS. There are some difficulties with profiling in the presence of
tail-calls but this can be fixed with some use of trace-begin from tail.plt.
--
regards,
Jakub Piotr Cłapa