It’s a good question. Looks like they scan with the mass spectrometer continuously as the temperature rises:
SAM starts by heating all the manifolds and tubing that will be carrying gases, then takes background measurements with the QMS and TLS. SAM warms the oven to 125°C and holds that temperature for 10 minutes. A constant flow of helium brings gases from the oven to the QMS. The oven starts ramping up the temperature, and the QMS continuously scans. The composition of the gases coming out of the oven will change as the temperature rises; the most volatile species will wind up in the QMS first, the most refractory last. Some of the stuff in the sample goes directly from solid to gas – its abundance in the QMS was its abundance in the solid sample. But most of the materials decompose into simpler compounds as the temperature ramps up; the SAM team has to work backward from the simpler gases that QMS measures to the compounds that decomposed to make them. The temperature at which each gas appears in the QMS can be diagnostic of the material that decomposed.