[PATCH 13/17] coresight etr: Do not clean ETR trace buffer

Suzuki K Poulose Suzuki.Poulose at arm.com
Tue Nov 7 02:37:22 PST 2017


On 03/11/17 20:17, Mathieu Poirier wrote:
> On 3 November 2017 at 04:10, Suzuki K Poulose <Suzuki.Poulose at arm.com> wrote:
>> On 02/11/17 20:36, Mathieu Poirier wrote:
>>>
>>> On Thu, Oct 19, 2017 at 06:15:49PM +0100, Suzuki K Poulose wrote:
>>>>
>>>> We zero out the entire trace buffer used for ETR before it
>>>> is enabled, for helping with debugging. Since we could be
>>>> restoring a session in perf mode, this could destroy the data.
>>>
>>>
>>> I'm not sure to follow you with "... restoring a session in perf mode
>>> ...".
>>> When operating from the perf interface all the memory allocated for a
>>> session is
>>> cleanup after, there is no re-using of memory as in sysFS.
>>
>>
>> We could directly use the perf ring buffer for the ETR. In that case, the
>> perf
>> ring buffer could contain trace data collected from the previous "schedule"
>> which the userspace hasn't collected yet. So, doing a memset here would
>> destroy that data.
> 
> I originally thought your comment was about re-using the memory from a
> previous trace session, hence the confusion.  Please rework your
> changelog to include this clarification as I am sure other people can
> be mislead.

Sure, will do.

Thanks
Suzuki



More information about the linux-arm-kernel mailing list