A data acquisition technique and relevant program for suppression of one of the systematic effects, namely the 'ghost' effect, of a second generation long trace profiler (LTP) is described. The 'ghost' effect arises when there is an unavoidable cross-contamination of the LTP sample and reference signals into one another, leading to a systematic perturbation in the recorded interference patterns and, therefore, a systematic variation of the measured slope trace. Perturbations have been observed with a cylindrically shaped X-ray mirror. Even stronger 'ghost' effects show up in an LTP measurement with a mirror having a toroidal surface figure. The developed technique employs separate measurement of the 'ghost'-effect-related interference patterns in the sample and the reference arms and then subtraction of the 'ghost' patterns from the sample and the reference interference patterns. The procedure preserves the advantage of simultaneously measuring the sample and reference signals. The effectiveness of the technique is illustrated with LTP metrology of a variety of X-ray mirrors.