• Suzuki K Poulose's avatar
    coresight: trbe: Do not truncate buffer on IRQ · 0a5f3556
    Suzuki K Poulose authored
    The TRBE driver marks the AUX buffer as TRUNCATED when we get an IRQ
    on FILL event. This has rather unwanted side-effect of the event
    being disabled when there may be more space in the ring buffer.
    
    So, instead of TRUNCATE we need a different flag to indicate
    that the trace may have lost a few bytes (i.e from the point of
    generating the FILL event until the IRQ is consumed). Anyways, the
    userspace must use the size from RECORD_AUX headers to restrict
    the "trace" decoding.
    
    Using PARTIAL flag causes the perf tool to generate the
    following warning:
    
      Warning:
      AUX data had gaps in it XX times out of YY!
    
      Are you running a KVM guest in the background?
    
    which is pointlessly scary for a user. The other remaining options
    are :
      - COLLISION - Use by SPE to indicate samples collided
      - Add a new flag - Specifically for CoreSight, doesn't sound
        so good, if we can re-use something.
    
    Given that we don't already use the "COLLISION" flag, the above
    behavior can be notified using this flag for CoreSight.
    
    Cc: Mathieu Poirier <mathieu.poirier@linaro.org>
    Cc: James Clark <james.clark@arm.com>
    Cc: Mike Leach <mike.leach@linaro.org>
    Cc: Anshuman Khandual <anshuman.khandual@arm.com>
    Cc: Leo Yan <leo.yan@linaro.org>
    Signed-off-by: default avatarSuzuki K Poulose <suzuki.poulose@arm.com>
    Link: https://lore.kernel.org/r/20210923143919.2944311-4-suzuki.poulose@arm.comSigned-off-by: default avatarMathieu Poirier <mathieu.poirier@linaro.org>
    0a5f3556
coresight-trbe.c 32.5 KB