Hello Mathieu,
Does this patch set have impact on other modes as well? I’m thinking --switch-output – it works kind of similar to --snapshot, i.e. may write into perf.data on SIGUSR2 (or on other triggers).
What was the high-level reason for these changes? I can see that you adjust perf ring buffer to match sink hardware buffer. Does this mismatch cause some visible trace loss?
Thanks, Wojciech
Hi,
On Wed, 1 May 2019 at 15:56, Wojciech Żmuda wzmuda@n7space.com wrote:
Hello Mathieu,
Does this patch set have impact on other modes as well? I’m thinking --switch-output –
it works kind of similar to --snapshot, i.e. may write into perf.data on SIGUSR2 (or on other triggers).
The effect of the changes are confined to snapshot mode.
What was the high-level reason for these changes? I can see that you adjust perf ring buffer
to match sink hardware buffer. Does this mismatch cause some visible trace loss?
You are correct, the main element of the set is to make sure the ring buffer size matches the size of the buffer used by the sinks. This is done to make sure the generic mechanic in function __auxtrace_mmap__read()[1] can be reused. In there you will notice the liberal use of mm->len, which is the size of the perf ring buffer. Shrinking the size of the ring buffer to match the buffer used by devices has no drawback since the ring buffer is written to file before the event is scheduled again.
Regards, Mathieu
[1]. https://elixir.bootlin.com/linux/v5.1-rc7/source/tools/perf/util/auxtrace.c#...
Thanks,
Wojciech
CoreSight mailing list CoreSight@lists.linaro.org https://lists.linaro.org/mailman/listinfo/coresight