You can use the Keep Last Buffer Before Trigger option to overwrite the trace buffer during trace collection before the trigger is hit. When trigger is hit, trace starts collecting, gets appended to the existing buffer, and only the last part of the buffer is displayed in the Trace Data viewer.