ARM-software / devlib

Library for interaction with and instrumentation of remote devices.
Apache License 2.0
47 stars 78 forks source link

ftrace: Separate top_buffer_size from buffer_size #642

Closed mrkajetanp closed 1 year ago

mrkajetanp commented 1 year ago

Since we now set the top buffer size to be the same as the devlib buffer size, this effectively halves the maximum available buffer size that can be set while using devlib. Whatever size is passed as buffer_size will be allocated twice, even if the top buffer is hardly used at all.

This commit separates them into buffer_size and top_buffer_size. If the latter is not passed, the behaviour will not change compared to now.

Fixes: e0c53d09990b5501e493d048a5dce067d8990281

douglas-raillard-arm commented 1 year ago

LGTM, if we end up supporting reentrant collectors with alternative buffers then we will still have a single non-top-level buffer per collector, so the parameter will not need to be generalized to a dict.