1. A method for sampling input data, comprising the steps of: buffering the input data; recording an execution path of the buffered input data in an online operation module; determining whether the buffered input data passes through a desired execution path; and sampling the buffered input data to a data set, in response to the buffered input data passing through the desired execution path.