On 25 July 2017 at 12:24, Etemadi, Mohammad mohammad.etemadi@intel.com wrote:
Thanks Mathieu
Assuming a device with ETR, then how can I set the trace buffer to 64KB. Looks like I need to set -m,16 in perf record command and also change the ETR buffer size in the device tree.
That is correct - I hope the new ETR driver will change that.
What is the attribute in the device tree?
"arm,buffer-size"
https://github.com/Linaro/OpenCSD/blob/perf-opencsd-master/drivers/hwtracing...
Regards, Reza
-----Original Message----- From: Mathieu Poirier [mailto:mathieu.poirier@linaro.org] Sent: Tuesday, July 25, 2017 12:03 PM To: Etemadi, Mohammad mohammad.etemadi@intel.com Cc: coresight@lists.linaro.org Subject: Re: Trace Buffer Size
On 25 July 2017 at 08:58, Etemadi, Mohammad mohammad.etemadi@intel.com wrote:
Hello Mathieu
Is there a perf record option to select trace buffer size? For example something like "-m,16" to allocate 16 pages for the trace buffer?
The "-m,X" option will only affect the size of the ring buffer shared between kernel and user space. Using any other sink buffers than ETR in SG mode, increasing the size of the perf ring buffer has no effect since you are bound by the internal memory of sink devices.
When using the ETR driver on github (that does support SG mode) the amount of space the device can use is controlled by the device tree. As such the size of the buffer in the DT should match the size of the perf ring buffer. This is very sub-optimal - Mike and Suzuki are working on a new implementation that should pickup the size of the SG list to match the perf ring buffer as specified on the cmd line.
Get back to me if you need more details, Mathieu
Regards, Reza