coresight: perf: Don't set the truncated flag in snapshot mode
authorMathieu Poirier <mathieu.poirier@linaro.org>
Wed, 19 Jun 2019 17:29:09 +0000 (11:29 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 19 Jun 2019 18:29:14 +0000 (20:29 +0200)
commit5aafd9bf7aa932f2a97e5a55d1acda67c161621f
treeafc112924a6d70c5d9ca6da721bb40d038fdf437
parent99f81eb9c51d499f65bac25597e9def22f6a32dc
coresight: perf: Don't set the truncated flag in snapshot mode

This patch avoids setting the truncated flag when operating in snapshot
mode since the trace buffer is expected to be truncated and discontinuous
from one snapshot to another.  Moreover when the truncated flag is set
the perf core stops enabling the event, waiting for user space to consume
the data.  In snapshot mode this is clearly not what we want since it
results in stale data.

Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
Reviewed-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Tested-by: Leo Yan <leo.yan@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/hwtracing/coresight/coresight-etb10.c
drivers/hwtracing/coresight/coresight-tmc-etf.c
drivers/hwtracing/coresight/coresight-tmc-etr.c