* consumed from the user space. The enabled TRBE buffer area is a moving subset of
  * the allocated perf auxiliary buffer.
  */
+
+static void __trbe_pad_buf(struct trbe_buf *buf, u64 offset, int len)
+{
+       memset((void *)buf->trbe_base + offset, ETE_IGNORE_PACKET, len);
+}
+
 static void trbe_pad_buf(struct perf_output_handle *handle, int len)
 {
        struct trbe_buf *buf = etm_perf_sink_config(handle);
        u64 head = PERF_IDX2OFF(handle->head, buf);
 
-       memset((void *)buf->trbe_base + head, ETE_IGNORE_PACKET, len);
+       __trbe_pad_buf(buf, head, len);
        if (!buf->snapshot)
                perf_aux_output_skip(handle, len);
 }