An all optical sampling scheme using a single semiconductor optical amplifier is proposed for analog signal processing. The analog optical signal is sampled by the probe pulse train through the nonlinear polarization rotation arising in semiconductor optical amplifier. Conversion efficiency and total harmonic distortion are presented to evaluate sampling linearity. In the experiment, 40 GSa/s all optical sampling for 2.5 GHz analog optical signal is demonstrated with commercially available fiber pigtailed components. The results show that the fundamental conversion efficiency and the total harmonic distortion are 1.35 and 2.01% at the operating power of 5 mW, respectively. Further, 160 GSa/s all optical pulsed sampling for 10 GHz analog optical signal is also demonstrated. The proposed all optical sampling requires only one semiconductor optical amplifier and has low power consumption. It is simple and potential for photonic integration.