Good morning,
I noticed the trace data is read from the buffer only when the target task is scheduled in/out, leading to high variability of the trace data size.
This can be an issue because trace data gets very different as in size (and thus as in its coverage) under different system load.
Is getting trace reads independent w.r.t. task scheduling an idea which has already been considered?
One possibility I’m considering is using an independent timer which triggers periodically trace reads from the sink buffer
to achieve less variability.
A couple of buffers (struct etr_buf) could also be used: one for gathering the trace data coming from the sink and another whose content to be copied over to the perf aux buffer.
When the timer triggers, the buffers are switched such that it's always possible to copy the trace data to the perf aux buffer (in one buffer) while gathering the trace data coming from all the ETMs (in the other one).
I have been thinking about this solution with a N:1 source:sink topology in mind, but I'm not sure how this would fit in a N:N topology, where every sink has its own buffer.
What do you think about it? Are you aware of any limitations that should be taken into account?
If we think this could work, the next step would probably be to prototype something that works on my N:1 topology board
Thanks,
Andrea